@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,18 +1,1561 @@
1
+ 'use client';
1
2
  'use strict';
2
3
 
3
- var chunkJMKNNH63_cjs = require('../../chunk-JMKNNH63.cjs');
4
- require('../../chunk-MMC6M35Q.cjs');
5
- require('../../chunk-K6G63EED.cjs');
6
- require('../../chunk-CAJKSTXX.cjs');
7
- require('../../chunk-D2EBLE2B.cjs');
8
- require('../../chunk-Z2TY4A75.cjs');
9
- require('../../chunk-NV4JOKWL.cjs');
4
+ var React6 = require('react');
5
+ var lucideReact = require('lucide-react');
6
+ var clsx = require('clsx');
7
+ var tailwindMerge = require('tailwind-merge');
8
+ var CheckboxPrimitive = require('@radix-ui/react-checkbox');
9
+ var jsxRuntime = require('react/jsx-runtime');
10
+ var classVarianceAuthority = require('class-variance-authority');
11
+ var reactSlot = require('@radix-ui/react-slot');
10
12
 
13
+ function _interopNamespace(e) {
14
+ if (e && e.__esModule) return e;
15
+ var n = Object.create(null);
16
+ if (e) {
17
+ Object.keys(e).forEach(function (k) {
18
+ if (k !== 'default') {
19
+ var d = Object.getOwnPropertyDescriptor(e, k);
20
+ Object.defineProperty(n, k, d.get ? d : {
21
+ enumerable: true,
22
+ get: function () { return e[k]; }
23
+ });
24
+ }
25
+ });
26
+ }
27
+ n.default = e;
28
+ return Object.freeze(n);
29
+ }
11
30
 
31
+ var React6__namespace = /*#__PURE__*/_interopNamespace(React6);
32
+ var CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespace(CheckboxPrimitive);
12
33
 
