@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,982 +0,0 @@
1
- 'use strict';
2
-
3
- var chunkMMC6M35Q_cjs = require('./chunk-MMC6M35Q.cjs');
4
- var chunkCAJKSTXX_cjs = require('./chunk-CAJKSTXX.cjs');
5
- var chunkD2EBLE2B_cjs = require('./chunk-D2EBLE2B.cjs');
6
- var chunkZ2TY4A75_cjs = require('./chunk-Z2TY4A75.cjs');
7
- var chunkNV4JOKWL_cjs = require('./chunk-NV4JOKWL.cjs');
8
- var React5 = require('react');
9
- var lucideReact = require('lucide-react');
10
- var jsxRuntime = require('react/jsx-runtime');
11
- var classVarianceAuthority = require('class-variance-authority');
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
- }
30
-
31
- var React5__namespace = /*#__PURE__*/_interopNamespace(React5);
32
-
33
- function Table({
34
- className,
35
- size = "md",
36
- striped = false,
37
- bordered = false,
38
- stickyHeader = false,
39
- ...props
40
- }) {
41
- return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "table-container", className: "relative w-full overflow-x-auto", children: /* @__PURE__ */ jsxRuntime.jsx(
42
- "table",
43
- {
44
- "data-slot": "table",
45
- "data-size": size,
46
- "data-striped": striped || void 0,
47
- "data-bordered": bordered || void 0,
48
- "data-sticky-header": stickyHeader || void 0,
49
- className: chunkNV4JOKWL_cjs.cn("w-full caption-bottom", className),
50
- ...props
51
- }
52
- ) });
53
- }
54
- function TableHeader({ className, ...props }) {
55
- return /* @__PURE__ */ jsxRuntime.jsx(
56
- "thead",
57
- {
58
- "data-slot": "table-header",
59
- className: chunkNV4JOKWL_cjs.cn(
60
- "[&_tr]:border-b bg-surface-75",
61
- "[[data-sticky-header]_&]:sticky [[data-sticky-header]_&]:top-0 [[data-sticky-header]_&]:z-[9] [[data-sticky-header]_&]:bg-surface-75",
62
- className
63
- ),
64
- ...props
65
- }
66
- );
67
- }
68
- function TableBody({ className, ...props }) {
69
- return /* @__PURE__ */ jsxRuntime.jsx(
70
- "tbody",
71
- {
72
- "data-slot": "table-body",
73
- className: chunkNV4JOKWL_cjs.cn(
74
- "[&_tr:last-child]:border-0",
75
- "[[data-striped]_&_tr:nth-child(even)]:bg-surface-75 [[data-striped]_&_tr:nth-child(even):hover]:bg-surface-200",
76
- className
77
- ),
78
- ...props
79
- }
80
- );
81
- }
82
- function TableFooter({ className, ...props }) {
83
- return /* @__PURE__ */ jsxRuntime.jsx(
84
- "tfoot",
85
- {
86
- "data-slot": "table-footer",
87
- className: chunkNV4JOKWL_cjs.cn("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0", className),
88
- ...props
89
- }
90
- );
91
- }
92
- function TableRow({ className, ...props }) {
93
- return /* @__PURE__ */ jsxRuntime.jsx(
94
- "tr",
95
- {
96
- "data-slot": "table-row",
97
- className: chunkNV4JOKWL_cjs.cn("hover:bg-surface-200 data-[state=selected]:bg-selection border-b transition-colors", className),
98
- ...props
99
- }
100
- );
101
- }
102
- function TableHead({ className, sortDirection, ...props }) {
103
- const ariaSort = sortDirection === "asc" ? "ascending" : sortDirection === "desc" ? "descending" : sortDirection === "none" ? "none" : void 0;
104
- return /* @__PURE__ */ jsxRuntime.jsx(
105
- "th",
106
- {
107
- "data-slot": "table-head",
108
- "aria-sort": ariaSort,
109
- className: chunkNV4JOKWL_cjs.cn(
110
- "text-foreground-lighter text-start align-middle font-semibold whitespace-nowrap [&:has([role=checkbox])]:pe-0 [&>[role=checkbox]]:translate-y-[2px]",
111
- // Size variants (inherited from parent table)
112
- "[[data-size=sm]_&]:h-8 [[data-size=sm]_&]:px-2 [[data-size=sm]_&]:text-xs",
113
- "[[data-size=md]_&]:h-10 [[data-size=md]_&]:px-3 [[data-size=md]_&]:text-sm",
114
- "[[data-size=lg]_&]:h-12 [[data-size=lg]_&]:px-4 [[data-size=lg]_&]:text-base",
115
- // Bordered variant
116
- "[[data-bordered]_&]:border [[data-bordered]_&]:border-border",
117
- className
118
- ),
119
- ...props
120
- }
121
- );
122
- }
123
- function TableCell({ className, ...props }) {
124
- return /* @__PURE__ */ jsxRuntime.jsx(
125
- "td",
126
- {
127
- "data-slot": "table-cell",
128
- className: chunkNV4JOKWL_cjs.cn(
129
- "align-middle whitespace-nowrap [&:has([role=checkbox])]:pe-0 [&>[role=checkbox]]:translate-y-[2px]",
130
- // Size variants (inherited from parent table)
131
- "[[data-size=sm]_&]:px-2 [[data-size=sm]_&]:py-1.5 [[data-size=sm]_&]:text-xs",
132
- "[[data-size=md]_&]:px-3 [[data-size=md]_&]:py-2 [[data-size=md]_&]:text-sm",
133
- "[[data-size=lg]_&]:px-4 [[data-size=lg]_&]:py-3 [[data-size=lg]_&]:text-base",
134
- // Bordered variant
135
- "[[data-bordered]_&]:border [[data-bordered]_&]:border-border",
136
- className
137
- ),
138
- ...props
139
- }
140
- );
141
- }
142
- function TableCaption({ className, ...props }) {
143
- return /* @__PURE__ */ jsxRuntime.jsx("caption", { "data-slot": "table-caption", className: chunkNV4JOKWL_cjs.cn("text-foreground-muted mt-4 text-sm", className), ...props });
144
- }
145
- function TableSortHeader({ className, children, sorted, ...props }) {
146
- return /* @__PURE__ */ jsxRuntime.jsxs(
147
- "button",
148
- {
149
- "data-slot": "table-sort-header",
150
- className: chunkNV4JOKWL_cjs.cn(
151
- "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",
152
- sorted && "text-foreground",
153
- className
154
- ),
155
- ...props,
156
- children: [
157
- children,
158
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex flex-col -space-y-0.5", children: [
159
- /* @__PURE__ */ jsxRuntime.jsx(
160
- "svg",
161
- {
162
- width: "8",
163
- height: "5",
164
- viewBox: "0 0 8 5",
165
- className: chunkNV4JOKWL_cjs.cn("transition-colors", sorted === "asc" ? "text-foreground" : "text-foreground-muted"),
166
- children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M4 0L8 5H0L4 0Z", fill: "currentColor" })
167
- }
168
- ),
169
- /* @__PURE__ */ jsxRuntime.jsx(
170
- "svg",
171
- {
172
- width: "8",
173
- height: "5",
174
- viewBox: "0 0 8 5",
175
- className: chunkNV4JOKWL_cjs.cn("transition-colors", sorted === "desc" ? "text-foreground" : "text-foreground-muted"),
176
- children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M4 5L0 0H8L4 5Z", fill: "currentColor" })
177
- }
178
- )
179
- ] })
180
- ]
181
- }
182
- );
183
- }
184
- Table.displayName = "Table";
185
- TableHeader.displayName = "TableHeader";
186
- TableBody.displayName = "TableBody";
187
- TableFooter.displayName = "TableFooter";
188
- TableHead.displayName = "TableHead";
189
- TableRow.displayName = "TableRow";
190
- TableCell.displayName = "TableCell";
191
- TableCaption.displayName = "TableCaption";
192
- TableSortHeader.displayName = "TableSortHeader";
193
- var PaginationDirectionContext = React5__namespace.createContext("rtl");
194
- function usePaginationDirection() {
195
- return React5__namespace.useContext(PaginationDirectionContext);
196
- }
197
- function Pagination({ className, dir, children, ...props }) {
198
- const resolvedDir = dir ?? "rtl";
199
- return /* @__PURE__ */ jsxRuntime.jsx(PaginationDirectionContext.Provider, { value: resolvedDir, children: /* @__PURE__ */ jsxRuntime.jsx(
200
- "nav",
201
- {
202
- role: "navigation",
203
- "aria-label": "pagination",
204
- "data-slot": "pagination",
205
- dir: resolvedDir,
206
- className: chunkNV4JOKWL_cjs.cn("mx-auto flex w-full justify-center not-prose", className),
207
- ...props,
208
- children
209
- }
210
- ) });
211
- }
212
- function PaginationContent({ className, ...props }) {
213
- const dir = usePaginationDirection();
214
- return /* @__PURE__ */ jsxRuntime.jsx(
215
- "ul",
216
- {
217
- "data-slot": "pagination-content",
218
- dir,
219
- className: chunkNV4JOKWL_cjs.cn("flex flex-row items-center gap-1 list-none", className),
220
- ...props
221
- }
222
- );
223
- }
224
- function PaginationItem({ ...props }) {
225
- return /* @__PURE__ */ jsxRuntime.jsx("li", { "data-slot": "pagination-item", ...props });
226
- }
227
- function PaginationLink({ className, isActive, size = "icon", dir, ...props }) {
228
- const contextDir = usePaginationDirection();
229
- const linkDir = dir ?? (contextDir === "rtl" ? "rtl" : "ltr");
230
- return /* @__PURE__ */ jsxRuntime.jsx(
231
- "a",
232
- {
233
- "aria-current": isActive ? "page" : void 0,
234
- "data-slot": "pagination-link",
235
- "data-active": isActive,
236
- dir: linkDir,
237
- className: chunkNV4JOKWL_cjs.cn(
238
- chunkMMC6M35Q_cjs.buttonVariants({
239
- variant: "outline",
240
- size
241
- }),
242
- // Remove underline from links
243
- "no-underline",
244
- // Active state styling with green color
245
- isActive && [
246
- "border-brand-500 bg-brand/10 text-brand-600",
247
- "dark:border-brand-600 dark:bg-brand/10 dark:text-brand-400",
248
- "pointer-events-none"
249
- ],
250
- className
251
- ),
252
- ...props
253
- }
254
- );
255
- }
256
- function PaginationPrevious({ className, ...props }) {
257
- const dir = usePaginationDirection();
258
- const isRTL2 = dir === "rtl";
259
- const strings = chunkZ2TY4A75_cjs.getUIStrings(isRTL2 ? "fa" : "en");
260
- const Icon = isRTL2 ? lucideReact.ChevronRightIcon : lucideReact.ChevronLeftIcon;
261
- return /* @__PURE__ */ jsxRuntime.jsxs(
262
- PaginationLink,
263
- {
264
- "aria-label": strings.goToPreviousPage,
265
- size: "default",
266
- className: chunkNV4JOKWL_cjs.cn("gap-1 ps-2.5 pe-2.5 no-underline flex items-center", className),
267
- dir: "ltr",
268
- ...props,
269
- children: [
270
- /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "size-4" }),
271
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden sm:inline no-underline", children: strings.previous })
272
- ]
273
- }
274
- );
275
- }
276
- function PaginationNext({ className, ...props }) {
277
- const dir = usePaginationDirection();
278
- const isRTL2 = dir === "rtl";
279
- const strings = chunkZ2TY4A75_cjs.getUIStrings(isRTL2 ? "fa" : "en");
280
- const Icon = isRTL2 ? lucideReact.ChevronLeftIcon : lucideReact.ChevronRightIcon;
281
- return /* @__PURE__ */ jsxRuntime.jsx(
282
- PaginationLink,
283
- {
284
- "aria-label": strings.goToNextPage,
285
- size: "default",
286
- className: chunkNV4JOKWL_cjs.cn("gap-1 ps-2.5 pe-2.5 no-underline flex items-center", className),
287
- dir: "ltr",
288
- ...props,
289
- children: isRTL2 ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
290
- /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "size-4" }),
291
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden sm:inline no-underline", children: strings.next })
292
- ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
293
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden sm:inline no-underline", children: strings.next }),
294
- /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "size-4" })
295
- ] })
296
- }
297
- );
298
- }
299
- function PaginationEllipsis({ className, ...props }) {
300
- return /* @__PURE__ */ jsxRuntime.jsxs(
301
- "span",
302
- {
303
- "aria-hidden": true,
304
- "data-slot": "pagination-ellipsis",
305
- className: chunkNV4JOKWL_cjs.cn("flex size-9 items-center justify-center", className),
306
- ...props,
307
- children: [
308
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MoreHorizontalIcon, { className: "size-4" }),
309
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "More pages" })
310
- ]
311
- }
312
- );
313
- }
314
- Pagination.displayName = "Pagination";
315
- PaginationContent.displayName = "PaginationContent";
316
- PaginationItem.displayName = "PaginationItem";
317
- PaginationLink.displayName = "PaginationLink";
318
- PaginationPrevious.displayName = "PaginationPrevious";
319
- PaginationNext.displayName = "PaginationNext";
320
- PaginationEllipsis.displayName = "PaginationEllipsis";
321
- var PaginationControlled = React5__namespace.forwardRef(
322
- ({
323
- currentPage,
324
- totalPages,
325
- onPageChange,
326
- siblingCount = 1,
327
- showFirstLast = false,
328
- showPrevNext = true,
329
- showEllipsis = true,
330
- className,
331
- locale = "fa"
332
- }, ref) => {
333
- const isRTL2 = locale === "fa" || locale === "ar";
334
- const localizeNumber = (n) => chunkNV4JOKWL_cjs.convertToLocalNumbers(String(n), locale);
335
- const handlePageChange = (page) => {
336
- if (page >= 1 && page <= totalPages && page !== currentPage) {
337
- onPageChange(page);
338
- }
339
- };
340
- const generatePageNumbers = () => {
341
- const pages = [];
342
- const totalNumbers = siblingCount * 2 + 5;
343
- const totalBlocks = totalNumbers + 2;
344
- if (totalPages <= totalBlocks) {
345
- for (let i = 1; i <= totalPages; i++) {
346
- pages.push(i);
347
- }
348
- } else {
349
- const leftSiblingIndex = Math.max(currentPage - siblingCount, 1);
350
- const rightSiblingIndex = Math.min(currentPage + siblingCount, totalPages);
351
- const shouldShowLeftEllipsis = leftSiblingIndex > 2;
352
- const shouldShowRightEllipsis = rightSiblingIndex < totalPages - 1;
353
- if (!shouldShowLeftEllipsis && shouldShowRightEllipsis) {
354
- const leftItemCount = 3 + 2 * siblingCount;
355
- const leftRange = [];
356
- for (let i = 1; i <= leftItemCount; i++) {
357
- leftRange.push(i);
358
- }
359
- pages.push(...leftRange);
360
- if (showEllipsis) pages.push("ellipsis");
361
- pages.push(totalPages);
362
- } else if (shouldShowLeftEllipsis && !shouldShowRightEllipsis) {
363
- pages.push(1);
364
- if (showEllipsis) pages.push("ellipsis");
365
- const rightItemCount = 3 + 2 * siblingCount;
366
- const rightRange = [];
367
- for (let i = totalPages - rightItemCount + 1; i <= totalPages; i++) {
368
- rightRange.push(i);
369
- }
370
- pages.push(...rightRange);
371
- } else if (shouldShowLeftEllipsis && shouldShowRightEllipsis) {
372
- pages.push(1);
373
- if (showEllipsis) pages.push("ellipsis");
374
- for (let i = leftSiblingIndex; i <= rightSiblingIndex; i++) {
375
- pages.push(i);
376
- }
377
- if (showEllipsis) pages.push("ellipsis");
378
- pages.push(totalPages);
379
- }
380
- }
381
- return pages;
382
- };
383
- const pageNumbers = generatePageNumbers();
384
- const showFirstButton = showFirstLast && !pageNumbers.includes(1) && currentPage > 1;
385
- const showLastButton = showFirstLast && !pageNumbers.includes(totalPages) && currentPage < totalPages;
386
- return /* @__PURE__ */ jsxRuntime.jsx(Pagination, { ref, "data-slot": "pagination-controlled", className: chunkNV4JOKWL_cjs.cn(className), dir: isRTL2 ? "rtl" : "ltr", children: /* @__PURE__ */ jsxRuntime.jsxs(PaginationContent, { children: [
387
- showFirstButton && /* @__PURE__ */ jsxRuntime.jsx(PaginationItem, { children: /* @__PURE__ */ jsxRuntime.jsx(
388
- PaginationLink,
389
- {
390
- href: "#",
391
- onClick: (e) => {
392
- e.preventDefault();
393
- handlePageChange(1);
394
- },
395
- children: localizeNumber(1)
396
- }
397
- ) }),
398
- showPrevNext && /* @__PURE__ */ jsxRuntime.jsx(PaginationItem, { children: /* @__PURE__ */ jsxRuntime.jsx(
399
- PaginationPrevious,
400
- {
401
- href: "#",
402
- onClick: (e) => {
403
- e.preventDefault();
404
- handlePageChange(currentPage - 1);
405
- },
406
- className: currentPage === 1 ? "pointer-events-none opacity-50" : ""
407
- }
408
- ) }),
409
- pageNumbers.map((page, index) => {
410
- if (page === "ellipsis") {
411
- return /* @__PURE__ */ jsxRuntime.jsx(PaginationItem, { children: /* @__PURE__ */ jsxRuntime.jsx(PaginationEllipsis, {}) }, `ellipsis-${index}`);
412
- }
413
- return /* @__PURE__ */ jsxRuntime.jsx(PaginationItem, { children: /* @__PURE__ */ jsxRuntime.jsx(
414
- PaginationLink,
415
- {
416
- href: "#",
417
- isActive: page === currentPage,
418
- onClick: (e) => {
419
- e.preventDefault();
420
- handlePageChange(page);
421
- },
422
- children: localizeNumber(page)
423
- }
424
- ) }, page);
425
- }),
426
- showPrevNext && /* @__PURE__ */ jsxRuntime.jsx(PaginationItem, { children: /* @__PURE__ */ jsxRuntime.jsx(
427
- PaginationNext,
428
- {
429
- href: "#",
430
- onClick: (e) => {
431
- e.preventDefault();
432
- handlePageChange(currentPage + 1);
433
- },
434
- className: currentPage === totalPages ? "pointer-events-none opacity-50" : ""
435
- }
436
- ) }),
437
- showLastButton && /* @__PURE__ */ jsxRuntime.jsx(PaginationItem, { children: /* @__PURE__ */ jsxRuntime.jsx(
438
- PaginationLink,
439
- {
440
- href: "#",
441
- onClick: (e) => {
442
- e.preventDefault();
443
- handlePageChange(totalPages);
444
- },
445
- children: localizeNumber(totalPages)
446
- }
447
- ) })
448
- ] }) });
449
- }
450
- );
451
- PaginationControlled.displayName = "PaginationControlled";
452
- function useInfiniteScroll({
453
- onLoadMore,
454
- hasMore,
455
- isLoading = false,
456
- rootMargin = "200px",
457
- threshold = 0
458
- }) {
459
- const observerRef = React5__namespace.useRef(null);
460
- const callbackRef = React5__namespace.useRef(onLoadMore);
461
- React5__namespace.useEffect(() => {
462
- callbackRef.current = onLoadMore;
463
- }, [onLoadMore]);
464
- const hasMoreRef = React5__namespace.useRef(hasMore);
465
- React5__namespace.useEffect(() => {
466
- hasMoreRef.current = hasMore;
467
- }, [hasMore]);
468
- const isLoadingRef = React5__namespace.useRef(isLoading);
469
- React5__namespace.useEffect(() => {
470
- isLoadingRef.current = isLoading;
471
- }, [isLoading]);
472
- const sentinelRef = React5__namespace.useCallback(
473
- (node) => {
474
- if (observerRef.current) {
475
- observerRef.current.disconnect();
476
- observerRef.current = null;
477
- }
478
- if (!node) return;
479
- observerRef.current = new IntersectionObserver(
480
- (entries) => {
481
- const entry = entries[0];
482
- if (entry?.isIntersecting && hasMoreRef.current && !isLoadingRef.current) {
483
- callbackRef.current();
484
- }
485
- },
486
- { rootMargin, threshold }
487
- );
488
- observerRef.current.observe(node);
489
- },
490
- [rootMargin, threshold]
491
- );
492
- React5__namespace.useEffect(() => {
493
- return () => {
494
- observerRef.current?.disconnect();
495
- };
496
- }, []);
497
- return { sentinelRef };
498
- }
499
- var spinnerVariants = classVarianceAuthority.cva("animate-spin text-muted-foreground", {
500
- variants: {
501
- size: {
502
- xs: "size-3",
503
- sm: "size-4",
504
- md: "size-5",
505
- lg: "size-6",
506
- xl: "size-8"
507
- }
508
- },
509
- defaultVariants: {
510
- size: "sm"
511
- }
512
- });
513
- var Spinner = React5__namespace.forwardRef(({ className, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
514
- "span",
515
- {
516
- ref,
517
- "data-slot": "spinner",
518
- role: "status",
519
- "aria-label": "\u062F\u0631 \u062D\u0627\u0644 \u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC...",
520
- className: chunkNV4JOKWL_cjs.cn("inline-flex items-center justify-center", className),
521
- ...props,
522
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: spinnerVariants({ size }), "aria-hidden": "true" })
523
- }
524
- ));
525
- Spinner.displayName = "Spinner";
526
- var noop = () => {
527
- };
528
- function DataTableInner({
529
- columns,
530
- data,
531
- size = "md",
532
- isLoading = false,
533
- loadingRows = 5,
534
- emptyState,
535
- pagination,
536
- sort,
537
- multiSort,
538
- footer = false,
539
- stickyFooter = true,
540
- onColumnResize,
541
- selection,
542
- columnVisibility,
543
- expansion,
544
- infiniteScroll,
545
- virtualize,
546
- striped = false,
547
- bordered = false,
548
- stickyHeader = false,
549
- className,
550
- caption,
551
- resultCount,
552
- locale = "fa"
553
- }, ref) {
554
- const t = chunkZ2TY4A75_cjs.getUIStrings(locale);
555
- const hasSelection = !!selection;
556
- const hasExpansion = !!expansion;
557
- const rtl = chunkZ2TY4A75_cjs.isRTL(locale);
558
- const visibleColumns = React5__namespace.useMemo(() => {
559
- return columns.filter((col) => {
560
- const explicit = columnVisibility?.visible[col.id];
561
- if (explicit !== void 0) return explicit;
562
- return col.defaultVisible !== false;
563
- });
564
- }, [columns, columnVisibility]);
565
- const allColumnCount = visibleColumns.length + (hasSelection ? 1 : 0) + (hasExpansion ? 1 : 0);
566
- const getRowKey = React5__namespace.useMemo(
567
- () => selection?.getRowKey ?? ((_, index) => index),
568
- [selection?.getRowKey]
569
- );
570
- const allRowKeys = React5__namespace.useMemo(() => data.map((row, i) => getRowKey(row, i)), [data, getRowKey]);
571
- const allSelected = hasSelection && data.length > 0 && allRowKeys.every((key) => selection.selectedRows.has(key));
572
- const someSelected = hasSelection && !allSelected && allRowKeys.some((key) => selection.selectedRows.has(key));
573
- const handleSelectAll = () => {
574
- if (!selection) return;
575
- if (allSelected) {
576
- selection.onSelectionChange(/* @__PURE__ */ new Set());
577
- } else {
578
- selection.onSelectionChange(new Set(allRowKeys));
579
- }
580
- };
581
- const handleSelectRow = (key) => {
582
- if (!selection) return;
583
- const next = new Set(selection.selectedRows);
584
- if (next.has(key)) {
585
- next.delete(key);
586
- } else {
587
- next.add(key);
588
- }
589
- selection.onSelectionChange(next);
590
- };
591
- const handleSort = (columnId, e) => {
592
- if (multiSort) {
593
- const isShift = !!e && "shiftKey" in e && e.shiftKey;
594
- const existing = multiSort.rules.find((r) => r.column === columnId);
595
- const maxRules = multiSort.maxRules ?? 3;
596
- let next;
597
- if (!isShift) {
598
- if (existing) {
599
- next = [{ column: columnId, direction: existing.direction === "asc" ? "desc" : "asc" }];
600
- } else {
601
- next = [{ column: columnId, direction: "asc" }];
602
- }
603
- } else {
604
- if (existing) {
605
- if (existing.direction === "asc") {
606
- next = multiSort.rules.map((r) => r.column === columnId ? { ...r, direction: "desc" } : r);
607
- } else {
608
- next = multiSort.rules.filter((r) => r.column !== columnId);
609
- }
610
- } else {
611
- next = [...multiSort.rules, { column: columnId, direction: "asc" }].slice(0, maxRules);
612
- }
613
- }
614
- multiSort.onSortChange(next);
615
- return;
616
- }
617
- if (!sort) return;
618
- const nextDirection = sort.column === columnId && sort.direction === "asc" ? "desc" : "asc";
619
- sort.onSort(columnId, nextDirection);
620
- };
621
- const getSortDir = (columnId) => {
622
- if (multiSort) {
623
- const rule = multiSort.rules.find((r) => r.column === columnId);
624
- return rule ? rule.direction : "none";
625
- }
626
- if (!sort || sort.column !== columnId || !sort.direction) return "none";
627
- return sort.direction;
628
- };
629
- const getSortPriority = (columnId) => {
630
- if (!multiSort) return 0;
631
- const idx = multiSort.rules.findIndex((r) => r.column === columnId);
632
- return idx === -1 ? 0 : idx + 1;
633
- };
634
- const alignClass = (align) => {
635
- if (align === "center") return "text-center";
636
- if (align === "end") return "text-end";
637
- return "text-start";
638
- };
639
- const pinClass = (pinned) => {
640
- if (!pinned) return "";
641
- const sideClass = pinned === "start" ? "sticky inset-inline-start-0 z-[1]" : "sticky inset-inline-end-0 z-[1]";
642
- return `${sideClass} bg-background`;
643
- };
644
- const handleToggleExpand = (rowKey) => {
645
- if (!expansion) return;
646
- const next = new Set(expansion.expandedRows);
647
- if (next.has(rowKey)) next.delete(rowKey);
648
- else next.add(rowKey);
649
- expansion.onExpandedRowsChange(next);
650
- };
651
- const [resizeWidths, setResizeWidths] = React5__namespace.useState({});
652
- const dragRef = React5__namespace.useRef(null);
653
- const startResize = React5__namespace.useCallback(
654
- (columnId, e) => {
655
- const col = columns.find((c) => c.id === columnId);
656
- if (!col) return;
657
- const headerCell = e.currentTarget.closest("th");
658
- const measured = headerCell?.getBoundingClientRect().width || 0;
659
- const startWidth = typeof col.width === "number" ? col.width : measured > 0 ? measured : 120;
660
- dragRef.current = {
661
- columnId,
662
- startX: e.clientX,
663
- startWidth,
664
- currentWidth: startWidth,
665
- minWidth: col.minWidth ?? 60,
666
- maxWidth: col.maxWidth ?? 800
667
- };
668
- e.currentTarget.setPointerCapture?.(e.pointerId);
669
- e.preventDefault();
670
- e.stopPropagation();
671
- },
672
- [columns]
673
- );
674
- const onResizePointerMove = React5__namespace.useCallback(
675
- (e) => {
676
- const drag = dragRef.current;
677
- if (!drag) return;
678
- const dx = (rtl ? -1 : 1) * (e.clientX - drag.startX);
679
- const next = Math.max(drag.minWidth, Math.min(drag.maxWidth, drag.startWidth + dx));
680
- drag.currentWidth = next;
681
- setResizeWidths((prev) => prev[drag.columnId] === next ? prev : { ...prev, [drag.columnId]: next });
682
- },
683
- [rtl]
684
- );
685
- const endResize = React5__namespace.useCallback(
686
- (e) => {
687
- const drag = dragRef.current;
688
- if (!drag) return;
689
- onColumnResize?.(drag.columnId, drag.currentWidth);
690
- dragRef.current = null;
691
- e.currentTarget.releasePointerCapture?.(e.pointerId);
692
- },
693
- [onColumnResize]
694
- );
695
- const getColumnWidth = (col) => {
696
- return resizeWidths[col.id] ?? col.width;
697
- };
698
- const handleResizeKeyDown = React5__namespace.useCallback(
699
- (columnId, e) => {
700
- const isArrowGrow = rtl ? e.key === "ArrowLeft" : e.key === "ArrowRight";
701
- const isArrowShrink = rtl ? e.key === "ArrowRight" : e.key === "ArrowLeft";
702
- if (!isArrowGrow && !isArrowShrink && e.key !== "Home" && e.key !== "End") return;
703
- const col = columns.find((c) => c.id === columnId);
704
- if (!col) return;
705
- const headerCell = e.currentTarget.closest("th");
706
- const measured = headerCell?.getBoundingClientRect().width || 0;
707
- const minWidth = col.minWidth ?? 60;
708
- const maxWidth = col.maxWidth ?? 800;
709
- const current = resizeWidths[columnId] ?? (typeof col.width === "number" ? col.width : measured > 0 ? measured : 120);
710
- const step = e.shiftKey ? 32 : 8;
711
- let next;
712
- if (e.key === "Home") next = minWidth;
713
- else if (e.key === "End") next = maxWidth;
714
- else if (isArrowGrow) next = Math.min(maxWidth, current + step);
715
- else next = Math.max(minWidth, current - step);
716
- e.preventDefault();
717
- setResizeWidths((prev) => prev[columnId] === next ? prev : { ...prev, [columnId]: next });
718
- onColumnResize?.(columnId, next);
719
- },
720
- [columns, resizeWidths, rtl, onColumnResize]
721
- );
722
- const { sentinelRef } = useInfiniteScroll({
723
- onLoadMore: infiniteScroll?.onLoadMore ?? noop,
724
- hasMore: !!infiniteScroll?.hasMore,
725
- isLoading: !!infiniteScroll?.isLoadingMore,
726
- rootMargin: infiniteScroll?.rootMargin ?? "200px"
727
- });
728
- const virtRowHeight = virtualize?.rowHeight ?? 0;
729
- const virtViewportHeight = virtualize?.viewportHeight ?? 480;
730
- const virtOverscan = virtualize?.overscan ?? 6;
731
- const virtScrollRef = React5__namespace.useRef(null);
732
- const [virtScrollTop, setVirtScrollTop] = React5__namespace.useState(0);
733
- const handleVirtScroll = React5__namespace.useCallback((e) => {
734
- setVirtScrollTop(e.currentTarget.scrollTop);
735
- }, []);
736
- const { virtStartIndex, virtEndIndex, virtTopSpacer, virtBottomSpacer } = React5__namespace.useMemo(() => {
737
- if (!virtualize || data.length === 0) {
738
- return { virtStartIndex: 0, virtEndIndex: data.length, virtTopSpacer: 0, virtBottomSpacer: 0 };
739
- }
740
- const start = Math.max(0, Math.floor(virtScrollTop / virtRowHeight) - virtOverscan);
741
- const visibleCount = Math.ceil(virtViewportHeight / virtRowHeight) + virtOverscan * 2;
742
- const end = Math.min(data.length, start + visibleCount);
743
- return {
744
- virtStartIndex: start,
745
- virtEndIndex: end,
746
- virtTopSpacer: start * virtRowHeight,
747
- virtBottomSpacer: (data.length - end) * virtRowHeight
748
- };
749
- }, [virtualize, data.length, virtScrollTop, virtRowHeight, virtViewportHeight, virtOverscan]);
750
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, "data-slot": "data-table", className: chunkNV4JOKWL_cjs.cn("flex flex-col gap-4", className), children: [
751
- resultCount && /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "data-table-result-count", className: "text-sm text-foreground-muted", children: resultCount }),
752
- /* @__PURE__ */ jsxRuntime.jsx(
753
- "div",
754
- {
755
- ref: virtualize ? virtScrollRef : void 0,
756
- onScroll: virtualize ? handleVirtScroll : void 0,
757
- style: virtualize ? { maxHeight: virtViewportHeight, overflowY: "auto" } : void 0,
758
- "data-slot": virtualize ? "data-table-virtual-scroll" : void 0,
759
- children: /* @__PURE__ */ jsxRuntime.jsxs(Table, { size, striped, bordered, stickyHeader: stickyHeader || !!virtualize, children: [
760
- caption && /* @__PURE__ */ jsxRuntime.jsx("caption", { className: "text-foreground-muted mt-4 text-sm", children: caption }),
761
- /* @__PURE__ */ jsxRuntime.jsx(TableHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(TableRow, { children: [
762
- hasSelection && /* @__PURE__ */ jsxRuntime.jsx(TableHead, { className: chunkNV4JOKWL_cjs.cn("w-[40px]", pinClass("start")), children: /* @__PURE__ */ jsxRuntime.jsx(
763
- chunkCAJKSTXX_cjs.Checkbox,
764
- {
765
- checked: allSelected ? true : someSelected ? "indeterminate" : false,
766
- onCheckedChange: handleSelectAll,
767
- "aria-label": t.selectAll
768
- }
769
- ) }),
770
- hasExpansion && /* @__PURE__ */ jsxRuntime.jsx(TableHead, { className: chunkNV4JOKWL_cjs.cn("w-[36px]", pinClass("start")), "aria-hidden": "true" }),
771
- visibleColumns.map((col) => {
772
- const sortable = col.sortable && (sort || multiSort);
773
- const dir = sortable ? getSortDir(col.id) : "none";
774
- const priority = getSortPriority(col.id);
775
- const liveWidth = getColumnWidth(col);
776
- return /* @__PURE__ */ jsxRuntime.jsxs(
777
- TableHead,
778
- {
779
- sortDirection: sortable ? dir : void 0,
780
- className: chunkNV4JOKWL_cjs.cn("relative", alignClass(col.align), pinClass(col.pinned), col.className),
781
- style: liveWidth ? { width: liveWidth } : void 0,
782
- children: [
783
- sortable ? /* @__PURE__ */ jsxRuntime.jsx(
784
- TableSortHeader,
785
- {
786
- sorted: dir === "none" ? false : dir,
787
- onClick: (e) => handleSort(col.id, e),
788
- children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex items-center gap-1.5", children: [
789
- col.header,
790
- priority > 0 && multiSort && multiSort.rules.length > 1 && /* @__PURE__ */ jsxRuntime.jsx(
791
- "span",
792
- {
793
- "data-slot": "data-table-sort-priority",
794
- 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",
795
- "aria-label": `\u0627\u0648\u0644\u0648\u06CC\u062A \u0645\u0631\u062A\u0628\u200C\u0633\u0627\u0632\u06CC ${priority}`,
796
- children: priority
797
- }
798
- )
799
- ] })
800
- }
801
- ) : col.header,
802
- col.resizable && // role="separator" + tabIndex + ArrowKey handler is the
803
- // WAI-ARIA windowsplitter pattern (resizable separator).
804
- // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
805
- /* @__PURE__ */ jsxRuntime.jsx(
806
- "div",
807
- {
808
- "data-slot": "data-table-resize-handle",
809
- role: "separator",
810
- "aria-orientation": "vertical",
811
- "aria-label": "\u062A\u063A\u06CC\u06CC\u0631 \u0627\u0646\u062F\u0627\u0632\u0647 \u0633\u062A\u0648\u0646",
812
- tabIndex: 0,
813
- "aria-valuenow": getColumnWidth(col),
814
- "aria-valuemin": col.minWidth ?? 60,
815
- "aria-valuemax": col.maxWidth ?? 800,
816
- onKeyDown: (e) => handleResizeKeyDown(col.id, e),
817
- onPointerDown: (e) => startResize(col.id, e),
818
- onPointerMove: onResizePointerMove,
819
- onPointerUp: endResize,
820
- onPointerCancel: endResize,
821
- className: chunkNV4JOKWL_cjs.cn(
822
- "absolute inset-block-0 inset-inline-end-0 w-1.5 cursor-col-resize select-none touch-none",
823
- "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",
824
- "hover:before:opacity-100 focus:before:opacity-100 focus-visible:outline-none focus-visible:before:!bg-brand focus-visible:before:opacity-100",
825
- dragRef.current?.columnId === col.id && "before:!bg-brand before:opacity-100"
826
- )
827
- }
828
- )
829
- ]
830
- },
831
- col.id
832
- );
833
- })
834
- ] }) }),
835
- /* @__PURE__ */ jsxRuntime.jsxs(TableBody, { children: [
836
- 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 } }) }),
837
- isLoading ? Array.from({ length: loadingRows }).map((_, rowIdx) => /* @__PURE__ */ jsxRuntime.jsxs(TableRow, { children: [
838
- hasSelection && /* @__PURE__ */ jsxRuntime.jsx(TableCell, { className: pinClass("start"), children: /* @__PURE__ */ jsxRuntime.jsx(chunkD2EBLE2B_cjs.Skeleton, { className: "h-4 w-4" }) }),
839
- hasExpansion && /* @__PURE__ */ jsxRuntime.jsx(TableCell, { className: pinClass("start"), children: /* @__PURE__ */ jsxRuntime.jsx(chunkD2EBLE2B_cjs.Skeleton, { className: "h-4 w-4" }) }),
840
- visibleColumns.map((col) => {
841
- const liveWidth = getColumnWidth(col);
842
- return /* @__PURE__ */ jsxRuntime.jsx(
843
- TableCell,
844
- {
845
- className: chunkNV4JOKWL_cjs.cn(alignClass(col.align), pinClass(col.pinned), col.className),
846
- style: liveWidth ? { width: liveWidth } : void 0,
847
- children: /* @__PURE__ */ jsxRuntime.jsx(chunkD2EBLE2B_cjs.Skeleton, { className: "h-4 w-full max-w-[120px]" })
848
- },
849
- col.id
850
- );
851
- })
852
- ] }, `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) => {
853
- const rowIdx = virtualize ? virtStartIndex + sliceIdx : sliceIdx;
854
- const rowKey = getRowKey(row, rowIdx);
855
- const isSelected = hasSelection && selection.selectedRows.has(rowKey);
856
- const isExpanded = hasExpansion && expansion.expandedRows.has(rowKey);
857
- const ChevronIcon = lucideReact.ChevronRight;
858
- return /* @__PURE__ */ jsxRuntime.jsxs(React5__namespace.Fragment, { children: [
859
- /* @__PURE__ */ jsxRuntime.jsxs(TableRow, { "data-state": isSelected ? "selected" : void 0, children: [
860
- hasSelection && /* @__PURE__ */ jsxRuntime.jsx(TableCell, { className: pinClass("start"), children: /* @__PURE__ */ jsxRuntime.jsx(
861
- chunkCAJKSTXX_cjs.Checkbox,
862
- {
863
- checked: isSelected,
864
- onCheckedChange: () => handleSelectRow(rowKey),
865
- "aria-label": `${t.selectRow} ${(rowIdx + 1).toLocaleString(locale === "fa" ? "fa-IR" : locale === "ar" ? "ar-SA" : "en-US")}`
866
- }
867
- ) }),
868
- hasExpansion && /* @__PURE__ */ jsxRuntime.jsx(TableCell, { className: pinClass("start"), children: /* @__PURE__ */ jsxRuntime.jsx(
869
- "button",
870
- {
871
- type: "button",
872
- "aria-label": isExpanded ? "collapse" : "expand",
873
- "aria-expanded": isExpanded,
874
- onClick: () => handleToggleExpand(rowKey),
875
- className: "inline-flex size-6 items-center justify-center rounded text-foreground-lighter hover:bg-surface-100 hover:text-foreground transition-colors",
876
- children: isExpanded ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "size-4", "aria-hidden": "true" }) : /* @__PURE__ */ jsxRuntime.jsx(ChevronIcon, { className: chunkNV4JOKWL_cjs.cn("size-4", rtl && "rotate-180"), "aria-hidden": "true" })
877
- }
878
- ) }),
879
- visibleColumns.map((col) => {
880
- const liveWidth = getColumnWidth(col);
881
- return /* @__PURE__ */ jsxRuntime.jsx(
882
- TableCell,
883
- {
884
- className: chunkNV4JOKWL_cjs.cn(alignClass(col.align), pinClass(col.pinned), col.className),
885
- style: liveWidth ? { width: liveWidth } : void 0,
886
- children: col.cell(row, rowIdx)
887
- },
888
- col.id
889
- );
890
- })
891
- ] }),
892
- 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) }) })
893
- ] }, rowKey);
894
- }),
895
- 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 } }) }),
896
- 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(
897
- "td",
898
- {
899
- ref: sentinelRef,
900
- colSpan: allColumnCount,
901
- className: "border-0",
902
- 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: [
903
- /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: "sm" }),
904
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: t.loading ?? "\u062F\u0631 \u062D\u0627\u0644 \u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC" })
905
- ] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { "aria-hidden": "true", className: "h-px" })
906
- }
907
- ) }),
908
- 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 }) })
909
- ] }),
910
- footer && visibleColumns.some((c) => !!c.footer) && !isLoading && data.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
911
- "tfoot",
912
- {
913
- "data-slot": "data-table-footer",
914
- "data-sticky": stickyFooter || void 0,
915
- className: chunkNV4JOKWL_cjs.cn(
916
- "bg-surface-75 border-t border-border-default font-medium",
917
- stickyFooter && "[&>tr>td]:sticky [&>tr>td]:inset-block-end-0 [&>tr>td]:bg-surface-75 [&>tr>td]:z-[8]"
918
- ),
919
- children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
920
- hasSelection && /* @__PURE__ */ jsxRuntime.jsx("td", { className: pinClass("start"), "aria-hidden": "true" }),
921
- hasExpansion && /* @__PURE__ */ jsxRuntime.jsx("td", { className: pinClass("start"), "aria-hidden": "true" }),
922
- visibleColumns.map((col) => {
923
- const liveWidth = getColumnWidth(col);
924
- return /* @__PURE__ */ jsxRuntime.jsx(
925
- "td",
926
- {
927
- className: chunkNV4JOKWL_cjs.cn(
928
- alignClass(col.align),
929
- pinClass(col.pinned),
930
- col.className,
931
- "[[data-size=sm]_&]:px-2 [[data-size=sm]_&]:py-1.5 [[data-size=sm]_&]:text-xs",
932
- "[[data-size=md]_&]:px-3 [[data-size=md]_&]:py-2 [[data-size=md]_&]:text-sm",
933
- "[[data-size=lg]_&]:px-4 [[data-size=lg]_&]:py-3 [[data-size=lg]_&]:text-base"
934
- ),
935
- style: liveWidth ? { width: liveWidth } : void 0,
936
- children: col.footer ? col.footer() : null
937
- },
938
- col.id
939
- );
940
- })
941
- ] })
942
- }
943
- )
944
- ] })
945
- }
946
- ),
947
- pagination && pagination.totalPages > 1 && /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "data-table-pagination", className: "flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
948
- PaginationControlled,
949
- {
950
- currentPage: pagination.currentPage,
951
- totalPages: pagination.totalPages,
952
- onPageChange: pagination.onPageChange
953
- }
954
- ) })
955
- ] });
956
- }
957
- var DataTable = React5__namespace.forwardRef(DataTableInner);
958
- DataTable.displayName = "DataTable";
959
-
960
- exports.DataTable = DataTable;
961
- exports.Pagination = Pagination;
962
- exports.PaginationContent = PaginationContent;
963
- exports.PaginationControlled = PaginationControlled;
964
- exports.PaginationEllipsis = PaginationEllipsis;
965
- exports.PaginationItem = PaginationItem;
966
- exports.PaginationLink = PaginationLink;
967
- exports.PaginationNext = PaginationNext;
968
- exports.PaginationPrevious = PaginationPrevious;
969
- exports.Spinner = Spinner;
970
- exports.Table = Table;
971
- exports.TableBody = TableBody;
972
- exports.TableCaption = TableCaption;
973
- exports.TableCell = TableCell;
974
- exports.TableFooter = TableFooter;
975
- exports.TableHead = TableHead;
976
- exports.TableHeader = TableHeader;
977
- exports.TableRow = TableRow;
978
- exports.TableSortHeader = TableSortHeader;
979
- exports.spinnerVariants = spinnerVariants;
980
- exports.useInfiniteScroll = useInfiniteScroll;
981
- //# sourceMappingURL=chunk-JMKNNH63.cjs.map
982
- //# sourceMappingURL=chunk-JMKNNH63.cjs.map