13
- Object.defineProperty(exports, "DataTable", {
14
- enumerable: true,
15
- get: function () { return chunkJMKNNH63_cjs.DataTable; }
34
+ function cn(...inputs) {
35
+ return tailwindMerge.twMerge(clsx.clsx(inputs));
36
+ }
37
+ function convertToLocalNumbers(text, locale) {
38
+ if (locale === "fa" || locale === "ar") {
39
+ const persianDigits = ["\u06F0", "\u06F1", "\u06F2", "\u06F3", "\u06F4", "\u06F5", "\u06F6", "\u06F7", "\u06F8", "\u06F9"];
40
+ return String(text).replace(/\d/g, (digit) => persianDigits[parseInt(digit)]);
41
+ }
42
+ return String(text);
43
+ }
44
+
45
+ // src/lib/i18n.ts
46
+ function isRTL(locale) {
47
+ return locale === "fa" || locale === "ar";
48
+ }
49
+ var UI_STRINGS = {
50
+ fa: {
51
+ // Autocomplete
52
+ noResults: "\u0646\u062A\u06CC\u062C\u0647\u200C\u0627\u06CC \u06CC\u0627\u0641\u062A \u0646\u0634\u062F",
53
+ suggestions: "\u067E\u06CC\u0634\u0646\u0647\u0627\u062F\u0647\u0627",
54
+ // MultiSelect
55
+ select: "\u0627\u0646\u062A\u062E\u0627\u0628 \u06A9\u0646\u06CC\u062F",
56
+ noOptionsFound: "\u0645\u0648\u0631\u062F\u06CC \u06CC\u0627\u0641\u062A \u0646\u0634\u062F",
57
+ search: "\u062C\u0633\u062A\u062C\u0648...",
58
+ clearAll: "\u067E\u0627\u06A9 \u06A9\u0631\u062F\u0646 \u0647\u0645\u0647",
59
+ // DatePicker / DateRangePicker
60
+ selectDate: "\u0627\u0646\u062A\u062E\u0627\u0628 \u062A\u0627\u0631\u06CC\u062E",
61
+ selectDateRange: "\u0627\u0646\u062A\u062E\u0627\u0628 \u0628\u0627\u0632\u0647 \u062A\u0627\u0631\u06CC\u062E",
62
+ // ErrorState
63
+ errorLoadingData: "\u062E\u0637\u0627 \u062F\u0631 \u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC \u062F\u0627\u062F\u0647\u200C\u0647\u0627",
64
+ retry: "\u062A\u0644\u0627\u0634 \u0645\u062C\u062F\u062F",
65
+ // FilterChip
66
+ remove: "\u062D\u0630\u0641",
67
+ // UserAutocomplete
68
+ noUsersFound: "\u06A9\u0627\u0631\u0628\u0631\u06CC \u06CC\u0627\u0641\u062A \u0646\u0634\u062F",
69
+ // Pagination
70
+ goToPreviousPage: "\u0631\u0641\u062A\u0646 \u0628\u0647 \u0635\u0641\u062D\u0647 \u0642\u0628\u0644\u06CC",
71
+ goToNextPage: "\u0631\u0641\u062A\u0646 \u0628\u0647 \u0635\u0641\u062D\u0647 \u0628\u0639\u062F\u06CC",
72
+ previous: "\u0642\u0628\u0644\u06CC",
73
+ next: "\u0628\u0639\u062F\u06CC",
74
+ // ProfileInfo
75
+ actions: "\u0639\u0645\u0644\u06CC\u0627\u062A",
76
+ // CopyButton
77
+ copy: "\u06A9\u067E\u06CC",
78
+ copied: "\u06A9\u067E\u06CC \u0634\u062F",
79
+ // ConfirmDialog
80
+ confirm: "\u062A\u0627\u06CC\u06CC\u062F",
81
+ cancel: "\u0627\u0646\u0635\u0631\u0627\u0641",
82
+ areYouSure: "\u0622\u06CC\u0627 \u0645\u0637\u0645\u0626\u0646 \u0647\u0633\u062A\u06CC\u062F\u061F",
83
+ // Stepper
84
+ stepperLabel: "\u0645\u0631\u0627\u062D\u0644",
85
+ stepCompleted: "\u062A\u06A9\u0645\u06CC\u0644 \u0634\u062F\u0647",
86
+ stepCurrent: "\u0645\u0631\u062D\u0644\u0647 \u0641\u0639\u0644\u06CC",
87
+ stepPending: "\u062F\u0631 \u0627\u0646\u062A\u0638\u0627\u0631",
88
+ // FilterBar / FilterPanel
89
+ clearFilters: "\u067E\u0627\u06A9 \u06A9\u0631\u062F\u0646 \u0641\u06CC\u0644\u062A\u0631\u0647\u0627",
90
+ activeFilters: "\u0641\u06CC\u0644\u062A\u0631\u0647\u0627\u06CC \u0641\u0639\u0627\u0644",
91
+ filters: "\u0641\u06CC\u0644\u062A\u0631\u0647\u0627",
92
+ applyFilters: "\u0627\u0639\u0645\u0627\u0644",
93
+ resetFilters: "\u067E\u06CC\u0634\u200C\u0641\u0631\u0636",
94
+ noFiltersActive: "\u0641\u06CC\u0644\u062A\u0631 \u0641\u0639\u0627\u0644\u06CC \u0646\u06CC\u0633\u062A",
95
+ clearSection: "\u067E\u0627\u06A9 \u06A9\u0631\u062F\u0646 \u0627\u06CC\u0646 \u0628\u062E\u0634",
96
+ // PageHeader
97
+ goBack: "\u0628\u0627\u0632\u06AF\u0634\u062A",
98
+ // ViewToggle
99
+ gridView: "\u0646\u0645\u0627\u06CC \u0634\u0628\u06A9\u0647\u200C\u0627\u06CC",
100
+ listView: "\u0646\u0645\u0627\u06CC \u0644\u06CC\u0633\u062A\u06CC",
101
+ // PageLoader
102
+ loading: "\u062F\u0631 \u062D\u0627\u0644 \u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC...",
103
+ // ErrorBoundary
104
+ unexpectedError: "\u062E\u0637\u0627\u06CC \u063A\u06CC\u0631\u0645\u0646\u062A\u0638\u0631\u0647\u200C\u0627\u06CC \u0631\u062E \u062F\u0627\u062F",
105
+ // DataTable
106
+ selectAll: "\u0627\u0646\u062A\u062E\u0627\u0628 \u0647\u0645\u0647",
107
+ selectRow: "\u0627\u0646\u062A\u062E\u0627\u0628 \u0631\u062F\u06CC\u0641",
108
+ noDataToDisplay: "\u062F\u0627\u062F\u0647\u200C\u0627\u06CC \u0628\u0631\u0627\u06CC \u0646\u0645\u0627\u06CC\u0634 \u0648\u062C\u0648\u062F \u0646\u062F\u0627\u0631\u062F",
109
+ // InstagramPost
110
+ likesCount: "\u062A\u0639\u062F\u0627\u062F \u0644\u0627\u06CC\u06A9",
111
+ commentsCount: "\u062A\u0639\u062F\u0627\u062F \u06A9\u0627\u0645\u0646\u062A",
112
+ viewsCount: "\u062A\u0639\u062F\u0627\u062F \u0628\u0627\u0632\u062F\u06CC\u062F",
113
+ sharesCount: "\u062A\u0639\u062F\u0627\u062F \u0627\u0634\u062A\u0631\u0627\u06A9",
114
+ postTypeLabel: "\u0646\u0648\u0639 \u067E\u0633\u062A",
115
+ postTypePhoto: "\u0639\u06A9\u0633",
116
+ postTypeVideo: "\u0648\u06CC\u062F\u06CC\u0648",
117
+ postTypeCarousel: "\u0627\u0633\u0644\u0627\u06CC\u062F",
118
+ showMore: "\u0628\u06CC\u0634\u062A\u0631",
119
+ showLess: "\u06A9\u0645\u062A\u0631",
120
+ noMediaAvailable: "\u0631\u0633\u0627\u0646\u0647\u200C\u0627\u06CC \u0645\u0648\u062C\u0648\u062F \u0646\u06CC\u0633\u062A",
121
+ commentAnalysis: "\u062A\u062D\u0644\u06CC\u0644 \u06A9\u0627\u0645\u0646\u062A\u200C\u0647\u0627",
122
+ commentAnalysisDisabled: "\u062A\u062D\u0644\u06CC\u0644 \u06A9\u0627\u0645\u0646\u062A\u200C\u0647\u0627 (\u063A\u06CC\u0631\u0641\u0639\u0627\u0644)",
123
+ booster: "\u0628\u0648\u0633\u062A\u0631",
124
+ boosterDisabled: "\u0628\u0648\u0633\u062A\u0631 (\u063A\u06CC\u0631\u0641\u0639\u0627\u0644)",
125
+ aiAnalysis: "\u062A\u062D\u0644\u06CC\u0644 \u0647\u0648\u0634 \u0645\u0635\u0646\u0648\u0639\u06CC",
126
+ aiAnalysisDisabled: "\u062A\u062D\u0644\u06CC\u0644 \u0647\u0648\u0634 \u0645\u0635\u0646\u0648\u0639\u06CC (\u063A\u06CC\u0631\u0641\u0639\u0627\u0644)",
127
+ openOnInstagram: "\u0628\u0627\u0632 \u06A9\u0631\u062F\u0646 \u062F\u0631 \u0627\u06CC\u0646\u0633\u062A\u0627\u06AF\u0631\u0627\u0645",
128
+ openOnInstagramDisabled: "\u0628\u0627\u0632 \u06A9\u0631\u062F\u0646 \u062F\u0631 \u0627\u06CC\u0646\u0633\u062A\u0627\u06AF\u0631\u0627\u0645 (\u063A\u06CC\u0631\u0641\u0639\u0627\u0644)"
129
+ },
130
+ ar: {
131
+ noResults: "\u0644\u0645 \u064A\u062A\u0645 \u0627\u0644\u0639\u062B\u0648\u0631 \u0639\u0644\u0649 \u0646\u062A\u0627\u0626\u062C",
132
+ suggestions: "\u0627\u0642\u062A\u0631\u0627\u062D\u0627\u062A",
133
+ select: "\u0627\u062E\u062A\u0631",
134
+ noOptionsFound: "\u0644\u0645 \u064A\u062A\u0645 \u0627\u0644\u0639\u062B\u0648\u0631 \u0639\u0644\u0649 \u062E\u064A\u0627\u0631\u0627\u062A",
135
+ search: "\u0628\u062D\u062B...",
136
+ clearAll: "\u0645\u0633\u062D \u0627\u0644\u0643\u0644",
137
+ selectDate: "\u0627\u062E\u062A\u0631 \u062A\u0627\u0631\u064A\u062E",
138
+ selectDateRange: "\u0627\u062E\u062A\u0631 \u0646\u0637\u0627\u0642 \u0627\u0644\u062A\u0627\u0631\u064A\u062E",
139
+ errorLoadingData: "\u062E\u0637\u0623 \u0641\u064A \u062A\u062D\u0645\u064A\u0644 \u0627\u0644\u0628\u064A\u0627\u0646\u0627\u062A",
140
+ retry: "\u0625\u0639\u0627\u062F\u0629 \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629",
141
+ remove: "\u062D\u0630\u0641",
142
+ noUsersFound: "\u0644\u0645 \u064A\u062A\u0645 \u0627\u0644\u0639\u062B\u0648\u0631 \u0639\u0644\u0649 \u0645\u0633\u062A\u062E\u062F\u0645\u064A\u0646",
143
+ goToPreviousPage: "\u0627\u0644\u0627\u0646\u062A\u0642\u0627\u0644 \u0625\u0644\u0649 \u0627\u0644\u0635\u0641\u062D\u0629 \u0627\u0644\u0633\u0627\u0628\u0642\u0629",
144
+ goToNextPage: "\u0627\u0644\u0627\u0646\u062A\u0642\u0627\u0644 \u0625\u0644\u0649 \u0627\u0644\u0635\u0641\u062D\u0629 \u0627\u0644\u062A\u0627\u0644\u064A\u0629",
145
+ previous: "\u0627\u0644\u0633\u0627\u0628\u0642",
146
+ next: "\u0627\u0644\u062A\u0627\u0644\u064A",
147
+ actions: "\u0625\u062C\u0631\u0627\u0621\u0627\u062A",
148
+ // CopyButton
149
+ copy: "\u0646\u0633\u062E",
150
+ copied: "\u062A\u0645 \u0627\u0644\u0646\u0633\u062E",
151
+ // ConfirmDialog
152
+ confirm: "\u062A\u0623\u0643\u064A\u062F",
153
+ cancel: "\u0625\u0644\u063A\u0627\u0621",
154
+ areYouSure: "\u0647\u0644 \u0623\u0646\u062A \u0645\u062A\u0623\u0643\u062F\u061F",
155
+ // Stepper
156
+ stepperLabel: "\u0627\u0644\u062E\u0637\u0648\u0627\u062A",
157
+ stepCompleted: "\u0645\u0643\u062A\u0645\u0644",
158
+ stepCurrent: "\u0627\u0644\u062E\u0637\u0648\u0629 \u0627\u0644\u062D\u0627\u0644\u064A\u0629",
159
+ stepPending: "\u0642\u064A\u062F \u0627\u0644\u0627\u0646\u062A\u0638\u0627\u0631",
160
+ // FilterBar / FilterPanel
161
+ clearFilters: "\u0645\u0633\u062D \u0627\u0644\u0641\u0644\u0627\u062A\u0631",
162
+ activeFilters: "\u0627\u0644\u0641\u0644\u0627\u062A\u0631 \u0627\u0644\u0646\u0634\u0637\u0629",
163
+ filters: "\u0627\u0644\u0641\u0644\u0627\u062A\u0631",
164
+ applyFilters: "\u062A\u0637\u0628\u064A\u0642",
165
+ resetFilters: "\u0627\u0644\u0627\u0641\u062A\u0631\u0627\u0636\u064A",
166
+ noFiltersActive: "\u0644\u0627 \u062A\u0648\u062C\u062F \u0641\u0644\u0627\u062A\u0631 \u0646\u0634\u0637\u0629",
167
+ clearSection: "\u0645\u0633\u062D \u0647\u0630\u0627 \u0627\u0644\u0642\u0633\u0645",
168
+ // PageHeader
169
+ goBack: "\u0631\u062C\u0648\u0639",
170
+ // ViewToggle
171
+ gridView: "\u0639\u0631\u0636 \u0634\u0628\u0643\u064A",
172
+ listView: "\u0639\u0631\u0636 \u0642\u0627\u0626\u0645\u0629",
173
+ // PageLoader
174
+ loading: "\u062C\u0627\u0631\u064D \u0627\u0644\u062A\u062D\u0645\u064A\u0644...",
175
+ // ErrorBoundary
176
+ unexpectedError: "\u062D\u062F\u062B \u062E\u0637\u0623 \u063A\u064A\u0631 \u0645\u062A\u0648\u0642\u0639",
177
+ // DataTable
178
+ selectAll: "\u062A\u062D\u062F\u064A\u062F \u0627\u0644\u0643\u0644",
179
+ selectRow: "\u062A\u062D\u062F\u064A\u062F \u0627\u0644\u0635\u0641",
180
+ noDataToDisplay: "\u0644\u0627 \u062A\u0648\u062C\u062F \u0628\u064A\u0627\u0646\u0627\u062A \u0644\u0644\u0639\u0631\u0636",
181
+ // InstagramPost
182
+ likesCount: "\u0639\u062F\u062F \u0627\u0644\u0625\u0639\u062C\u0627\u0628\u0627\u062A",
183
+ commentsCount: "\u0639\u062F\u062F \u0627\u0644\u062A\u0639\u0644\u064A\u0642\u0627\u062A",
184
+ viewsCount: "\u0639\u062F\u062F \u0627\u0644\u0645\u0634\u0627\u0647\u062F\u0627\u062A",
185
+ sharesCount: "\u0639\u062F\u062F \u0627\u0644\u0645\u0634\u0627\u0631\u0643\u0627\u062A",
186
+ postTypeLabel: "\u0646\u0648\u0639 \u0627\u0644\u0645\u0646\u0634\u0648\u0631",
187
+ postTypePhoto: "\u0635\u0648\u0631\u0629",
188
+ postTypeVideo: "\u0641\u064A\u062F\u064A\u0648",
189
+ postTypeCarousel: "\u0634\u0631\u0627\u0626\u062D",
190
+ showMore: "\u0627\u0644\u0645\u0632\u064A\u062F",
191
+ showLess: "\u0623\u0642\u0644",
192
+ noMediaAvailable: "\u0644\u0627 \u062A\u0648\u062C\u062F \u0648\u0633\u0627\u0626\u0637",
193
+ commentAnalysis: "\u062A\u062D\u0644\u064A\u0644 \u0627\u0644\u062A\u0639\u0644\u064A\u0642\u0627\u062A",
194
+ commentAnalysisDisabled: "\u062A\u062D\u0644\u064A\u0644 \u0627\u0644\u062A\u0639\u0644\u064A\u0642\u0627\u062A (\u0645\u0639\u0637\u0644)",
195
+ booster: "\u062A\u0639\u0632\u064A\u0632",
196
+ boosterDisabled: "\u062A\u0639\u0632\u064A\u0632 (\u0645\u0639\u0637\u0644)",
197
+ aiAnalysis: "\u062A\u062D\u0644\u064A\u0644 \u0627\u0644\u0630\u0643\u0627\u0621 \u0627\u0644\u0627\u0635\u0637\u0646\u0627\u0639\u064A",
198
+ aiAnalysisDisabled: "\u062A\u062D\u0644\u064A\u0644 \u0627\u0644\u0630\u0643\u0627\u0621 \u0627\u0644\u0627\u0635\u0637\u0646\u0627\u0639\u064A (\u0645\u0639\u0637\u0644)",
199
+ openOnInstagram: "\u0641\u062A\u062D \u0641\u064A \u0625\u0646\u0633\u062A\u0627\u062C\u0631\u0627\u0645",
200
+ openOnInstagramDisabled: "\u0641\u062A\u062D \u0641\u064A \u0625\u0646\u0633\u062A\u0627\u062C\u0631\u0627\u0645 (\u0645\u0639\u0637\u0644)"
201
+ },
202
+ en: {
203
+ noResults: "No results found",
204
+ suggestions: "Suggestions",
205
+ select: "Select",
206
+ noOptionsFound: "No options found",
207
+ search: "Search...",
208
+ clearAll: "Clear all",
209
+ selectDate: "Select date",
210
+ selectDateRange: "Select date range",
211
+ errorLoadingData: "Error loading data",
212
+ retry: "Retry",
213
+ remove: "Remove",
214
+ noUsersFound: "No users found",
215
+ goToPreviousPage: "Go to previous page",
216
+ goToNextPage: "Go to next page",
217
+ previous: "Previous",
218
+ next: "Next",
219
+ actions: "Actions",
220
+ // CopyButton
221
+ copy: "Copy",
222
+ copied: "Copied",
223
+ // ConfirmDialog
224
+ confirm: "Confirm",
225
+ cancel: "Cancel",
226
+ areYouSure: "Are you sure?",
227
+ // Stepper
228
+ stepperLabel: "Steps",
229
+ stepCompleted: "Completed",
230
+ stepCurrent: "Current step",
231
+ stepPending: "Pending",
232
+ // FilterBar / FilterPanel
233
+ clearFilters: "Clear filters",
234
+ activeFilters: "Active filters",
235
+ filters: "Filters",
236
+ applyFilters: "Apply",
237
+ resetFilters: "Reset",
238
+ noFiltersActive: "No active filters",
239
+ clearSection: "Clear this section",
240
+ // PageHeader
241
+ goBack: "Go back",
242
+ // ViewToggle
243
+ gridView: "Grid view",
244
+ listView: "List view",
245
+ // PageLoader
246
+ loading: "Loading...",
247
+ // ErrorBoundary
248
+ unexpectedError: "An unexpected error occurred",
249
+ // DataTable
250
+ selectAll: "Select all",
251
+ selectRow: "Select row",
252
+ noDataToDisplay: "No data to display",
253
+ // InstagramPost
254
+ likesCount: "Likes",
255
+ commentsCount: "Comments",
256
+ viewsCount: "Views",
257
+ sharesCount: "Shares",
258
+ postTypeLabel: "Post type",
259
+ postTypePhoto: "Photo",
260
+ postTypeVideo: "Video",
261
+ postTypeCarousel: "Carousel",
262
+ showMore: "More",
263
+ showLess: "Less",
264
+ noMediaAvailable: "No media available",
265
+ commentAnalysis: "Comment Analysis",
266
+ commentAnalysisDisabled: "Comment Analysis (disabled)",
267
+ booster: "Booster",
268
+ boosterDisabled: "Booster (disabled)",
269
+ aiAnalysis: "AI Analysis",
270
+ aiAnalysisDisabled: "AI Analysis (disabled)",
271
+ openOnInstagram: "Open on Instagram",
272
+ openOnInstagramDisabled: "Open on Instagram (disabled)"
273
+ }
274
+ };
275
+ function getUIStrings(locale = "fa") {
276
+ return UI_STRINGS[locale] ?? UI_STRINGS.fa;
277
+ }
278
+ var Checkbox = React6__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
279
+ CheckboxPrimitive__namespace.Root,
280
+ {
281
+ ref,
282
+ "data-slot": "checkbox",
283
+ className: cn(
284
+ "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",
285
+ className
286
+ ),
287
+ ...props,
288
+ children: /* @__PURE__ */ jsxRuntime.jsx(
289
+ CheckboxPrimitive__namespace.Indicator,
290
+ {
291
+ "data-slot": "checkbox-indicator",
292
+ className: "grid place-content-center text-current transition-none",
293
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckIcon, { className: "size-3.5" })
294
+ }
295
+ )
296
+ }
297
+ ));
298
+ Checkbox.displayName = "Checkbox";
299
+ var skeletonVariants = classVarianceAuthority.cva("bg-accent animate-pulse", {
300
+ variants: {
301
+ shape: {
302
+ rect: "rounded-md",
303
+ line: "rounded-full h-4 w-full",
304
+ circle: "rounded-full",
305
+ text: "rounded h-4"
306
+ },
307
+ size: {
308
+ sm: "",
309
+ md: "",
310
+ lg: ""
311
+ }
312
+ },
313
+ compoundVariants: [
314
+ { shape: "circle", size: "sm", class: "size-8" },
315
+ { shape: "circle", size: "md", class: "size-10" },
316
+ { shape: "circle", size: "lg", class: "size-14" }
317
+ ],
318
+ defaultVariants: {
319
+ shape: "rect",
320
+ size: "md"
321
+ }
322
+ });
323
+ function Skeleton({ className, shape, size, count, ...props }) {
324
+ if (count && count > 1) {
325
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { role: "status", "aria-busy": "true", "aria-label": "Loading", className: "space-y-2", children: Array.from({ length: count }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(
326
+ "div",
327
+ {
328
+ "data-slot": "skeleton",
329
+ "aria-hidden": "true",
330
+ className: cn(skeletonVariants({ shape, size }), className)
331
+ },
332
+ i
333
+ )) });
334
+ }
335
+ return /* @__PURE__ */ jsxRuntime.jsx(
336
+ "div",
337
+ {
338
+ "data-slot": "skeleton",
339
+ role: "status",
340
+ "aria-busy": "true",
341
+ "aria-label": "Loading",
342
+ ...props,
343
+ className: cn(skeletonVariants({ shape, size }), className)
344
+ }
345
+ );
346
+ }
347
+ Skeleton.displayName = "Skeleton";
348
+ function Table({
349
+ className,
350
+ size = "md",
351
+ striped = false,
352
+ bordered = false,
353
+ stickyHeader = false,
354
+ ...props
355
+ }) {
356
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "table-container", className: "relative w-full overflow-x-auto", children: /* @__PURE__ */ jsxRuntime.jsx(
357
+ "table",
358
+ {
359
+ "data-slot": "table",
360
+ "data-size": size,
361
+ "data-striped": striped || void 0,
362
+ "data-bordered": bordered || void 0,
363
+ "data-sticky-header": stickyHeader || void 0,
364
+ className: cn("w-full caption-bottom", className),
365
+ ...props
366
+ }
367
+ ) });
368
+ }
369
+ function TableHeader({ className, ...props }) {
370
+ return /* @__PURE__ */ jsxRuntime.jsx(
371
+ "thead",
372
+ {
373
+ "data-slot": "table-header",
374
+ className: cn(
375
+ // 1.1.16 — internal row dividers use --border-muted (subtle), same
376
+ // rationale as Card. The page-level rule of thumb: borders that
377
+ // separate sections of one surface should whisper, not shout.
378
+ "[&_tr]:border-b [&_tr]:border-muted bg-surface-75",
379
+ "[[data-sticky-header]_&]:sticky [[data-sticky-header]_&]:top-0 [[data-sticky-header]_&]:z-[9] [[data-sticky-header]_&]:bg-surface-75",
380
+ className
381
+ ),
382
+ ...props
383
+ }
384
+ );
385
+ }
386
+ function TableBody({ className, ...props }) {
387
+ return /* @__PURE__ */ jsxRuntime.jsx(
388
+ "tbody",
389
+ {
390
+ "data-slot": "table-body",
391
+ className: cn(
392
+ "[&_tr:last-child]:border-0",
393
+ "[[data-striped]_&_tr:nth-child(even)]:bg-surface-75 [[data-striped]_&_tr:nth-child(even):hover]:bg-surface-200",
394
+ className
395
+ ),
396
+ ...props
397
+ }
398
+ );
399
+ }
400
+ function TableRow({ className, ...props }) {
401
+ return /* @__PURE__ */ jsxRuntime.jsx(
402
+ "tr",
403
+ {
404
+ "data-slot": "table-row",
405
+ className: cn(
406
+ "hover:bg-surface-200 data-[state=selected]:bg-selection border-b border-muted transition-colors",
407
+ className
408
+ ),
409
+ ...props
410
+ }
411
+ );
412
+ }
413
+ function TableHead({ className, sortDirection, ...props }) {
414
+ const ariaSort = sortDirection === "asc" ? "ascending" : sortDirection === "desc" ? "descending" : sortDirection === "none" ? "none" : void 0;
415
+ return /* @__PURE__ */ jsxRuntime.jsx(
416
+ "th",
417
+ {
418
+ "data-slot": "table-head",
419
+ "aria-sort": ariaSort,
420
+ className: cn(
421
+ "text-foreground-lighter text-start align-middle font-semibold whitespace-nowrap [&:has([role=checkbox])]:pe-0 [&>[role=checkbox]]:translate-y-[2px]",
422
+ // Size variants (inherited from parent table)
423
+ "[[data-size=sm]_&]:h-8 [[data-size=sm]_&]:px-2 [[data-size=sm]_&]:text-xs",
424
+ "[[data-size=md]_&]:h-10 [[data-size=md]_&]:px-3 [[data-size=md]_&]:text-sm",
425
+ "[[data-size=lg]_&]:h-12 [[data-size=lg]_&]:px-4 [[data-size=lg]_&]:text-base",
426
+ // Bordered variant
427
+ "[[data-bordered]_&]:border [[data-bordered]_&]:border-border",
428
+ className
429
+ ),
430
+ ...props
431
+ }
432
+ );
433
+ }
434
+ function TableCell({ className, ...props }) {
435
+ return /* @__PURE__ */ jsxRuntime.jsx(
436
+ "td",
437
+ {
438
+ "data-slot": "table-cell",
439
+ className: cn(
440
+ "align-middle whitespace-nowrap [&:has([role=checkbox])]:pe-0 [&>[role=checkbox]]:translate-y-[2px]",
441
+ // Size variants (inherited from parent table)
442
+ "[[data-size=sm]_&]:px-2 [[data-size=sm]_&]:py-1.5 [[data-size=sm]_&]:text-xs",
443
+ "[[data-size=md]_&]:px-3 [[data-size=md]_&]:py-2 [[data-size=md]_&]:text-sm",
444
+ "[[data-size=lg]_&]:px-4 [[data-size=lg]_&]:py-3 [[data-size=lg]_&]:text-base",
445
+ // Bordered variant
446
+ "[[data-bordered]_&]:border [[data-bordered]_&]:border-border",
447
+ className
448
+ ),
449
+ ...props
450
+ }
451
+ );
452
+ }
453
+ function TableSortHeader({ className, children, sorted, ...props }) {
454
+ return /* @__PURE__ */ jsxRuntime.jsxs(
455
+ "button",
456
+ {
457
+ "data-slot": "table-sort-header",
458
+ className: cn(
459
+ "inline-flex items-center gap-1.5 cursor-pointer select-none hover:text-foreground transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 rounded-sm",
460
+ sorted && "text-foreground",
461
+ className
462
+ ),
463
+ ...props,
464
+ children: [
465
+ children,
466
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex flex-col -space-y-0.5", children: [
467
+ /* @__PURE__ */ jsxRuntime.jsx(
468
+ "svg",
469
+ {
470
+ width: "8",
471
+ height: "5",
472
+ viewBox: "0 0 8 5",
473
+ className: cn("transition-colors", sorted === "asc" ? "text-foreground" : "text-foreground-muted"),
474
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M4 0L8 5H0L4 0Z", fill: "currentColor" })
475
+ }
476
+ ),
477
+ /* @__PURE__ */ jsxRuntime.jsx(
478
+ "svg",
479
+ {
480
+ width: "8",
481
+ height: "5",
482
+ viewBox: "0 0 8 5",
483
+ className: cn("transition-colors", sorted === "desc" ? "text-foreground" : "text-foreground-muted"),
484
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M4 5L0 0H8L4 5Z", fill: "currentColor" })
485
+ }
486
+ )
487
+ ] })
488
+ ]
489
+ }
490
+ );
491
+ }
492
+ Table.displayName = "Table";
493
+ TableHeader.displayName = "TableHeader";
494
+ TableBody.displayName = "TableBody";
495
+ TableHead.displayName = "TableHead";
496
+ TableRow.displayName = "TableRow";
497
+ TableCell.displayName = "TableCell";
498
+ TableSortHeader.displayName = "TableSortHeader";
499
+
500
+ // src/lib/constants.ts
501
+ var SIZE = {
502
+ text: {
503
+ xs: "text-xs",
504
+ sm: "text-sm leading-4",
505
+ md: "text-sm",
506
+ lg: "text-base",
507
+ xl: "text-base"
508
+ },
509
+ padding: {
510
+ xs: "px-2.5 py-1",
511
+ sm: "px-3 py-2",
512
+ md: "px-4 py-2",
513
+ lg: "px-4 py-2",
514
+ xl: "px-6 py-3"
515
+ },
516
+ height: {
517
+ xs: "h-[26px]",
518
+ sm: "h-[34px]",
519
+ md: "h-[38px]",
520
+ lg: "h-[42px]",
521
+ xl: "h-[50px]"
522
+ }
523
+ };
524
+ var SIZE_VARIANTS = {
525
+ xs: `${SIZE.text["xs"]} ${SIZE.padding["xs"]} ${SIZE.height["xs"]}`,
526
+ sm: `${SIZE.text["sm"]} ${SIZE.padding["sm"]} ${SIZE.height["sm"]}`,
527
+ md: `${SIZE.text["md"]} ${SIZE.padding["md"]} ${SIZE.height["md"]}`,
528
+ lg: `${SIZE.text["lg"]} ${SIZE.padding["lg"]} ${SIZE.height["lg"]}`,
529
+ xl: `${SIZE.text["xl"]} ${SIZE.padding["xl"]} ${SIZE.height["xl"]}`
530
+ };
531
+ var DESTRUCTIVE_VARIANT = `
532
+ text-foreground
533
+ bg-destructive-300 dark:bg-destructive-400 hover:bg-destructive-400 dark:hover:bg-destructive-400/80
534
+ border-destructive-500 hover:border-destructive
535
+ hover:text-hi-contrast
536
+ data-[state=open]:border-destructive
537
+ data-[state=open]:bg-destructive-400 dark:data-[state=open]:bg-destructive-600/80
538
+ `;
539
+ var buttonVariants = classVarianceAuthority.cva(
540
+ `inline-flex items-center justify-center
541
+ relative
542
+ cursor-pointer
543
+ gap-2
544
+ text-center
545
+ font-normal
546
+ ease-out
547
+ duration-200
548
+ rounded-md
549
+ outline-none
550
+ transition-all
551
+ active:scale-[0.98]
552
+ focus-visible:ring-2
553
+ focus-visible:ring-ring
554
+ focus-visible:ring-offset-2
555
+ border
556
+ disabled:pointer-events-none
557
+ disabled:opacity-50
558
+ [&_svg]:pointer-events-none
559
+ [&_svg]:shrink-0
560
+ `,
561
+ {
562
+ variants: {
563
+ variant: {
564
+ primary: `
565
+ bg-brand-400 dark:bg-brand-500
566
+ hover:bg-brand-300 dark:hover:bg-brand-500/80
567
+ text-foreground
568
+ border-brand-500/75 dark:border-brand/30
569
+ hover:border-brand-600 dark:hover:border-brand-500
570
+ data-[state=open]:bg-brand-400/80 dark:data-[state=open]:bg-brand-600/80
571
+ `,
572
+ default: `
573
+ text-foreground
574
+ bg-alternative dark:bg-muted hover:bg-selection
575
+ border-strong hover:border-stronger
576
+ data-[state=open]:bg-selection
577
+ data-[state=open]:border-button-hover
578
+ `,
579
+ secondary: `
580
+ bg-foreground
581
+ text-background hover:text-border-stronger
582
+ focus-visible:text-border-control
583
+ border-foreground-light hover:border-foreground-lighter
584
+ data-[state=open]:border-foreground-lighter
585
+ `,
586
+ outline: `
587
+ text-foreground
588
+ bg-transparent
589
+ border-strong hover:border-foreground-muted
590
+ data-[state=open]:border-stronger
591
+ `,
592
+ dashed: `
593
+ text-foreground
594
+ border
595
+ border-dashed
596
+ border-strong hover:border-stronger
597
+ bg-transparent
598
+ data-[state=open]:border-stronger
599
+ `,
600
+ link: `
601
+ text-brand-600
602
+ border
603
+ border-transparent
604
+ bg-transparent
605
+ hover:bg-brand-400
606
+ shadow-none
607
+ data-[state=open]:bg-brand-400
608
+ `,
609
+ text: `
610
+ text-foreground
611
+ hover:bg-surface-300
612
+ shadow-none
613
+ data-[state=open]:bg-surface-300
614
+ border-transparent
615
+ `,
616
+ danger: DESTRUCTIVE_VARIANT,
617
+ warning: `
618
+ text-foreground
619
+ bg-warning-300 dark:bg-warning-400 hover:bg-warning-400 dark:hover:bg-warning-400/80
620
+ border-warning-500 hover:border-warning
621
+ hover:text-hi-contrast
622
+ data-[state=open]:border-warning
623
+ data-[state=open]:bg-warning-400 dark:data-[state=open]:bg-warning-600/80
624
+ `,
625
+ destructive: DESTRUCTIVE_VARIANT,
626
+ ghost: `
627
+ text-foreground
628
+ hover:bg-surface-100 dark:hover:bg-surface-200
629
+ border-transparent
630
+ `
631
+ },
632
+ block: {
633
+ true: "w-full flex items-center justify-center"
634
+ },
635
+ size: {
636
+ ...SIZE_VARIANTS,
637
+ default: SIZE_VARIANTS.sm,
638
+ icon: "size-9",
639
+ // Compact icon-only button (24×24). Useful for dense rows in tables
640
+ // and toolbars. Pair with a 14px lucide icon for a balanced look.
641
+ "icon-xs": "size-6",
642
+ "icon-sm": "size-7",
643
+ "icon-lg": "size-10"
644
+ },
645
+ disabled: {
646
+ true: "opacity-50 cursor-not-allowed pointer-events-none"
647
+ },
648
+ rounded: {
649
+ true: "rounded-full"
650
+ }
651
+ },
652
+ defaultVariants: {
653
+ variant: "default",
654
+ size: "sm"
655
+ }
656
+ }
657
+ );
658
+ var IconContainerVariants = classVarianceAuthority.cva("inline-flex items-center justify-center", {
659
+ variants: {
660
+ size: {
661
+ xs: "[&_svg]:size-[14px]",
662
+ sm: "[&_svg]:size-[18px]",
663
+ md: "[&_svg]:size-[20px]",
664
+ lg: "[&_svg]:size-[20px]",
665
+ xl: "[&_svg]:size-[24px]",
666
+ /** @deprecated */
667
+ tiny: "[&_svg]:size-[14px]",
668
+ /** @deprecated */
669
+ small: "[&_svg]:size-[18px]",
670
+ /** @deprecated */
671
+ medium: "[&_svg]:size-[20px]",
672
+ /** @deprecated */
673
+ large: "[&_svg]:size-[20px]",
674
+ /** @deprecated */
675
+ xlarge: "[&_svg]:size-[24px]",
676
+ default: "[&_svg]:size-[18px]",
677
+ icon: "[&_svg]:size-[18px]"
678
+ },
679
+ variant: {
680
+ primary: "text-brand-600",
681
+ default: "text-foreground-lighter",
682
+ secondary: "text-border-muted",
683
+ outline: "text-foreground-lighter",
684
+ dashed: "text-foreground-lighter",
685
+ link: "text-brand-600",
686
+ text: "text-foreground-lighter",
687
+ danger: "text-destructive-600",
688
+ warning: "text-warning",
689
+ destructive: "text-destructive-600",
690
+ ghost: "text-foreground-lighter"
691
+ }
692
+ }
16
693
  });
694
+ var loadingVariants = classVarianceAuthority.cva("", {
695
+ variants: {
696
+ variant: {
697
+ primary: "text-brand-600",
698
+ default: "text-foreground-lighter",
699
+ secondary: "text-border-muted",
700
+ outline: "text-foreground-lighter",
701
+ dashed: "text-foreground-lighter",
702
+ link: "text-brand-600",
703
+ text: "text-foreground-muted",
704
+ danger: "text-destructive-600",
705
+ warning: "text-warning",
706
+ destructive: "text-destructive-600",
707
+ ghost: "text-foreground-lighter"
708
+ },
709
+ loading: {
710
+ default: "",
711
+ true: `animate-spin`
712
+ }
713
+ }
714
+ });
715
+ var Button = React6.forwardRef(
716
+ ({
717
+ asChild = false,
718
+ variant,
719
+ type,
720
+ size = "sm",
721
+ children,
722
+ isLoading,
723
+ loading,
724
+ block,
725
+ icon,
726
+ iconEnd,
727
+ iconStart,
728
+ iconRight,
729
+ iconLeft,
730
+ htmlType = "button",
731
+ rounded,
732
+ className,
733
+ ...props
734
+ }, ref) => {
735
+ if (process.env.NODE_ENV !== "production") {
736
+ const deprecatedSizes = ["tiny", "small", "medium", "large", "xlarge"];
737
+ if (size && deprecatedSizes.includes(size)) {
738
+ console.warn(`[Parto UI] Button: size="${size}" is deprecated. Use xs|sm|md|lg|xl instead.`);
739
+ }
740
+ }
741
+ const Comp = asChild ? reactSlot.Slot : "button";
742
+ const { tabIndex } = props;
743
+ const buttonVariant = type && typeof type === "string" && !["button", "submit", "reset"].includes(type) ? type : variant || "default";
744
+ const _loading = isLoading ?? loading;
745
+ const resolvedIconStart = icon ?? iconStart ?? iconLeft;
746
+ const resolvedIconEnd = iconEnd ?? iconRight;
747
+ const showIcon = _loading || resolvedIconStart;
748
+ const disabled = _loading === true || props.disabled;
749
+ const computedTabIndex = tabIndex !== void 0 ? tabIndex : disabled ? -1 : 0;
750
+ const iconSize = size === "default" ? "sm" : size === "icon" || size === "icon-sm" ? "sm" : size === "icon-xs" ? "xs" : size === "icon-lg" ? "lg" : size ?? "sm";
751
+ return /* @__PURE__ */ jsxRuntime.jsx(
752
+ Comp,
753
+ {
754
+ ref,
755
+ "data-slot": "button",
756
+ "data-size": size,
757
+ type: htmlType,
758
+ disabled,
759
+ "aria-busy": _loading || void 0,
760
+ tabIndex: computedTabIndex,
761
+ className: cn(buttonVariants({ variant: buttonVariant, size, disabled, block, rounded }), className),
762
+ onClick: (e) => {
763
+ if (disabled) return e.preventDefault();
764
+ else props?.onClick?.(e);
765
+ },
766
+ ...props,
767
+ children: asChild ? React6.isValidElement(children) ? React6.cloneElement(
768
+ children,
769
+ void 0,
770
+ showIcon && (_loading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(IconContainerVariants({ size: iconSize, variant: buttonVariant })), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: cn(loadingVariants({ loading: _loading, variant: buttonVariant })) }) }) : resolvedIconStart ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(IconContainerVariants({ size: iconSize, variant: buttonVariant })), children: resolvedIconStart }) : null),
771
+ children.props?.children && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex items-center gap-2 truncate", children: children.props.children }),
772
+ resolvedIconEnd && !_loading && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(IconContainerVariants({ size: iconSize, variant: buttonVariant })), children: resolvedIconEnd })
773
+ ) : null : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
774
+ showIcon && (_loading ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(IconContainerVariants({ size: iconSize, variant: buttonVariant })), children: [
775
+ /* @__PURE__ */ jsxRuntime.jsx(
776
+ lucideReact.Loader2,
777
+ {
778
+ "aria-hidden": "true",
779
+ className: cn(loadingVariants({ loading: _loading, variant: buttonVariant }))
780
+ }
781
+ ),
782
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "\u062F\u0631 \u062D\u0627\u0644 \u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC..." })
783
+ ] }) : resolvedIconStart ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(IconContainerVariants({ size: iconSize, variant: buttonVariant })), children: resolvedIconStart }) : null),
784
+ children && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex items-center gap-2 truncate", children }),
785
+ resolvedIconEnd && !_loading && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(IconContainerVariants({ size: iconSize, variant: buttonVariant })), children: resolvedIconEnd })
786
+ ] })
787
+ }
788
+ );
789
+ }
790
+ );
791
+ Button.displayName = "Button";
792
+ var PaginationDirectionContext = React6__namespace.createContext("rtl");
793
+ function usePaginationDirection() {
794
+ return React6__namespace.useContext(PaginationDirectionContext);
795
+ }
796
+ function Pagination({ className, dir, children, ...props }) {
797
+ const resolvedDir = dir ?? "rtl";
798
+ return /* @__PURE__ */ jsxRuntime.jsx(PaginationDirectionContext.Provider, { value: resolvedDir, children: /* @__PURE__ */ jsxRuntime.jsx(
799
+ "nav",
800
+ {
801
+ role: "navigation",
802
+ "aria-label": "pagination",
803
+ "data-slot": "pagination",
804
+ dir: resolvedDir,
805
+ className: cn("mx-auto flex w-full justify-center not-prose", className),
806
+ ...props,
807
+ children
808
+ }
809
+ ) });
810
+ }
811
+ function PaginationContent({ className, ...props }) {
812
+ const dir = usePaginationDirection();
813
+ return /* @__PURE__ */ jsxRuntime.jsx(
814
+ "ul",
815
+ {
816
+ "data-slot": "pagination-content",
817
+ dir,
818
+ className: cn("flex flex-row items-center gap-1 list-none", className),
819
+ ...props
820
+ }
821
+ );
822
+ }
823
+ function PaginationItem({ ...props }) {
824
+ return /* @__PURE__ */ jsxRuntime.jsx("li", { "data-slot": "pagination-item", ...props });
825
+ }
826
+ function PaginationLink({ className, isActive, size = "icon", dir, ...props }) {
827
+ const contextDir = usePaginationDirection();
828
+ const linkDir = dir ?? (contextDir === "rtl" ? "rtl" : "ltr");
829
+ return /* @__PURE__ */ jsxRuntime.jsx(
830
+ "a",
831
+ {
832
+ "aria-current": isActive ? "page" : void 0,
833
+ "data-slot": "pagination-link",
834
+ "data-active": isActive,
835
+ dir: linkDir,
836
+ className: cn(
837
+ buttonVariants({
838
+ variant: "outline",
839
+ size
840
+ }),
841
+ // Remove underline from links
842
+ "no-underline",
843
+ // Active state styling with green color
844
+ isActive && [
845
+ "border-brand-500 bg-brand/10 text-brand-600",
846
+ "dark:border-brand-600 dark:bg-brand/10 dark:text-brand-400",
847
+ "pointer-events-none"
848
+ ],
849
+ className
850
+ ),
851
+ ...props
852
+ }
853
+ );
854
+ }
855
+ function PaginationPrevious({ className, ...props }) {
856
+ const dir = usePaginationDirection();
857
+ const isRTL2 = dir === "rtl";
858
+ const strings = getUIStrings(isRTL2 ? "fa" : "en");
859
+ const Icon = isRTL2 ? lucideReact.ChevronRightIcon : lucideReact.ChevronLeftIcon;
860
+ return /* @__PURE__ */ jsxRuntime.jsxs(
861
+ PaginationLink,
862
+ {
863
+ "aria-label": strings.goToPreviousPage,
864
+ size: "default",
865
+ className: cn("gap-1 ps-2.5 pe-2.5 no-underline flex items-center", className),
866
+ dir: "ltr",
867
+ ...props,
868
+ children: [
869
+ /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "size-4" }),
870
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden sm:inline no-underline", children: strings.previous })
871
+ ]
872
+ }
873
+ );
874
+ }
875
+ function PaginationNext({ className, ...props }) {
876
+ const dir = usePaginationDirection();
877
+ const isRTL2 = dir === "rtl";
878
+ const strings = getUIStrings(isRTL2 ? "fa" : "en");
879
+ const Icon = isRTL2 ? lucideReact.ChevronLeftIcon : lucideReact.ChevronRightIcon;
880
+ return /* @__PURE__ */ jsxRuntime.jsx(
881
+ PaginationLink,
882
+ {
883
+ "aria-label": strings.goToNextPage,
884
+ size: "default",
885
+ className: cn("gap-1 ps-2.5 pe-2.5 no-underline flex items-center", className),
886
+ dir: "ltr",
887
+ ...props,
888
+ children: isRTL2 ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
889
+ /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "size-4" }),
890
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden sm:inline no-underline", children: strings.next })
891
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
892
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden sm:inline no-underline", children: strings.next }),
893
+ /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "size-4" })
894
+ ] })
895
+ }
896
+ );
897
+ }
898
+ function PaginationEllipsis({ className, ...props }) {
899
+ return /* @__PURE__ */ jsxRuntime.jsxs(
900
+ "span",
901
+ {
902
+ "aria-hidden": true,
903
+ "data-slot": "pagination-ellipsis",
904
+ className: cn("flex size-9 items-center justify-center", className),
905
+ ...props,
906
+ children: [
907
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MoreHorizontalIcon, { className: "size-4" }),
908
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "More pages" })
909
+ ]
910
+ }
911
+ );
912
+ }
913
+ Pagination.displayName = "Pagination";
914
+ PaginationContent.displayName = "PaginationContent";
915
+ PaginationItem.displayName = "PaginationItem";
916
+ PaginationLink.displayName = "PaginationLink";
917
+ PaginationPrevious.displayName = "PaginationPrevious";
918
+ PaginationNext.displayName = "PaginationNext";
919
+ PaginationEllipsis.displayName = "PaginationEllipsis";
920
+ var PaginationControlled = React6__namespace.forwardRef(
921
+ ({
922
+ currentPage,
923
+ totalPages,
924
+ onPageChange,
925
+ siblingCount = 1,
926
+ showFirstLast = false,
927
+ showPrevNext = true,
928
+ showEllipsis = true,
929
+ className,
930
+ locale = "fa"
931
+ }, ref) => {
932
+ const isRTL2 = locale === "fa" || locale === "ar";
933
+ const localizeNumber = (n) => convertToLocalNumbers(String(n), locale);
934
+ const handlePageChange = (page) => {
935
+ if (page >= 1 && page <= totalPages && page !== currentPage) {
936
+ onPageChange(page);
937
+ }
938
+ };
939
+ const generatePageNumbers = () => {
940
+ const pages = [];
941
+ const totalNumbers = siblingCount * 2 + 5;
942
+ const totalBlocks = totalNumbers + 2;
943
+ if (totalPages <= totalBlocks) {
944
+ for (let i = 1; i <= totalPages; i++) {
945
+ pages.push(i);
946
+ }
947
+ } else {
948
+ const leftSiblingIndex = Math.max(currentPage - siblingCount, 1);
949
+ const rightSiblingIndex = Math.min(currentPage + siblingCount, totalPages);
950
+ const shouldShowLeftEllipsis = leftSiblingIndex > 2;
951
+ const shouldShowRightEllipsis = rightSiblingIndex < totalPages - 1;
952
+ if (!shouldShowLeftEllipsis && shouldShowRightEllipsis) {
953
+ const leftItemCount = 3 + 2 * siblingCount;
954
+ const leftRange = [];
955
+ for (let i = 1; i <= leftItemCount; i++) {
956
+ leftRange.push(i);
957
+ }
958
+ pages.push(...leftRange);
959
+ if (showEllipsis) pages.push("ellipsis");
960
+ pages.push(totalPages);
961
+ } else if (shouldShowLeftEllipsis && !shouldShowRightEllipsis) {
962
+ pages.push(1);
963
+ if (showEllipsis) pages.push("ellipsis");
964
+ const rightItemCount = 3 + 2 * siblingCount;
965
+ const rightRange = [];
966
+ for (let i = totalPages - rightItemCount + 1; i <= totalPages; i++) {
967
+ rightRange.push(i);
968
+ }
969
+ pages.push(...rightRange);
970
+ } else if (shouldShowLeftEllipsis && shouldShowRightEllipsis) {
971
+ pages.push(1);
972
+ if (showEllipsis) pages.push("ellipsis");
973
+ for (let i = leftSiblingIndex; i <= rightSiblingIndex; i++) {
974
+ pages.push(i);
975
+ }
976
+ if (showEllipsis) pages.push("ellipsis");
977
+ pages.push(totalPages);
978
+ }
979
+ }
980
+ return pages;
981
+ };
982
+ const pageNumbers = generatePageNumbers();
983
+ const showFirstButton = showFirstLast && !pageNumbers.includes(1) && currentPage > 1;
984
+ const showLastButton = showFirstLast && !pageNumbers.includes(totalPages) && currentPage < totalPages;
985
+ return /* @__PURE__ */ jsxRuntime.jsx(Pagination, { ref, "data-slot": "pagination-controlled", className: cn(className), dir: isRTL2 ? "rtl" : "ltr", children: /* @__PURE__ */ jsxRuntime.jsxs(PaginationContent, { children: [
986
+ showFirstButton && /* @__PURE__ */ jsxRuntime.jsx(PaginationItem, { children: /* @__PURE__ */ jsxRuntime.jsx(
987
+ PaginationLink,
988
+ {
989
+ href: "#",
990
+ onClick: (e) => {
991
+ e.preventDefault();
992
+ handlePageChange(1);
993
+ },
994
+ children: localizeNumber(1)
995
+ }
996
+ ) }),
997
+ showPrevNext && /* @__PURE__ */ jsxRuntime.jsx(PaginationItem, { children: /* @__PURE__ */ jsxRuntime.jsx(
998
+ PaginationPrevious,
999
+ {
1000
+ href: "#",
1001
+ onClick: (e) => {
1002
+ e.preventDefault();
1003
+ handlePageChange(currentPage - 1);
1004
+ },
1005
+ className: currentPage === 1 ? "pointer-events-none opacity-50" : ""
1006
+ }
1007
+ ) }),
1008
+ pageNumbers.map((page, index) => {
1009
+ if (page === "ellipsis") {
1010
+ return /* @__PURE__ */ jsxRuntime.jsx(PaginationItem, { children: /* @__PURE__ */ jsxRuntime.jsx(PaginationEllipsis, {}) }, `ellipsis-${index}`);
1011
+ }
1012
+ return /* @__PURE__ */ jsxRuntime.jsx(PaginationItem, { children: /* @__PURE__ */ jsxRuntime.jsx(
1013
+ PaginationLink,
1014
+ {
1015
+ href: "#",
1016
+ isActive: page === currentPage,
1017
+ onClick: (e) => {
1018
+ e.preventDefault();
1019
+ handlePageChange(page);
1020
+ },
1021
+ children: localizeNumber(page)
1022
+ }
1023
+ ) }, page);
1024
+ }),
1025
+ showPrevNext && /* @__PURE__ */ jsxRuntime.jsx(PaginationItem, { children: /* @__PURE__ */ jsxRuntime.jsx(
1026
+ PaginationNext,
1027
+ {
1028
+ href: "#",
1029
+ onClick: (e) => {
1030
+ e.preventDefault();
1031
+ handlePageChange(currentPage + 1);
1032
+ },
1033
+ className: currentPage === totalPages ? "pointer-events-none opacity-50" : ""
1034
+ }
1035
+ ) }),
1036
+ showLastButton && /* @__PURE__ */ jsxRuntime.jsx(PaginationItem, { children: /* @__PURE__ */ jsxRuntime.jsx(
1037
+ PaginationLink,
1038
+ {
1039
+ href: "#",
1040
+ onClick: (e) => {
1041
+ e.preventDefault();
1042
+ handlePageChange(totalPages);
1043
+ },
1044
+ children: localizeNumber(totalPages)
1045
+ }
1046
+ ) })
1047
+ ] }) });
1048
+ }
1049
+ );
1050
+ PaginationControlled.displayName = "PaginationControlled";
1051
+ function useInfiniteScroll({
1052
+ onLoadMore,
1053
+ hasMore,
1054
+ isLoading = false,
1055
+ rootMargin = "200px",
1056
+ threshold = 0
1057
+ }) {
1058
+ const observerRef = React6__namespace.useRef(null);
1059
+ const callbackRef = React6__namespace.useRef(onLoadMore);
1060
+ React6__namespace.useEffect(() => {
1061
+ callbackRef.current = onLoadMore;
1062
+ }, [onLoadMore]);
1063
+ const hasMoreRef = React6__namespace.useRef(hasMore);
1064
+ React6__namespace.useEffect(() => {
1065
+ hasMoreRef.current = hasMore;
1066
+ }, [hasMore]);
1067
+ const isLoadingRef = React6__namespace.useRef(isLoading);
1068
+ React6__namespace.useEffect(() => {
1069
+ isLoadingRef.current = isLoading;
1070
+ }, [isLoading]);
1071
+ const sentinelRef = React6__namespace.useCallback(
1072
+ (node) => {
1073
+ if (observerRef.current) {
1074
+ observerRef.current.disconnect();
1075
+ observerRef.current = null;
1076
+ }
1077
+ if (!node) return;
1078
+ observerRef.current = new IntersectionObserver(
1079
+ (entries) => {
1080
+ const entry = entries[0];
1081
+ if (entry?.isIntersecting && hasMoreRef.current && !isLoadingRef.current) {
1082
+ callbackRef.current();
1083
+ }
1084
+ },
1085
+ { rootMargin, threshold }
1086
+ );
1087
+ observerRef.current.observe(node);
1088
+ },
1089
+ [rootMargin, threshold]
1090
+ );
1091
+ React6__namespace.useEffect(() => {
1092
+ return () => {
1093
+ observerRef.current?.disconnect();
1094
+ };
1095
+ }, []);
1096
+ return { sentinelRef };
1097
+ }
1098
+ var spinnerVariants = classVarianceAuthority.cva("animate-spin text-muted-foreground", {
1099
+ variants: {
1100
+ size: {
1101
+ xs: "size-3",
1102
+ sm: "size-4",
1103
+ md: "size-5",
1104
+ lg: "size-6",
1105
+ xl: "size-8"
1106
+ }
1107
+ },
1108
+ defaultVariants: {
1109
+ size: "sm"
1110
+ }
1111
+ });
1112
+ var Spinner = React6__namespace.forwardRef(({ className, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1113
+ "span",
1114
+ {
1115
+ ref,
1116
+ "data-slot": "spinner",
1117
+ role: "status",
1118
+ "aria-label": "\u062F\u0631 \u062D\u0627\u0644 \u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC...",
1119
+ className: cn("inline-flex items-center justify-center", className),
1120
+ ...props,
1121
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: spinnerVariants({ size }), "aria-hidden": "true" })
1122
+ }
1123
+ ));
1124
+ Spinner.displayName = "Spinner";
1125
+ var noop = () => {
1126
+ };
1127
+ function DataTableInner({
1128
+ columns,
1129
+ data,
1130
+ size = "md",
1131
+ isLoading = false,
1132
+ loadingRows = 5,
1133
+ emptyState,
1134
+ pagination,
1135
+ sort,
1136
+ multiSort,
1137
+ footer = false,
1138
+ stickyFooter = true,
1139
+ onColumnResize,
1140
+ selection,
1141
+ columnVisibility,
1142
+ expansion,
1143
+ infiniteScroll,
1144
+ virtualize,
1145
+ striped = false,
1146
+ bordered = false,
1147
+ stickyHeader = false,
1148
+ className,
1149
+ caption,
1150
+ resultCount,
1151
+ locale = "fa"
1152
+ }, ref) {
1153
+ const t = getUIStrings(locale);
1154
+ const hasSelection = !!selection;
1155
+ const hasExpansion = !!expansion;
1156
+ const rtl = isRTL(locale);
1157
+ const visibleColumns = React6__namespace.useMemo(() => {
1158
+ return columns.filter((col) => {
1159
+ const explicit = columnVisibility?.visible[col.id];
1160
+ if (explicit !== void 0) return explicit;
1161
+ return col.defaultVisible !== false;
1162
+ });
1163
+ }, [columns, columnVisibility]);
1164
+ const allColumnCount = visibleColumns.length + (hasSelection ? 1 : 0) + (hasExpansion ? 1 : 0);
1165
+ const getRowKey = React6__namespace.useMemo(
1166
+ () => selection?.getRowKey ?? ((_, index) => index),
1167
+ [selection?.getRowKey]
1168
+ );
1169
+ const allRowKeys = React6__namespace.useMemo(() => data.map((row, i) => getRowKey(row, i)), [data, getRowKey]);
1170
+ const allSelected = hasSelection && data.length > 0 && allRowKeys.every((key) => selection.selectedRows.has(key));
1171
+ const someSelected = hasSelection && !allSelected && allRowKeys.some((key) => selection.selectedRows.has(key));
1172
+ const handleSelectAll = () => {
1173
+ if (!selection) return;
1174
+ if (allSelected) {
1175
+ selection.onSelectionChange(/* @__PURE__ */ new Set());
1176
+ } else {
1177
+ selection.onSelectionChange(new Set(allRowKeys));
1178
+ }
1179
+ };
1180
+ const handleSelectRow = (key) => {
1181
+ if (!selection) return;
1182
+ const next = new Set(selection.selectedRows);
1183
+ if (next.has(key)) {
1184
+ next.delete(key);
1185
+ } else {
1186
+ next.add(key);
1187
+ }
1188
+ selection.onSelectionChange(next);
1189
+ };
1190
+ const handleSort = (columnId, e) => {
1191
+ if (multiSort) {
1192
+ const isShift = !!e && "shiftKey" in e && e.shiftKey;
1193
+ const existing = multiSort.rules.find((r) => r.column === columnId);
1194
+ const maxRules = multiSort.maxRules ?? 3;
1195
+ let next;
1196
+ if (!isShift) {
1197
+ if (existing) {
1198
+ next = [{ column: columnId, direction: existing.direction === "asc" ? "desc" : "asc" }];
1199
+ } else {
1200
+ next = [{ column: columnId, direction: "asc" }];
1201
+ }
1202
+ } else {
1203
+ if (existing) {
1204
+ if (existing.direction === "asc") {
1205
+ next = multiSort.rules.map((r) => r.column === columnId ? { ...r, direction: "desc" } : r);
1206
+ } else {
1207
+ next = multiSort.rules.filter((r) => r.column !== columnId);
1208
+ }
1209
+ } else {
1210
+ next = [...multiSort.rules, { column: columnId, direction: "asc" }].slice(0, maxRules);
1211
+ }
1212
+ }
1213
+ multiSort.onSortChange(next);
1214
+ return;
1215
+ }
1216
+ if (!sort) return;
1217
+ const nextDirection = sort.column === columnId && sort.direction === "asc" ? "desc" : "asc";
1218
+ sort.onSort(columnId, nextDirection);
1219
+ };
1220
+ const getSortDir = (columnId) => {
1221
+ if (multiSort) {
1222
+ const rule = multiSort.rules.find((r) => r.column === columnId);
1223
+ return rule ? rule.direction : "none";
1224
+ }
1225
+ if (!sort || sort.column !== columnId || !sort.direction) return "none";
1226
+ return sort.direction;
1227
+ };
1228
+ const getSortPriority = (columnId) => {
1229
+ if (!multiSort) return 0;
1230
+ const idx = multiSort.rules.findIndex((r) => r.column === columnId);
1231
+ return idx === -1 ? 0 : idx + 1;
1232
+ };
1233
+ const alignClass = (align) => {
1234
+ if (align === "center") return "text-center";
1235
+ if (align === "end") return "text-end";
1236
+ return "text-start";
1237
+ };
1238
+ const pinClass = (pinned) => {
1239
+ if (!pinned) return "";
1240
+ const sideClass = pinned === "start" ? "sticky inset-inline-start-0 z-[1]" : "sticky inset-inline-end-0 z-[1]";
1241
+ return `${sideClass} bg-background`;
1242
+ };
1243
+ const handleToggleExpand = (rowKey) => {
1244
+ if (!expansion) return;
1245
+ const next = new Set(expansion.expandedRows);
1246
+ if (next.has(rowKey)) next.delete(rowKey);
1247
+ else next.add(rowKey);
1248
+ expansion.onExpandedRowsChange(next);
1249
+ };
1250
+ const [resizeWidths, setResizeWidths] = React6__namespace.useState({});
1251
+ const dragRef = React6__namespace.useRef(null);
1252
+ const startResize = React6__namespace.useCallback(
1253
+ (columnId, e) => {
1254
+ const col = columns.find((c) => c.id === columnId);
1255
+ if (!col) return;
1256
+ const headerCell = e.currentTarget.closest("th");
1257
+ const measured = headerCell?.getBoundingClientRect().width || 0;
1258
+ const startWidth = typeof col.width === "number" ? col.width : measured > 0 ? measured : 120;
1259
+ dragRef.current = {
1260
+ columnId,
1261
+ startX: e.clientX,
1262
+ startWidth,
1263
+ currentWidth: startWidth,
1264
+ minWidth: col.minWidth ?? 60,
1265
+ maxWidth: col.maxWidth ?? 800
1266
+ };
1267
+ e.currentTarget.setPointerCapture?.(e.pointerId);
1268
+ e.preventDefault();
1269
+ e.stopPropagation();
1270
+ },
1271
+ [columns]
1272
+ );
1273
+ const onResizePointerMove = React6__namespace.useCallback(
1274
+ (e) => {
1275
+ const drag = dragRef.current;
1276
+ if (!drag) return;
1277
+ const dx = (rtl ? -1 : 1) * (e.clientX - drag.startX);
1278
+ const next = Math.max(drag.minWidth, Math.min(drag.maxWidth, drag.startWidth + dx));
1279
+ drag.currentWidth = next;
1280
+ setResizeWidths((prev) => prev[drag.columnId] === next ? prev : { ...prev, [drag.columnId]: next });
1281
+ },
1282
+ [rtl]
1283
+ );
1284
+ const endResize = React6__namespace.useCallback(
1285
+ (e) => {
1286
+ const drag = dragRef.current;
1287
+ if (!drag) return;
1288
+ onColumnResize?.(drag.columnId, drag.currentWidth);
1289
+ dragRef.current = null;
1290
+ e.currentTarget.releasePointerCapture?.(e.pointerId);
1291
+ },
1292
+ [onColumnResize]
1293
+ );
1294
+ const getColumnWidth = (col) => {
1295
+ return resizeWidths[col.id] ?? col.width;
1296
+ };
1297
+ const handleResizeKeyDown = React6__namespace.useCallback(
1298
+ (columnId, e) => {
1299
+ const isArrowGrow = rtl ? e.key === "ArrowLeft" : e.key === "ArrowRight";
1300
+ const isArrowShrink = rtl ? e.key === "ArrowRight" : e.key === "ArrowLeft";
1301
+ if (!isArrowGrow && !isArrowShrink && e.key !== "Home" && e.key !== "End") return;
1302
+ const col = columns.find((c) => c.id === columnId);
1303
+ if (!col) return;
1304
+ const headerCell = e.currentTarget.closest("th");
1305
+ const measured = headerCell?.getBoundingClientRect().width || 0;
1306
+ const minWidth = col.minWidth ?? 60;
1307
+ const maxWidth = col.maxWidth ?? 800;
1308
+ const current = resizeWidths[columnId] ?? (typeof col.width === "number" ? col.width : measured > 0 ? measured : 120);
1309
+ const step = e.shiftKey ? 32 : 8;
1310
+ let next;
1311
+ if (e.key === "Home") next = minWidth;
1312
+ else if (e.key === "End") next = maxWidth;
1313
+ else if (isArrowGrow) next = Math.min(maxWidth, current + step);
1314
+ else next = Math.max(minWidth, current - step);
1315
+ e.preventDefault();
1316
+ setResizeWidths((prev) => prev[columnId] === next ? prev : { ...prev, [columnId]: next });
1317
+ onColumnResize?.(columnId, next);
1318
+ },
1319
+ [columns, resizeWidths, rtl, onColumnResize]
1320
+ );
1321
+ const { sentinelRef } = useInfiniteScroll({
1322
+ onLoadMore: infiniteScroll?.onLoadMore ?? noop,
1323
+ hasMore: !!infiniteScroll?.hasMore,
1324
+ isLoading: !!infiniteScroll?.isLoadingMore,
1325
+ rootMargin: infiniteScroll?.rootMargin ?? "200px"
1326
+ });
1327
+ const virtRowHeight = virtualize?.rowHeight ?? 0;
1328
+ const virtViewportHeight = virtualize?.viewportHeight ?? 480;
1329
+ const virtOverscan = virtualize?.overscan ?? 6;
1330
+ const virtScrollRef = React6__namespace.useRef(null);
1331
+ const [virtScrollTop, setVirtScrollTop] = React6__namespace.useState(0);
1332
+ const handleVirtScroll = React6__namespace.useCallback((e) => {
1333
+ setVirtScrollTop(e.currentTarget.scrollTop);
1334
+ }, []);
1335
+ const { virtStartIndex, virtEndIndex, virtTopSpacer, virtBottomSpacer } = React6__namespace.useMemo(() => {
1336
+ if (!virtualize || data.length === 0) {
1337
+ return { virtStartIndex: 0, virtEndIndex: data.length, virtTopSpacer: 0, virtBottomSpacer: 0 };
1338
+ }
1339
+ const start = Math.max(0, Math.floor(virtScrollTop / virtRowHeight) - virtOverscan);
1340
+ const visibleCount = Math.ceil(virtViewportHeight / virtRowHeight) + virtOverscan * 2;
1341
+ const end = Math.min(data.length, start + visibleCount);
1342
+ return {
1343
+ virtStartIndex: start,
1344
+ virtEndIndex: end,
1345
+ virtTopSpacer: start * virtRowHeight,
1346
+ virtBottomSpacer: (data.length - end) * virtRowHeight
1347
+ };
1348
+ }, [virtualize, data.length, virtScrollTop, virtRowHeight, virtViewportHeight, virtOverscan]);
1349
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, "data-slot": "data-table", className: cn("flex flex-col gap-4", className), children: [
1350
+ resultCount && /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "data-table-result-count", className: "text-sm text-foreground-muted", children: resultCount }),
1351
+ /* @__PURE__ */ jsxRuntime.jsx(
1352
+ "div",
1353
+ {
1354
+ ref: virtualize ? virtScrollRef : void 0,
1355
+ onScroll: virtualize ? handleVirtScroll : void 0,
1356
+ style: virtualize ? { maxHeight: virtViewportHeight, overflowY: "auto" } : void 0,
1357
+ "data-slot": virtualize ? "data-table-virtual-scroll" : void 0,
1358
+ children: /* @__PURE__ */ jsxRuntime.jsxs(Table, { size, striped, bordered, stickyHeader: stickyHeader || !!virtualize, children: [
1359
+ caption && /* @__PURE__ */ jsxRuntime.jsx("caption", { className: "text-foreground-muted mt-4 text-sm", children: caption }),
1360
+ /* @__PURE__ */ jsxRuntime.jsx(TableHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(TableRow, { children: [
1361
+ hasSelection && /* @__PURE__ */ jsxRuntime.jsx(TableHead, { className: cn("w-[40px]", pinClass("start")), children: /* @__PURE__ */ jsxRuntime.jsx(
1362
+ Checkbox,
1363
+ {
1364
+ checked: allSelected ? true : someSelected ? "indeterminate" : false,
1365
+ onCheckedChange: handleSelectAll,
1366
+ "aria-label": t.selectAll
1367
+ }
1368
+ ) }),
1369
+ hasExpansion && /* @__PURE__ */ jsxRuntime.jsx(TableHead, { className: cn("w-[36px]", pinClass("start")), "aria-hidden": "true" }),
1370
+ visibleColumns.map((col) => {
1371
+ const sortable = col.sortable && (sort || multiSort);
1372
+ const dir = sortable ? getSortDir(col.id) : "none";
1373
+ const priority = getSortPriority(col.id);
1374
+ const liveWidth = getColumnWidth(col);
1375
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1376
+ TableHead,
1377
+ {
1378
+ sortDirection: sortable ? dir : void 0,
1379
+ className: cn("relative", alignClass(col.align), pinClass(col.pinned), col.className),
1380
+ style: liveWidth ? { width: liveWidth } : void 0,
1381
+ children: [
1382
+ sortable ? /* @__PURE__ */ jsxRuntime.jsx(
1383
+ TableSortHeader,
1384
+ {
1385
+ sorted: dir === "none" ? false : dir,
1386
+ onClick: (e) => handleSort(col.id, e),
1387
+ children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex items-center gap-1.5", children: [
1388
+ col.header,
1389
+ priority > 0 && multiSort && multiSort.rules.length > 1 && /* @__PURE__ */ jsxRuntime.jsx(
1390
+ "span",
1391
+ {
1392
+ "data-slot": "data-table-sort-priority",
1393
+ className: "inline-flex h-4 min-w-4 items-center justify-center rounded bg-overlay-active px-1 text-[10px] font-medium tabular-nums text-foreground-light",
1394
+ "aria-label": `\u0627\u0648\u0644\u0648\u06CC\u062A \u0645\u0631\u062A\u0628\u200C\u0633\u0627\u0632\u06CC ${priority}`,
1395
+ children: priority
1396
+ }
1397
+ )
1398
+ ] })
1399
+ }
1400
+ ) : col.header,
1401
+ col.resizable && // role="separator" + tabIndex + ArrowKey handler is the
1402
+ // WAI-ARIA windowsplitter pattern (resizable separator).
1403
+ // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
1404
+ /* @__PURE__ */ jsxRuntime.jsx(
1405
+ "div",
1406
+ {
1407
+ "data-slot": "data-table-resize-handle",
1408
+ role: "separator",
1409
+ "aria-orientation": "vertical",
1410
+ "aria-label": "\u062A\u063A\u06CC\u06CC\u0631 \u0627\u0646\u062F\u0627\u0632\u0647 \u0633\u062A\u0648\u0646",
1411
+ tabIndex: 0,
1412
+ "aria-valuenow": getColumnWidth(col),
1413
+ "aria-valuemin": col.minWidth ?? 60,
1414
+ "aria-valuemax": col.maxWidth ?? 800,
1415
+ onKeyDown: (e) => handleResizeKeyDown(col.id, e),
1416
+ onPointerDown: (e) => startResize(col.id, e),
1417
+ onPointerMove: onResizePointerMove,
1418
+ onPointerUp: endResize,
1419
+ onPointerCancel: endResize,
1420
+ className: cn(
1421
+ "absolute inset-block-0 inset-inline-end-0 w-1.5 cursor-col-resize select-none touch-none",
1422
+ "before:absolute before:inset-block-2 before:inset-inline-1/2 before:w-px before:-translate-x-1/2 before:bg-border-default before:opacity-0 before:transition-opacity",
1423
+ "hover:before:opacity-100 focus:before:opacity-100 focus-visible:outline-none focus-visible:before:!bg-brand focus-visible:before:opacity-100",
1424
+ dragRef.current?.columnId === col.id && "before:!bg-brand before:opacity-100"
1425
+ )
1426
+ }
1427
+ )
1428
+ ]
1429
+ },
1430
+ col.id
1431
+ );
1432
+ })
1433
+ ] }) }),
1434
+ /* @__PURE__ */ jsxRuntime.jsxs(TableBody, { children: [
1435
+ virtualize && !isLoading && data.length > 0 && virtTopSpacer > 0 && /* @__PURE__ */ jsxRuntime.jsx("tr", { "aria-hidden": "true", "data-slot": "data-table-virtual-spacer-top", children: /* @__PURE__ */ jsxRuntime.jsx("td", { colSpan: allColumnCount, style: { height: virtTopSpacer, padding: 0 } }) }),
1436
+ isLoading ? Array.from({ length: loadingRows }).map((_, rowIdx) => /* @__PURE__ */ jsxRuntime.jsxs(TableRow, { children: [
1437
+ hasSelection && /* @__PURE__ */ jsxRuntime.jsx(TableCell, { className: pinClass("start"), children: /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-4 w-4" }) }),
1438
+ hasExpansion && /* @__PURE__ */ jsxRuntime.jsx(TableCell, { className: pinClass("start"), children: /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-4 w-4" }) }),
1439
+ visibleColumns.map((col) => {
1440
+ const liveWidth = getColumnWidth(col);
1441
+ return /* @__PURE__ */ jsxRuntime.jsx(
1442
+ TableCell,
1443
+ {
1444
+ className: cn(alignClass(col.align), pinClass(col.pinned), col.className),
1445
+ style: liveWidth ? { width: liveWidth } : void 0,
1446
+ children: /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-4 w-full max-w-[120px]" })
1447
+ },
1448
+ col.id
1449
+ );
1450
+ })
1451
+ ] }, `skeleton-${rowIdx}`)) : data.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(TableRow, { children: /* @__PURE__ */ jsxRuntime.jsx(TableCell, { colSpan: allColumnCount, children: emptyState || /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center py-10 text-foreground-muted text-sm", children: t.noDataToDisplay }) }) }) : (virtualize ? data.slice(virtStartIndex, virtEndIndex) : data).map((row, sliceIdx) => {
1452
+ const rowIdx = virtualize ? virtStartIndex + sliceIdx : sliceIdx;
1453
+ const rowKey = getRowKey(row, rowIdx);
1454
+ const isSelected = hasSelection && selection.selectedRows.has(rowKey);
1455
+ const isExpanded = hasExpansion && expansion.expandedRows.has(rowKey);
1456
+ const ChevronIcon = lucideReact.ChevronRight;
1457
+ return /* @__PURE__ */ jsxRuntime.jsxs(React6__namespace.Fragment, { children: [
1458
+ /* @__PURE__ */ jsxRuntime.jsxs(TableRow, { "data-state": isSelected ? "selected" : void 0, children: [
1459
+ hasSelection && /* @__PURE__ */ jsxRuntime.jsx(TableCell, { className: pinClass("start"), children: /* @__PURE__ */ jsxRuntime.jsx(
1460
+ Checkbox,
1461
+ {
1462
+ checked: isSelected,
1463
+ onCheckedChange: () => handleSelectRow(rowKey),
1464
+ "aria-label": `${t.selectRow} ${(rowIdx + 1).toLocaleString(locale === "fa" ? "fa-IR" : locale === "ar" ? "ar-SA" : "en-US")}`
1465
+ }
1466
+ ) }),
1467
+ hasExpansion && /* @__PURE__ */ jsxRuntime.jsx(TableCell, { className: pinClass("start"), children: /* @__PURE__ */ jsxRuntime.jsx(
1468
+ "button",
1469
+ {
1470
+ type: "button",
1471
+ "aria-label": isExpanded ? "collapse" : "expand",
1472
+ "aria-expanded": isExpanded,
1473
+ onClick: () => handleToggleExpand(rowKey),
1474
+ className: "inline-flex size-6 items-center justify-center rounded text-foreground-lighter hover:bg-surface-100 hover:text-foreground transition-colors",
1475
+ children: isExpanded ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "size-4", "aria-hidden": "true" }) : /* @__PURE__ */ jsxRuntime.jsx(ChevronIcon, { className: cn("size-4", rtl && "rotate-180"), "aria-hidden": "true" })
1476
+ }
1477
+ ) }),
1478
+ visibleColumns.map((col) => {
1479
+ const liveWidth = getColumnWidth(col);
1480
+ return /* @__PURE__ */ jsxRuntime.jsx(
1481
+ TableCell,
1482
+ {
1483
+ className: cn(alignClass(col.align), pinClass(col.pinned), col.className),
1484
+ style: liveWidth ? { width: liveWidth } : void 0,
1485
+ children: col.cell(row, rowIdx)
1486
+ },
1487
+ col.id
1488
+ );
1489
+ })
1490
+ ] }),
1491
+ hasExpansion && isExpanded && /* @__PURE__ */ jsxRuntime.jsx(TableRow, { "data-slot": "data-table-expanded-row", children: /* @__PURE__ */ jsxRuntime.jsx(TableCell, { colSpan: allColumnCount, className: "bg-surface-100/50 border-t-0", children: expansion.renderExpandedRow(row, rowIdx) }) })
1492
+ ] }, rowKey);
1493
+ }),
1494
+ virtualize && !isLoading && data.length > 0 && virtBottomSpacer > 0 && /* @__PURE__ */ jsxRuntime.jsx("tr", { "aria-hidden": "true", "data-slot": "data-table-virtual-spacer-bottom", children: /* @__PURE__ */ jsxRuntime.jsx("td", { colSpan: allColumnCount, style: { height: virtBottomSpacer, padding: 0 } }) }),
1495
+ infiniteScroll && !isLoading && data.length > 0 && infiniteScroll.hasMore && /* @__PURE__ */ jsxRuntime.jsx("tr", { "data-slot": "data-table-infinite-sentinel", "aria-hidden": !infiniteScroll.isLoadingMore, children: /* @__PURE__ */ jsxRuntime.jsx(
1496
+ "td",
1497
+ {
1498
+ ref: sentinelRef,
1499
+ colSpan: allColumnCount,
1500
+ className: "border-0",
1501
+ children: infiniteScroll.isLoadingMore ? infiniteScroll.loadingMoreContent ?? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-2 py-3 text-sm text-foreground-lighter", children: [
1502
+ /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: "sm" }),
1503
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: t.loading ?? "\u062F\u0631 \u062D\u0627\u0644 \u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC" })
1504
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { "aria-hidden": "true", className: "h-px" })
1505
+ }
1506
+ ) }),
1507
+ infiniteScroll && !isLoading && data.length > 0 && !infiniteScroll.hasMore && infiniteScroll.endContent && /* @__PURE__ */ jsxRuntime.jsx("tr", { "data-slot": "data-table-infinite-end", children: /* @__PURE__ */ jsxRuntime.jsx("td", { colSpan: allColumnCount, className: "border-0 py-3 text-center text-xs text-foreground-lighter", children: infiniteScroll.endContent }) })
1508
+ ] }),
1509
+ footer && visibleColumns.some((c) => !!c.footer) && !isLoading && data.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
1510
+ "tfoot",
1511
+ {
1512
+ "data-slot": "data-table-footer",
1513
+ "data-sticky": stickyFooter || void 0,
1514
+ className: cn(
1515
+ "bg-surface-75 border-t border-border-default font-medium",
1516
+ stickyFooter && "[&>tr>td]:sticky [&>tr>td]:inset-block-end-0 [&>tr>td]:bg-surface-75 [&>tr>td]:z-[8]"
1517
+ ),
1518
+ children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
1519
+ hasSelection && /* @__PURE__ */ jsxRuntime.jsx("td", { className: pinClass("start"), "aria-hidden": "true" }),
1520
+ hasExpansion && /* @__PURE__ */ jsxRuntime.jsx("td", { className: pinClass("start"), "aria-hidden": "true" }),
1521
+ visibleColumns.map((col) => {
1522
+ const liveWidth = getColumnWidth(col);
1523
+ return /* @__PURE__ */ jsxRuntime.jsx(
1524
+ "td",
1525
+ {
1526
+ className: cn(
1527
+ alignClass(col.align),
1528
+ pinClass(col.pinned),
1529
+ col.className,
1530
+ "[[data-size=sm]_&]:px-2 [[data-size=sm]_&]:py-1.5 [[data-size=sm]_&]:text-xs",
1531
+ "[[data-size=md]_&]:px-3 [[data-size=md]_&]:py-2 [[data-size=md]_&]:text-sm",
1532
+ "[[data-size=lg]_&]:px-4 [[data-size=lg]_&]:py-3 [[data-size=lg]_&]:text-base"
1533
+ ),
1534
+ style: liveWidth ? { width: liveWidth } : void 0,
1535
+ children: col.footer ? col.footer() : null
1536
+ },
1537
+ col.id
1538
+ );
1539
+ })
1540
+ ] })
1541
+ }
1542
+ )
1543
+ ] })
1544
+ }
1545
+ ),
1546
+ pagination && pagination.totalPages > 1 && /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "data-table-pagination", className: "flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
1547
+ PaginationControlled,
1548
+ {
1549
+ currentPage: pagination.currentPage,
1550
+ totalPages: pagination.totalPages,
1551
+ onPageChange: pagination.onPageChange
1552
+ }
1553
+ ) })
1554
+ ] });
1555
+ }
1556
+ var DataTable = React6__namespace.forwardRef(DataTableInner);
1557
+ DataTable.displayName = "DataTable";
1558
+
1559
+ exports.DataTable = DataTable;
17
1560
  //# sourceMappingURL=data-table.cjs.map
18
1561
  //# sourceMappingURL=data-table.cjs.map