@customafk/lunas-ui 0.2.3 → 0.2.5

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 (345) hide show
  1. package/dist/{button-C6s_h0K3.d.mts → button-B5a1UlC_.d.mts} +10 -8
  2. package/dist/button-Cd7YtPlT.cjs +2 -0
  3. package/dist/button-Cd7YtPlT.cjs.map +1 -0
  4. package/dist/button-D8BUqpI2.mjs +2 -0
  5. package/dist/button-D8BUqpI2.mjs.map +1 -0
  6. package/dist/{button-CcOrQc7g.d.cts → button-DYZCqN6A.d.cts} +8 -6
  7. package/dist/button.variants-B_dFX3i2.mjs +2 -0
  8. package/dist/button.variants-B_dFX3i2.mjs.map +1 -0
  9. package/dist/button.variants-aqkTmzFu.cjs +2 -0
  10. package/dist/button.variants-aqkTmzFu.cjs.map +1 -0
  11. package/dist/{calendar-qHQsMOj9.mjs → calendar-B-PDpHK5.mjs} +2 -2
  12. package/dist/{calendar-qHQsMOj9.mjs.map → calendar-B-PDpHK5.mjs.map} +1 -1
  13. package/dist/{calendar-dhPqb3aZ.cjs → calendar-Cq3_5u0k.cjs} +2 -2
  14. package/dist/{calendar-dhPqb3aZ.cjs.map → calendar-Cq3_5u0k.cjs.map} +1 -1
  15. package/dist/cards/grid-product-card.cjs +1 -1
  16. package/dist/cards/grid-product-card.mjs +1 -1
  17. package/dist/cards/product-card.cjs +1 -1
  18. package/dist/cards/product-card.mjs +1 -1
  19. package/dist/cards/simple-card.cjs +1 -1
  20. package/dist/cards/simple-card.d.mts +2 -2
  21. package/dist/cards/simple-card.mjs +1 -1
  22. package/dist/{command-DhBTNTqz.mjs → command-Bma4ivZz.mjs} +2 -2
  23. package/dist/{command-DhBTNTqz.mjs.map → command-Bma4ivZz.mjs.map} +1 -1
  24. package/dist/{command-_zpTaaIk.cjs → command-IfPmQiyJ.cjs} +2 -2
  25. package/dist/{command-_zpTaaIk.cjs.map → command-IfPmQiyJ.cjs.map} +1 -1
  26. package/dist/data-display/country.cjs +1 -1
  27. package/dist/data-display/country.mjs +1 -1
  28. package/dist/data-display/data-list.cjs +1 -1
  29. package/dist/data-display/data-list.mjs +1 -1
  30. package/dist/data-display/date-tooltip.cjs +1 -1
  31. package/dist/data-display/date-tooltip.mjs +1 -1
  32. package/dist/data-display/date.cjs +1 -1
  33. package/dist/data-display/date.mjs +1 -1
  34. package/dist/data-display/empty.cjs +1 -1
  35. package/dist/data-display/empty.d.mts +2 -2
  36. package/dist/data-display/empty.mjs +1 -1
  37. package/dist/data-display/name.cjs +1 -1
  38. package/dist/data-display/name.mjs +1 -1
  39. package/dist/data-display/role-badge.cjs +1 -1
  40. package/dist/data-display/role-badge.mjs +1 -1
  41. package/dist/data-display/statistic.cjs +1 -1
  42. package/dist/data-display/statistic.d.cts +2 -2
  43. package/dist/data-display/statistic.d.mts +4 -4
  44. package/dist/data-display/statistic.mjs +1 -1
  45. package/dist/data-display/user.cjs +1 -1
  46. package/dist/data-display/user.mjs +1 -1
  47. package/dist/{date-em5f7hCx.cjs → date-WraHGsbb.cjs} +2 -2
  48. package/dist/{date-em5f7hCx.cjs.map → date-WraHGsbb.cjs.map} +1 -1
  49. package/dist/{date-By93kONr.mjs → date-uVTm7J09.mjs} +2 -2
  50. package/dist/{date-By93kONr.mjs.map → date-uVTm7J09.mjs.map} +1 -1
  51. package/dist/{dialog-CxELDK98.mjs → dialog-B50k7HnL.mjs} +2 -2
  52. package/dist/{dialog-CxELDK98.mjs.map → dialog-B50k7HnL.mjs.map} +1 -1
  53. package/dist/{dialog-DjRiV5vR.cjs → dialog-BoNhIQYJ.cjs} +2 -2
  54. package/dist/{dialog-DjRiV5vR.cjs.map → dialog-BoNhIQYJ.cjs.map} +1 -1
  55. package/dist/{dialog-CsM9bEo6.d.cts → dialog-CuZxUWfc.d.cts} +12 -12
  56. package/dist/{dialog-NsKYcQwE.d.mts → dialog-D4LnpcNL.d.mts} +12 -12
  57. package/dist/dialogs/confirm-dialog.cjs +1 -1
  58. package/dist/dialogs/confirm-dialog.mjs +1 -1
  59. package/dist/dialogs/detail-dialog/components/sidebar.cjs +1 -1
  60. package/dist/dialogs/detail-dialog/components/sidebar.d.cts +27 -27
  61. package/dist/dialogs/detail-dialog/components/sidebar.d.mts +27 -27
  62. package/dist/dialogs/detail-dialog/components/sidebar.mjs +1 -1
  63. package/dist/dialogs/detail-dialog/index.cjs +1 -1
  64. package/dist/dialogs/detail-dialog/index.mjs +1 -1
  65. package/dist/dialogs/error-dialog.cjs +1 -1
  66. package/dist/dialogs/error-dialog.mjs +1 -1
  67. package/dist/dialogs/loading-dialog.cjs +1 -1
  68. package/dist/dialogs/loading-dialog.mjs +1 -1
  69. package/dist/dist-DP1ehOL8.mjs +2 -0
  70. package/dist/{dist-CvmzZ_6C.mjs.map → dist-DP1ehOL8.mjs.map} +1 -1
  71. package/dist/dist-Q1UyT_bc.cjs +2 -0
  72. package/dist/{dist-BudM04oj.cjs.map → dist-Q1UyT_bc.cjs.map} +1 -1
  73. package/dist/features/descriptions/index.cjs +1 -1
  74. package/dist/features/descriptions/index.d.cts +4 -4
  75. package/dist/features/descriptions/index.d.mts +1 -1
  76. package/dist/features/descriptions/index.mjs +1 -1
  77. package/dist/features/search-modal/index.cjs +1 -1
  78. package/dist/features/search-modal/index.d.cts +2 -2
  79. package/dist/features/search-modal/index.d.mts +2 -2
  80. package/dist/features/search-modal/index.mjs +1 -1
  81. package/dist/features/tables/index.cjs +1 -1
  82. package/dist/features/tables/index.d.cts +1 -1
  83. package/dist/features/tables/index.d.mts +23 -23
  84. package/dist/features/tables/index.mjs +1 -1
  85. package/dist/features/tables/index.mjs.map +1 -1
  86. package/dist/features/tanstack-form/index.cjs +1 -1
  87. package/dist/features/tanstack-form/index.d.cts +278 -278
  88. package/dist/features/tanstack-form/index.d.mts +278 -278
  89. package/dist/features/tanstack-form/index.mjs +1 -1
  90. package/dist/features/tanstack-form/index.mjs.map +1 -1
  91. package/dist/{flex-twCgWyx1.cjs → flex-BsoSgWFN.cjs} +2 -2
  92. package/dist/{flex-twCgWyx1.cjs.map → flex-BsoSgWFN.cjs.map} +1 -1
  93. package/dist/{flex-BP8sTi70.mjs → flex-CeizYtXs.mjs} +2 -2
  94. package/dist/{flex-BP8sTi70.mjs.map → flex-CeizYtXs.mjs.map} +1 -1
  95. package/dist/heading-BEbpIiLg.cjs +2 -0
  96. package/dist/heading-BEbpIiLg.cjs.map +1 -0
  97. package/dist/heading-CrF1CFWS.mjs +2 -0
  98. package/dist/heading-CrF1CFWS.mjs.map +1 -0
  99. package/dist/{image-DuFv8sPr.cjs → image-BBZUipoU.cjs} +2 -2
  100. package/dist/{image-DuFv8sPr.cjs.map → image-BBZUipoU.cjs.map} +1 -1
  101. package/dist/image-CZji4Q26.mjs +2 -0
  102. package/dist/{image-CS_Q0WA7.mjs.map → image-CZji4Q26.mjs.map} +1 -1
  103. package/dist/{input-BFWWaN-v.cjs → input-BoMJaF_N.cjs} +2 -2
  104. package/dist/{input-BFWWaN-v.cjs.map → input-BoMJaF_N.cjs.map} +1 -1
  105. package/dist/{input-DBtIgQB6.mjs → input-DMjPBcJO.mjs} +2 -2
  106. package/dist/{input-DBtIgQB6.mjs.map → input-DMjPBcJO.mjs.map} +1 -1
  107. package/dist/{input-B65h-l45.d.cts → input-DszdZdbJ.d.cts} +7 -7
  108. package/dist/{input-C6Q4vGNC.d.mts → input-Dv7UKl6Z.d.mts} +7 -7
  109. package/dist/layouts/cms-layout/index.cjs +1 -1
  110. package/dist/layouts/cms-layout/index.mjs +1 -1
  111. package/dist/layouts/flex.cjs +1 -1
  112. package/dist/layouts/flex.d.cts +8 -8
  113. package/dist/layouts/flex.d.mts +12 -12
  114. package/dist/layouts/flex.mjs +1 -1
  115. package/dist/layouts/payment-layout/index.cjs +1 -1
  116. package/dist/layouts/payment-layout/index.mjs +1 -1
  117. package/dist/pages/FeatureDeveloping.cjs +1 -1
  118. package/dist/pages/FeatureDeveloping.d.cts +2 -2
  119. package/dist/pages/FeatureDeveloping.d.mts +2 -2
  120. package/dist/pages/FeatureDeveloping.mjs +1 -1
  121. package/dist/pages/FeatureFixing.cjs +1 -1
  122. package/dist/pages/FeatureFixing.d.cts +2 -2
  123. package/dist/pages/FeatureFixing.d.mts +2 -2
  124. package/dist/pages/FeatureFixing.mjs +1 -1
  125. package/dist/pages/NotAuthorized.cjs +1 -1
  126. package/dist/pages/NotAuthorized.d.cts +2 -2
  127. package/dist/pages/NotAuthorized.d.mts +2 -2
  128. package/dist/pages/NotAuthorized.mjs +1 -1
  129. package/dist/pages/NotFound.cjs +1 -1
  130. package/dist/pages/NotFound.d.cts +2 -2
  131. package/dist/pages/NotFound.d.mts +2 -2
  132. package/dist/pages/NotFound.mjs +1 -1
  133. package/dist/paragraph-Co2e-y5c.cjs +2 -0
  134. package/dist/paragraph-Co2e-y5c.cjs.map +1 -0
  135. package/dist/paragraph-DmiXlAnE.mjs +2 -0
  136. package/dist/paragraph-DmiXlAnE.mjs.map +1 -0
  137. package/dist/{resizable-mlGS6Zto.cjs → resizable-B8tRShQI.cjs} +2 -2
  138. package/dist/{resizable-mlGS6Zto.cjs.map → resizable-B8tRShQI.cjs.map} +1 -1
  139. package/dist/{resizable-DXHfkbaz.mjs → resizable-RPObV6jc.mjs} +2 -2
  140. package/dist/{resizable-DXHfkbaz.mjs.map → resizable-RPObV6jc.mjs.map} +1 -1
  141. package/dist/systems/google.cjs +1 -1
  142. package/dist/systems/google.mjs +1 -1
  143. package/dist/{textarea-COQoSVSc.cjs → textarea-Dlwbg6TY.cjs} +2 -2
  144. package/dist/{textarea-COQoSVSc.cjs.map → textarea-Dlwbg6TY.cjs.map} +1 -1
  145. package/dist/{textarea-bLtmb71c.mjs → textarea-RjL2DtNf.mjs} +2 -2
  146. package/dist/{textarea-bLtmb71c.mjs.map → textarea-RjL2DtNf.mjs.map} +1 -1
  147. package/dist/typography/paragraph.cjs +1 -1
  148. package/dist/typography/paragraph.d.cts +10 -20
  149. package/dist/typography/paragraph.d.mts +10 -20
  150. package/dist/typography/paragraph.mjs +1 -1
  151. package/dist/typography/title.cjs +1 -1
  152. package/dist/typography/title.cjs.map +1 -1
  153. package/dist/typography/title.d.cts +4 -3
  154. package/dist/typography/title.d.mts +4 -3
  155. package/dist/typography/title.mjs +1 -1
  156. package/dist/typography/title.mjs.map +1 -1
  157. package/dist/ui/alert-dialog.cjs +1 -1
  158. package/dist/ui/alert-dialog.d.cts +12 -12
  159. package/dist/ui/alert-dialog.d.mts +12 -12
  160. package/dist/ui/alert-dialog.mjs +1 -1
  161. package/dist/ui/alert.cjs +1 -1
  162. package/dist/ui/alert.d.cts +5 -5
  163. package/dist/ui/alert.d.mts +7 -7
  164. package/dist/ui/alert.mjs +1 -1
  165. package/dist/ui/aspect-ratio.d.cts +2 -2
  166. package/dist/ui/aspect-ratio.d.mts +2 -2
  167. package/dist/ui/avatar.d.cts +4 -4
  168. package/dist/ui/avatar.d.mts +4 -4
  169. package/dist/ui/badge.d.cts +5 -5
  170. package/dist/ui/badge.d.mts +5 -5
  171. package/dist/ui/breadcrumb.cjs +1 -1
  172. package/dist/ui/breadcrumb.d.cts +8 -8
  173. package/dist/ui/breadcrumb.d.mts +8 -8
  174. package/dist/ui/breadcrumb.mjs +1 -1
  175. package/dist/ui/button-group.cjs +1 -1
  176. package/dist/ui/button-group.d.cts +6 -6
  177. package/dist/ui/button-group.d.mts +6 -6
  178. package/dist/ui/button-group.mjs +1 -1
  179. package/dist/ui/button.cjs +1 -1
  180. package/dist/ui/button.d.cts +1 -1
  181. package/dist/ui/button.d.mts +1 -1
  182. package/dist/ui/button.mjs +1 -1
  183. package/dist/ui/buttons/add-new.cjs +1 -1
  184. package/dist/ui/buttons/add-new.mjs +1 -1
  185. package/dist/ui/buttons/edit.cjs +1 -1
  186. package/dist/ui/buttons/edit.mjs +1 -1
  187. package/dist/ui/buttons/refresh.cjs +1 -1
  188. package/dist/ui/buttons/refresh.mjs +1 -1
  189. package/dist/ui/buttons/trash.cjs +1 -1
  190. package/dist/ui/buttons/trash.mjs +1 -1
  191. package/dist/ui/buttons/upload-image.cjs +1 -1
  192. package/dist/ui/buttons/upload-image.mjs +1 -1
  193. package/dist/ui/calendar.cjs +1 -1
  194. package/dist/ui/calendar.d.cts +4 -4
  195. package/dist/ui/calendar.d.mts +4 -4
  196. package/dist/ui/calendar.mjs +1 -1
  197. package/dist/ui/card.cjs +1 -1
  198. package/dist/ui/card.d.cts +8 -8
  199. package/dist/ui/card.d.mts +8 -8
  200. package/dist/ui/card.mjs +1 -1
  201. package/dist/ui/carousel.cjs +1 -1
  202. package/dist/ui/carousel.d.cts +7 -7
  203. package/dist/ui/carousel.d.mts +7 -7
  204. package/dist/ui/carousel.mjs +1 -1
  205. package/dist/ui/checkbox.d.cts +2 -2
  206. package/dist/ui/checkbox.d.mts +2 -2
  207. package/dist/ui/collapsible.d.cts +4 -4
  208. package/dist/ui/collapsible.d.mts +4 -4
  209. package/dist/ui/command.cjs +1 -1
  210. package/dist/ui/command.d.cts +11 -11
  211. package/dist/ui/command.d.mts +11 -11
  212. package/dist/ui/command.mjs +1 -1
  213. package/dist/ui/context-menu.d.cts +16 -16
  214. package/dist/ui/context-menu.d.mts +16 -16
  215. package/dist/ui/dialog.cjs +1 -1
  216. package/dist/ui/dialog.d.cts +1 -1
  217. package/dist/ui/dialog.d.mts +1 -1
  218. package/dist/ui/dialog.mjs +1 -1
  219. package/dist/ui/drawer.d.cts +11 -11
  220. package/dist/ui/drawer.d.mts +11 -11
  221. package/dist/ui/dropdown-menu.d.cts +16 -16
  222. package/dist/ui/dropdown-menu.d.mts +16 -16
  223. package/dist/ui/empty.d.cts +9 -9
  224. package/dist/ui/empty.d.mts +9 -9
  225. package/dist/ui/field.cjs +1 -1
  226. package/dist/ui/field.d.cts +13 -13
  227. package/dist/ui/field.d.mts +24 -24
  228. package/dist/ui/field.mjs +1 -1
  229. package/dist/ui/file-uploader.cjs +2 -2
  230. package/dist/ui/file-uploader.d.cts +2 -2
  231. package/dist/ui/file-uploader.d.mts +2 -2
  232. package/dist/ui/file-uploader.mjs +2 -2
  233. package/dist/ui/form.cjs +1 -1
  234. package/dist/ui/form.d.cts +11 -11
  235. package/dist/ui/form.d.mts +11 -11
  236. package/dist/ui/form.mjs +1 -1
  237. package/dist/ui/hover-card.d.cts +4 -4
  238. package/dist/ui/hover-card.d.mts +4 -4
  239. package/dist/ui/image.cjs +1 -1
  240. package/dist/ui/image.mjs +1 -1
  241. package/dist/ui/input-otp.cjs +1 -1
  242. package/dist/ui/input-otp.d.cts +5 -5
  243. package/dist/ui/input-otp.d.mts +5 -5
  244. package/dist/ui/input-otp.mjs +1 -1
  245. package/dist/ui/input.cjs +1 -1
  246. package/dist/ui/input.d.cts +1 -1
  247. package/dist/ui/input.d.mts +1 -1
  248. package/dist/ui/input.mjs +1 -1
  249. package/dist/ui/inputs/search-input.cjs +1 -1
  250. package/dist/ui/inputs/search-input.d.cts +3 -3
  251. package/dist/ui/inputs/search-input.d.mts +3 -3
  252. package/dist/ui/inputs/search-input.mjs +1 -1
  253. package/dist/ui/item.cjs +1 -1
  254. package/dist/ui/item.d.cts +16 -16
  255. package/dist/ui/item.d.mts +16 -16
  256. package/dist/ui/item.mjs +1 -1
  257. package/dist/ui/label.d.cts +2 -2
  258. package/dist/ui/label.d.mts +2 -2
  259. package/dist/ui/menubar.d.cts +17 -17
  260. package/dist/ui/menubar.d.mts +17 -17
  261. package/dist/ui/multi-select.cjs +1 -1
  262. package/dist/ui/multi-select.d.cts +2 -2
  263. package/dist/ui/multi-select.d.mts +3 -3
  264. package/dist/ui/multi-select.mjs +1 -1
  265. package/dist/ui/multi-select.mjs.map +1 -1
  266. package/dist/ui/navigation-menu.d.cts +11 -11
  267. package/dist/ui/navigation-menu.d.mts +11 -11
  268. package/dist/ui/pagination.cjs +1 -1
  269. package/dist/ui/pagination.d.cts +9 -9
  270. package/dist/ui/pagination.d.mts +9 -9
  271. package/dist/ui/pagination.mjs +1 -1
  272. package/dist/ui/popover.d.cts +6 -6
  273. package/dist/ui/popover.d.mts +6 -6
  274. package/dist/ui/progress.d.cts +2 -2
  275. package/dist/ui/progress.d.mts +2 -2
  276. package/dist/ui/radio-group.d.cts +3 -3
  277. package/dist/ui/radio-group.d.mts +3 -3
  278. package/dist/ui/resizable.cjs +1 -1
  279. package/dist/ui/resizable.d.cts +9 -9
  280. package/dist/ui/resizable.d.mts +9 -9
  281. package/dist/ui/resizable.mjs +1 -1
  282. package/dist/ui/scroll-area.cjs +1 -1
  283. package/dist/ui/scroll-area.d.cts +6 -6
  284. package/dist/ui/scroll-area.d.mts +6 -6
  285. package/dist/ui/scroll-area.mjs +1 -1
  286. package/dist/ui/select.d.cts +9 -9
  287. package/dist/ui/select.d.mts +9 -9
  288. package/dist/ui/separator.d.cts +2 -2
  289. package/dist/ui/separator.d.mts +2 -2
  290. package/dist/ui/sheet.d.cts +9 -9
  291. package/dist/ui/sheet.d.mts +9 -9
  292. package/dist/ui/sidebar.cjs +1 -1
  293. package/dist/ui/sidebar.d.cts +29 -29
  294. package/dist/ui/sidebar.d.mts +29 -29
  295. package/dist/ui/sidebar.mjs +1 -1
  296. package/dist/ui/skeleton.d.cts +2 -2
  297. package/dist/ui/skeleton.d.mts +2 -2
  298. package/dist/ui/slider.cjs +1 -1
  299. package/dist/ui/slider.d.cts +2 -2
  300. package/dist/ui/slider.d.mts +2 -2
  301. package/dist/ui/slider.mjs +1 -1
  302. package/dist/ui/sonner.d.cts +2 -2
  303. package/dist/ui/spinner.d.cts +2 -2
  304. package/dist/ui/spinner.d.mts +2 -2
  305. package/dist/ui/switch.d.cts +2 -2
  306. package/dist/ui/switch.d.mts +2 -2
  307. package/dist/ui/table.cjs +1 -1
  308. package/dist/ui/table.d.cts +18 -18
  309. package/dist/ui/table.d.mts +18 -18
  310. package/dist/ui/table.mjs +1 -1
  311. package/dist/ui/tabs.d.cts +5 -5
  312. package/dist/ui/tabs.d.mts +5 -5
  313. package/dist/ui/textarea.cjs +1 -1
  314. package/dist/ui/textarea.d.cts +2 -2
  315. package/dist/ui/textarea.d.mts +2 -2
  316. package/dist/ui/textarea.mjs +1 -1
  317. package/dist/ui/toggle-group.cjs +1 -1
  318. package/dist/ui/toggle-group.d.cts +3 -3
  319. package/dist/ui/toggle-group.d.mts +3 -3
  320. package/dist/ui/toggle-group.mjs +1 -1
  321. package/dist/ui/toggle.d.cts +3 -3
  322. package/dist/ui/toggle.d.mts +5 -5
  323. package/dist/ui/tooltip.d.cts +5 -5
  324. package/dist/ui/tooltip.d.mts +5 -5
  325. package/package.json +4 -3
  326. package/styles/theme.css +17 -17
  327. package/dist/button-CpEejahy.cjs +0 -2
  328. package/dist/button-CpEejahy.cjs.map +0 -1
  329. package/dist/button-D54KOmb7.mjs +0 -2
  330. package/dist/button-D54KOmb7.mjs.map +0 -1
  331. package/dist/button.variants-CS-Cmarr.cjs +0 -2
  332. package/dist/button.variants-CS-Cmarr.cjs.map +0 -1
  333. package/dist/button.variants-DRWf66hR.mjs +0 -2
  334. package/dist/button.variants-DRWf66hR.mjs.map +0 -1
  335. package/dist/dist-BudM04oj.cjs +0 -2
  336. package/dist/dist-CvmzZ_6C.mjs +0 -2
  337. package/dist/heading--VmdIi7C.mjs +0 -2
  338. package/dist/heading--VmdIi7C.mjs.map +0 -1
  339. package/dist/heading-BEm5CCSE.cjs +0 -2
  340. package/dist/heading-BEm5CCSE.cjs.map +0 -1
  341. package/dist/image-CS_Q0WA7.mjs +0 -2
  342. package/dist/paragraph-B72bHMf7.cjs +0 -2
  343. package/dist/paragraph-B72bHMf7.cjs.map +0 -1
  344. package/dist/paragraph-moBSTPmT.mjs +0 -2
  345. package/dist/paragraph-moBSTPmT.mjs.map +0 -1
@@ -1,2 +1,2 @@
1
- import{t as e}from"../../paragraph-moBSTPmT.mjs";import"../../button.variants-DRWf66hR.mjs";import{t}from"../../button-D54KOmb7.mjs";import{t as n}from"../../flex-BP8sTi70.mjs";import{t as r}from"../../date-By93kONr.mjs";import{t as i}from"../../badge-B4Fa7-J3.mjs";import{i as a,n as o,r as s,t as c}from"../../tooltip-B3dTcgcc.mjs";import{n as l,t as u}from"../../avatar-DReNH6rV.mjs";import{t as d}from"../../separator-Bf0gymN4.mjs";import{a as f,d as p,h as m,i as h,r as g,t as _}from"../../dropdown-menu-B8GUTfTp.mjs";import{t as v}from"../../checkbox-Bg2FiuQw.mjs";import{t as y}from"../../spinner-D1v3Bard.mjs";import{n as b,r as ee}from"../../resizable-DXHfkbaz.mjs";import{t as te}from"../../input-DBtIgQB6.mjs";import{cn as x}from"@customafk/react-toolkit/utils";import{Activity as S,createContext as C,memo as w,use as T,useCallback as E,useEffect as D,useId as ne,useMemo as O,useRef as k,useState as A}from"react";import{jsx as j,jsxs as M}from"react/jsx-runtime";import{AlertTriangle as N,ArrowRightIcon as P,BoxIcon as F,CheckIcon as re,ChevronDown as ie,CirclePlus as ae,Columns4Icon as oe,DownloadIcon as se,EllipsisVerticalIcon as ce,ExternalLinkIcon as le,ListFilterIcon as ue,ListFilterPlus as de,MinusIcon as fe,MoreVerticalIcon as pe,MoveLeftIcon as me,MoveRightIcon as he,PinOffIcon as ge,RefreshCwIcon as _e,SearchIcon as ve,Trash2Icon as ye,UserRoundIcon as be,XIcon as xe}from"lucide-react";import{colorHashLight as Se}from"@customafk/react-toolkit/color-hash";import{flexRender as I,getCoreRowModel as Ce,getExpandedRowModel as we,getGroupedRowModel as Te,useReactTable as Ee}from"@tanstack/react-table";import{useVirtualizer as De}from"@tanstack/react-virtual";import{useDebounceCallback as Oe}from"@customafk/react-toolkit/hooks/useDebounceCallback";const L=()=>M(`div`,{className:`flex gap-0 text-text-positive-weak`,children:[j(fe,{size:16}),j(fe,{size:16})]}),ke=({label:e,onClick:t,onRemove:n})=>e?n?M(`div`,{className:`flex w-fit gap-x-0.5 rounded-full border border-border py-1 pr-2 pl-3 text-text-positive text-xs shadow-xs`,onClick:e=>{t?.(),e.stopPropagation(),e.preventDefault()},children:[e,j(`button`,{className:`cursor-pointer text-text-positive-weak hover:text-text-positive-strong`,onClick:e=>{n?.(),e.stopPropagation(),e.preventDefault()},children:j(xe,{size:12})})]}):j(`button`,{className:`w-fit rounded-full border border-border px-3 py-1 text-text-positive text-xs shadow-xs`,onClick:e=>{t?.(),e.stopPropagation(),e.preventDefault()},children:e}):j(L,{}),Ae=({value:e})=>e==null?j(L,{}):e===!1?j(`div`,{className:`text-danger-strong`,children:j(xe,{})}):j(`div`,{className:`text-success-strong`,children:j(re,{})}),je=({date:e})=>e==null?j(L,{}):j(s,{children:M(c,{children:[j(a,{asChild:!0,children:j(i,{className:`h-fit`,children:j(r,{date:e,format:`medium`,className:`font-normal text-white`})})}),j(o,{className:`rounded px-2`,children:j(r,{date:e,format:`full`,showTime:!0,className:`font-medium text-text-negative text-xs`})})]})}),Me=({content:t})=>t==null?j(L,{}):M(c,{children:[j(a,{children:j(e,{variant:`sm`,className:`line-clamp-2 whitespace-pre-line break-all`,children:t})}),j(o,{align:`start`,className:`h-fit min-w-48 max-w-80 pt-4`,children:M(`div`,{className:`flex flex-col gap-y-2`,children:[j(e,{variant:`xs`,className:`whitespace-pre-line text-wrap break-keep text-text-negative-weak`,children:t}),M(`p`,{className:`w-full text-end`,children:[t.toString().length,` chars`]})]})})]}),Ne=({items:e=[]})=>M(_,{children:[j(m,{asChild:!0,children:j(t,{size:`sm`,variant:`ghost`,color:`secondary`,className:`size-9 rounded-full`,children:j(pe,{})})}),j(g,{children:j(h,{children:e.map(e=>j(f,{className:`px-3`,onSelect:t=>{e.onClick(e.id),t.stopPropagation()},children:e.label},e.id))})})]}),Pe=({name:t})=>t?M(c,{children:[j(a,{children:j(e,{variant:`sm`,className:`line-clamp-2 w-full truncate text-wrap pb-px text-start`,children:t})}),j(o,{align:`start`,className:`h-fit min-w-48 max-w-80 pt-4`,children:M(`div`,{className:`flex flex-col gap-y-2`,children:[j(`p`,{className:`whitespace-pre-line text-wrap break-keep`,children:t}),M(`p`,{className:`w-full text-end`,children:[t.length,` chars`]})]})})]}):j(L,{}),Fe=({href:e,label:t})=>M(`a`,{href:e,target:`_blank`,className:`inline-flex items-center gap-1 truncate text-primary text-sm underline`,rel:`noopener noreferrer`,children:[j(`span`,{children:t||e}),j(le,{size:14})]}),Ie=({value:e})=>M(c,{children:[j(a,{asChild:!0,children:j(`p`,{className:`font-number text-secondary-foreground text-sm tabular-nums`,children:e.replace(/(\d{3})(\d{3})(\d{4})/,`($1) $2-$3`)})}),j(o,{align:`start`,children:j(`p`,{className:`tabular-nums`,children:e.slice(1).replace(/(\d{2})(\d{3})(\d{4})/,`(00) (+84) ($1) $2-$3`)})})]}),Le=({title:e,onClick:n})=>M(c,{children:[j(a,{children:j(t,{type:`button`,variant:`ghost`,color:`danger`,size:`icon`,onClick:E(async e=>{e.preventDefault(),e.stopPropagation(),await n?.()},[n]),children:j(ye,{})})}),j(o,{children:j(`p`,{children:e||`Remove item from list table`})})]}),Re=(e,t,n)=>{let r=10**t;switch(n){case`floor`:return Math.floor(e*r)/r;case`ceil`:return Math.ceil(e*r)/r;default:return Math.round(e*r)/r}},ze=w(({decimalSeparator:e=`.`,groupSeparator:t=`,`,prefix:r,suffix:i,precision:a,roundingMode:o=`round`,showTrailingZeros:s=!1,size:c=`lg`,value:l=0})=>{let u=O(()=>{let e={};return typeof a==`number`&&a>=0&&s&&(e.minimumFractionDigits=a),e.maximumFractionDigits=a,e},[a,s]),d=E(e=>{let t=e;return typeof a==`number`&&a>=0&&(t=Re(e,a,o)),t.toLocaleString(`en-US`,u)},[o,u,a]),f=O(()=>{if(typeof l==`number`)return Number.isNaN(l)||!Number.isFinite(l)?`N/A`:d(l);if(typeof l==`string`){let e=l.trim();if(!e)return`N/A`;let t=Number(e);return Number.isNaN(t)||!Number.isFinite(t)?`N/A`:d(t)}return`N/A`},[l,d]),p=O(()=>e===`.`&&t===`,`?f:f.replace(/,/g,t).replace(/\./g,e),[f,e,t]);return p===`0`||p===`N/A`||!p?j(L,{}):M(n,{padding:`none`,className:x(`font-number text-lg text-secondary-foreground tabular-nums`,c===`xs`&&`text-xs`,c===`sm`&&`text-sm`,c===`md`&&`text-base`,c===`lg`&&`text-lg`,c===`xl`&&`text-xl`),children:[r,j(`p`,{children:p}),i]})});ze.displayName=`UITableStatisticDisplay`;const Be=({uuid:t,username:r,email:i})=>M(n,{wrap:!1,gap:`sm`,padding:`none`,children:[!t&&j(u,{className:`size-10 shadow-card`,children:j(l,{className:`bg-muted-weak`,children:j(be,{size:28,className:`text-text-negative`})})}),t&&j(u,{className:`size-10 shadow-card`,children:j(l,{style:{backgroundColor:Se.hex(t)},children:j(be,{size:28,className:`text-white`})})}),M(n,{vertical:!0,padding:`none`,gap:`none`,align:`start`,children:[j(e,{className:`font-medium text-sm text-text-positive-weak`,children:r??`Unknown User`}),j(e,{variant:`sm`,className:`mt-0! text-text-positive-weak text-xs`,children:i})]})]}),Ve=C(null),He=()=>{let e=T(Ve);if(!e)throw Error(`useTableInnerWrapperContext must be used within a TableInnerWrapperProvider`);return e},Ue=C(null),We=()=>{let e=T(Ue);if(!e)throw Error(`useTableInnerTableContext must be used within a TableInnerTableProvider`);return e},Ge=C(null),Ke=()=>{let e=T(Ge);if(!e)throw Error(`useTableHeaderRowContext must be used within a TableHeaderRowProvider`);return e},qe=C(null),Je=()=>{let e=T(qe);if(!e)throw Error(`useTableBodyContext must be used within a TableBodyProvider`);return e},Ye=C(null),Xe=()=>{let e=T(Ye);if(!e)throw Error(`useTableRowContext must be used within a TableRowProvider`);return e},Ze=C(null),R=()=>{let e=T(Ze);if(!e)throw Error(`useTableContext must be used within a TableProvider`);return e},z=w(({isPinned:e,onLeftPin:t,onRightPin:n,onUnpin:r,className:i})=>{let a=E(()=>{t?.(`left`)},[t]),o=E(()=>{n?.(`right`)},[n]),s=E(()=>{r?.(!1)},[r]);return M(_,{children:[j(m,{asChild:!0,children:j(`button`,{className:x(`absolute right-2 z-10 p-0.5 opacity-0`,`cursor-pointer rounded-full transition-all`,`text-text-positive-weak`,`[&>svg]:size-4`,`group-hover:opacity-100`,`hover:bg-muted-muted hover:text-text-positive`,i),children:j(ce,{})})}),j(g,{align:`end`,className:`w-64 p-4`,children:M(h,{className:`*:data-[slot=dropdown-menu-item]:rounded-xs *:data-[slot=dropdown-menu-item]:p-2`,children:[j(S,{mode:e?`visible`:`hidden`,children:M(f,{onClick:s,children:[!!e&&`Unpin`,j(p,{children:j(ge,{className:`size-4`})})]})}),M(S,{mode:e?`hidden`:`visible`,children:[M(f,{onClick:a,children:[e?`Unpin`:`Pin to Left`,j(p,{children:j(me,{className:`size-4`})})]}),M(f,{onClick:o,children:[e?`Unpin`:`Pin to Right`,j(p,{children:j(he,{className:`size-4`})})]})]})]})})]})});z.displayName=`UITableHeadCellOption`;const B=w(({isPinned:e,isAllRowsSelected:t,style:n,onToggleAllRowsSelected:r,...i})=>{let a=E(e=>{r?.(!!e)},[r]);return j(`th`,{slot:`table-header-cell`,"data-pinned":!0,style:{left:0,zIndex:20,width:60,maxWidth:60},className:x(e?`sticky`:`relative`),...i,children:j(`div`,{className:`absolute inset-0 flex items-center justify-center`,onClick:e=>{e.preventDefault(),e.stopPropagation()},children:j(v,{"aria-label":`Select All Rows`,checked:t,onCheckedChange:a})})})});B.displayName=`UITableHeadCellSelect`;const V=w(({isEmpty:e,isFetching:t})=>!e&&!t?null:M(`div`,{className:`sticky left-0 flex min-h-96 flex-1 items-center justify-center bg-transparent text-text-positive-weak opacity-100`,children:[t&&M(`div`,{className:`flex flex-col items-center gap-1`,children:[j(y,{className:`size-12`}),j(`p`,{children:`Loading data...`})]}),e&&!t&&M(`div`,{className:`flex flex-col items-center gap-1`,children:[j(F,{strokeWidth:1,size:48}),j(`p`,{children:`No data available`})]})]}));V.displayName=`UITableEmptyDisplay`;const Qe=w(({className:e,children:t,...n})=>j(`div`,{slot:`table-wrapper`,className:x(`relative m-0 flex size-full flex-col flex-nowrap items-start justify-start gap-2`,e),...n,children:t}));Qe.displayName=`UITableWrapper`;const H=w(({children:e,...t})=>{let{innerWrapperId:n}=He();return j(`div`,{id:n,slot:`table-inner-wrapper`,className:`relative size-full overflow-auto border-b border-b-border border-l border-l-border bg-card`,...t,children:e})});H.displayName=`UITableInnerWrapper`;const U=w(({children:e,...t})=>{let{table:n,innerTableId:r,totalSize:i}=We(),a=k(null);return D(()=>{if(!a.current)return;let e=n.getFlatHeaders(),t=new ResizeObserver(t=>{requestAnimationFrame(()=>{let r=t[0].target;if(r instanceof HTMLTableElement){let i=t[0];if(!i)return;let a=i.contentRect.width,{left:o=[],right:s=[]}=n.getState().columnPinning,c=0,l=0,u=0,d=e.map(e=>{let{id:t}=e,n=t===`select`||t===`actions`,r=o.includes(t)||s.includes(t),i=e.getSize(),a=e.column.columnDef.maxSize;return n?(c+=60,{id:t,isFlex:!1,width:60}):r?(c+=i,{id:t,isFlex:!1,width:i}):e.column.columnDef.size||i!==150?(u+=i,{id:t,isFlex:!1,width:i}):(l++,{id:t,isFlex:!0,maxSize:a})}),f=a-c-u,p=l>0?Math.max(0,Math.floor(f/l)):0;d.forEach(e=>{if(e.isFlex){let t=e.maxSize?Math.min(p,e.maxSize):p;r.style.setProperty(`--header-${e.id}-size`,`${t}`),r.style.setProperty(`--col-${e.id}-size`,`${t}`),e.maxSize&&r.style.setProperty(`--col-${e.id}-maxSize`,`${e.maxSize}`)}else r.style.setProperty(`--header-${e.id}-size`,`${e.width}`),r.style.setProperty(`--col-${e.id}-size`,`${e.width}`)})}})});return t.observe(a.current),()=>t.disconnect()},[n.getState().columnSizingInfo,n.getState().columnSizing,n.getState().columnPinning]),j(`table`,{id:r,ref:a,slot:`table-inner-table`,className:`grid w-full table-fixed caption-bottom border-collapse border-spacing-0 flex-col content-start [&_tfoot_td]:border-t`,style:{minWidth:i},...t,children:e})});U.displayName=`UITableInnerTable`;const W=w(({className:e,children:t,...n})=>j(`thead`,{slot:`table-head`,className:x(`sticky top-0 z-20 h-9 w-full`,`grid select-none bg-muted-bg-subtle`,`border-b border-b-border shadow`,`font-medium text-[13px] text-text-positive-weak`,`[&_tr:not(:last-child)_td]:border-b`,`[&_th]:inline-flex`,`[&_th]:items-center`,`[&_th]:transition-all`,`[&_th]:duration-300`,`[&_th]:whitespace-nowrap`,`[&_th]:border-border`,`[&_th]:last:border-r-0`,`[&_th]:first:border-l-0`,`[&_tr_th:not([data-pinned=false])]:bg-muted-bg-subtle`,e),...n,children:t}));W.displayName=`UITableHead`;const G=w(({headerGroup:e,className:t,...n})=>{let{isAllRowsSelected:r,columnPinningState:i,leftPinnedHeaders:a,rightPinnedHeaders:o,onToggleAllRowsSelected:s}=Ke(),c=o[0]?.id,l=a[a.length-1]?.id;return j(`tr`,{slot:`table-head-row`,className:x(`flex`,t),...n,children:e.headers.map((e,t)=>{let n=e.column.getIsVisible(),a=i.left?.includes(e.id)?`left`:i.right?.includes(e.id)?`right`:!1;return e.id===`select`?j(B,{isPinned:a,isAllRowsSelected:r,onToggleAllRowsSelected:s},e.id):j(K,{isVisible:n,isPinned:a,isFirstCell:e.id===c,isLastCell:e.id===l,isOptionsVisible:![`select`,`actions`].includes(e.id),headerId:e.id,headerColumn:e.column,colSpan:e.colSpan,onColumnPin:e.column.pin,onToggleVisibility:e.column.toggleVisibility,children:I(e.column.columnDef.header,e.getContext())},`${e.id}-${t}`)})})});G.displayName=`UITableHeadRow`;const K=w(({isVisible:e=!0,isPinned:t=!1,isFirstCell:n=!1,isLastCell:r=!1,isOptionsVisible:i=!0,headerId:a,headerColumn:o,className:s,children:c,onColumnPin:l,onToggleVisibility:u,...d})=>{let f=O(()=>t?20:void 0,[t]),p=O(()=>{let e=o?.getStart?.(`left`);return t===`left`&&typeof e==`number`?`${e}px`:void 0},[t,o]),m=O(()=>{let e=o?.getAfter?.(`right`);return t===`right`&&typeof e==`number`?`${e}px`:void 0},[t,o]),h=O(()=>`calc(var(--header-${a}-size) * 1px)`,[a]),g=O(()=>o?.columnDef.minSize?`calc(var(--col-${a}-minSize) * 1px)`:void 0,[a,o]),_=O(()=>o?.columnDef.maxSize?`calc(var(--col-${a}-maxSize) * 1px)`:void 0,[a,o]);return M(`th`,{slot:`table-head-cell`,"data-pinned":t,"data-header":a,style:{zIndex:f,left:p,right:m,width:h,minWidth:g,maxWidth:_},className:x(`group flex`,t?`sticky`:`relative`,t===`left`&&r&&`border-r border-r-border`,t===`right`&&n&&`border-l border-l-border`,o?.columnDef.meta?.position===`center`&&`justify-center`,o?.columnDef.meta?.position===`end`&&`justify-end`,o?.columnDef.meta?.position===`start`&&`justify-start`,s),...d,children:[j(`div`,{className:`truncate pl-4`,children:c}),i&&j(z,{isPinned:t,isVisible:e,onLeftPin:l,onRightPin:l,onUnpin:l})]})});K.displayName=`UITableHeadCell`;const q=w(({height:e,className:t,children:n,...r})=>{let{isFetching:i,isEmpty:a}=Je();return a||i?null:j(`tbody`,{slot:`table-body`,style:{height:e},className:x(`relative w-full`,`grid`,`[&_tr]:absolute`,`[&_tr]:flex`,`[&_tr]:flex-none`,`[&_tr]:w-full`,`[&_tr]:cursor-pointer [&_tr]:focus:outline-none`,`[&_tr]:border-b [&_tr]:border-b-border`,`[&_td]:z-10`,`[&_td]:transition-all`,`[&_td]:duration-300`,`[&_td]:flex`,`[&_td]:flex-none`,`[&_td]:overflow-hidden`,`[&_td]:whitespace-nowrap`,`[&_td]:px-4`,`[&_td]:py-2.5`,`[&_td]:align-middle`,`[&_td]:border-border`,`[&_td]:data-[selected=true]:bg-muted-muted!`,`[&_td]:data-[selected=true]:hover:bg-muted-muted!`,`[&_td>div]:inline-flex`,`[&_td>div]:items-center`,`[&_td>div]:w-full`,`[&_td:not([data-pinned=false])]:z-20`,`[&_td:not([data-pinned=false])]:sticky`,`[&_td:not([data-pinned=false])]:bg-card`,`**:data-lastcell:border-r`,`**:data-firstcell:border-l`,t),...r,children:n})});q.displayName=`UITableBody`;const J=w(({row:e,isSelected:t,virtualRowIndex:n,virtualRowStart:r,children:i,...a})=>{let{keyOfClickRow:o,isAllRowsSelected:s,columnPinningState:c,leftPinnedHeaders:l,rightPinnedHeaders:u,onClickRow:d}=Xe(),f=O(()=>c.left??[],[c]),p=O(()=>c.right??[],[c]),m=O(()=>u?.[0]?.id,[u]),h=O(()=>l?.[l.length-1]?.id,[l]),g=E(t=>{let r=o?e.original?.[o]:void 0;d?.(n,typeof r==`string`||typeof r==`number`?r:void 0),t.preventDefault(),t.stopPropagation()},[o,d,e,n]);return j(`tr`,{slot:`table-row`,"data-index":n,style:{transform:`translateY(${r}px)`},className:`group`,onClick:g,...a,children:e.getVisibleCells().map((e,r)=>{let i=f.includes(e.column.id),a=p.includes(e.column.id),o=i?`left`:a?`right`:!1;return e.column.id===`actions`?j(X,{"data-col":e.column.id,"data-cell":n,"data-selected":t||void 0,virtualRowIndex:n,column:e.column,getContext:e.getContext},`${e.id}-${r}`):e.column.id===`select`?j(Y,{"data-col":e.column.id,"data-cell":n,"data-selected":t||void 0,isPinned:o,isSelected:s||t,onToggleRowSelected:e.row.toggleSelected},`${e.id}-${r}`):j(Z,{"data-col":e.column.id,"data-cell":n,"data-selected":t||void 0,isPinned:o,isFirstCell:e.column.id===m,isLastCell:e.column.id===h,colId:e.column.id,position:e.column.columnDef.meta?.position??`start`,column:e.column,getContext:e.getContext},`${e.id}-${r}`)})})});J.displayName=`UITableRow`;const Y=w(({isPinned:e,isSelected:t=!1,className:n,onToggleRowSelected:r,...i})=>{let a=E(e=>{r?.(!!e)},[r]);return j(`td`,{slot:`table-body-cell`,"data-pinned":!0,style:{left:0,zIndex:20,width:60,maxWidth:60},className:x(`group-hover:bg-muted-bg-subtle!`,e?`sticky`:`relative`,n),...i,children:j(`div`,{"data-slot":`table-cell-inner`,className:`flex! w-full! items-center justify-center bg-transparent text-center align-middle`,onClick:e=>{e.preventDefault(),e.stopPropagation()},children:j(v,{"aria-label":`Select Row`,checked:t,onCheckedChange:a})})})});Y.displayName=`UITableCellSelect`;const X=w(({virtualRowIndex:e,column:t,getContext:n,className:r,...i})=>{let a=O(()=>I(t?.columnDef.cell,n()),[t,n]);return j(`td`,{"data-col":`actions`,"data-cell":e,className:`sticky inset-y-0 right-0 z-50 flex items-center pr-4 group-hover:bg-muted-bg-subtle!`,...i,children:a})});X.displayName=`UITableCellActions`;const Z=w(({isPinned:e=!1,isFirstCell:t=!1,isLastCell:n=!1,colId:r,position:i=`start`,column:a,getContext:o,...s})=>{let{innerTableId:c,table:l}=We(),u=k(document.querySelector(`table[id="${c}"]`)),d=k(null),f=O(()=>{let t=a?.getStart(`left`);return e===`left`&&typeof t==`number`?`${t}px`:void 0},[e,a]),p=O(()=>{let t=a?.getAfter(`right`);return e===`right`&&typeof t==`number`?`${t}px`:void 0},[e,a]),m=O(()=>`calc(var(--col-${r}-size) * 1px)`,[r]),h=O(()=>a?.columnDef.minSize?`calc(var(--col-${r}-minSize) * 1px)`:void 0,[r,a]),g=O(()=>a?.columnDef.maxSize?`calc(var(--col-${r}-maxSize) * 1px)`:void 0,[r,a]),_=O(()=>I(a?.columnDef.cell,o()),[a,o]);return D(()=>{if(!d.current)return;let e=d.current.scrollWidth,t=a?.getSize();t&&e>t&&u.current instanceof HTMLTableElement&&typeof r==`string`&&a?.columnDef.meta?.fitContent&&l.setColumnSizing(t=>({...t,[r]:e+32}))},[r,a,l]),j(`td`,{slot:`table-body-cell`,"data-pinned":e,"data-lastcell":n||void 0,"data-firstcell":t||void 0,style:{left:f,right:p,width:m,minWidth:h,maxWidth:g},className:`group-hover:bg-muted-bg-subtle!`,...s,children:j(`div`,{ref:d,slot:`table-body-cell-inner`,className:x(i===`start`&&`justify-start`,i===`center`&&`justify-center`,i===`end`&&`justify-end`),children:_})})});Z.displayName=`UITableCell`;const $e=w(({className:e,children:t,...n})=>j(`tfoot`,{slot:`table-footer`,className:x(`flex w-full justify-center border-border-weak border-t py-2 font-medium [&>tr]:last:border-b-0`,e),...n,children:t}));$e.displayName=`UITableFooter`;const Q=w(({virtualRowIndex:e,virtualRowStart:t,fetchMoreData:n})=>{let{innerWrapperId:r}=He(),i=k(document.querySelector(`div[id="${r}"]`)),a=k(null),[o,s]=A(`idle`),[c,l]=A(0),u=E(async()=>{try{s(`fetching`),await n?.(),s(`idle`)}catch(e){console.error(`Error fetching more data:`,e),s(`error`)}},[n]);return D(()=>{if(!i.current)return;let e=new ResizeObserver(e=>{l(e[0].contentRect.width)});return e.observe(i.current),()=>e.disconnect()},[]),n?j(`tr`,{ref:a,"data-index":e,style:{transform:`translateY(${t}px)`,width:c},className:`sticky! left-0 h-10`,children:j(`td`,{className:`absolute left-0 flex w-full items-center justify-center text-xs`,children:M(`button`,{type:`button`,disabled:o===`fetching`,className:x(`flex cursor-pointer gap-x-0.5`,o===`fetching`&&`cursor-not-allowed`,o===`idle`&&`text-text-positive-weak hover:text-text-positive`,o===`error`&&`text-danger hover:text-danger-strong`),onClick:u,children:[o===`idle`&&j(ie,{className:`size-4`}),o===`fetching`&&j(y,{className:`size-4 animate-spin`}),o===`error`&&j(N,{className:`size-4 text-danger`}),o===`idle`&&`Load More`,o===`fetching`&&`Loading...`,o===`error`&&`Error! Retry?`]})})}):null});Q.displayName=`UITableLoadMore`;const et=()=>{let{table:e,isEmpty:t,isFetching:n,fetchMoreData:r}=R(),{rowSelectionState:i}=Je(),a=k(null),{rows:o}=e.getRowModel(),s=De({count:o.length+1,estimateSize:()=>40,getScrollElement:()=>a.current,measureElement:typeof window<`u`&&navigator.userAgent.indexOf(`Firefox`)===-1?e=>e?.getBoundingClientRect().height:void 0,overscan:2}),c=O(()=>{let e=s.getTotalSize(),t=a.current?.clientHeight||0;return e<t?`${t}px`:`${e}px`},[s.getTotalSize()]);return j(ee,{direction:`horizontal`,style:{direction:e.options.columnResizeDirection},className:`relative flex w-full max-w-full flex-1 gap-1 overflow-auto border-t border-t-border border-r border-r-border bg-slate-50 p-0 text-sm`,children:j(b,{className:`relative`,children:M(H,{ref:a,children:[M(U,{children:[j(W,{children:e.getHeaderGroups().map(e=>j(G,{headerGroup:e},e.id))}),j(q,{height:c,children:s.getVirtualItems().map(e=>{let t=o[e.index],n=Object.entries(i).some(([e,n])=>e===`${t?.id}`&&n);return t?j(J,{ref:s.measureElement,row:t,isSelected:n,virtualRowIndex:e.index,virtualRowStart:e.start},e.index):j(Q,{virtualRowIndex:e.index,virtualRowStart:e.start,fetchMoreData:r},e.index)})})]}),j(V,{isEmpty:t,isFetching:n})]})})})},tt=({checked:e,title:t,onCheckedChange:n})=>M(`div`,{className:`flex h-fit items-center gap-2`,children:[j(v,{checked:e,onCheckedChange:n}),j(`p`,{className:`text-sm`,children:t})]}),nt=()=>{let{table:e}=R(),[n,r]=A(null);return j(b,{defaultSize:25,className:x(`bg-card`,n===null?`max-w-8!`:`min-w-64`),children:M(`div`,{className:`relative z-20 flex size-full bg-muted-bg-subtle`,children:[M(`div`,{className:`flex-1`,children:[j(S,{mode:n===`columns`?`visible`:`hidden`,children:M(`div`,{className:`flex size-full flex-col gap-2 p-4`,children:[j(`p`,{className:`px-2 font-medium`,children:`Columns Visibility`}),j(d,{}),j(`div`,{className:`flex flex-col gap-4 pt-4`,children:e.getAllColumns().map(e=>[`select`,`actions`].includes(e.id)?null:j(tt,{checked:e.getIsVisible(),title:String(e.columnDef.header),onCheckedChange:t=>e.toggleVisibility(!!t)},e.id))})]})}),j(S,{mode:n===`filters`?`visible`:`hidden`,children:j(`div`,{className:`flex size-full flex-col p-2`,children:M(t,{variant:`outline`,color:`muted`,children:[j(de,{}),`Add Filter`]})})})]}),M(`div`,{className:`flex h-full flex-col border-border border-l bg-muted-bg-subtle text-sm`,children:[M(`button`,{className:x(`flex h-32 cursor-pointer flex-col items-center gap-y-2 p-2 py-4`,n===`columns`&&`bg-card`),onClick:()=>r(n===`columns`?null:`columns`),children:[j(oe,{size:18}),j(`span`,{className:`text-nowrap [writing-mode:vertical-lr]`,children:`Columns`})]}),j(d,{}),M(`button`,{className:x(`flex h-32 cursor-pointer flex-col items-center gap-y-2 p-2 py-4`,n===`filters`&&`bg-card`),onClick:()=>r(n===`filters`?null:`filters`),children:[j(ue,{size:18}),j(`span`,{className:`text-nowrap [writing-mode:vertical-lr]`,children:`Filters`})]}),j(d,{})]})]})})},rt=w(({innerWrapperId:e,children:t})=>{let n=O(()=>({innerWrapperId:e}),[e]);return j(Ve.Provider,{value:n,children:t})});rt.displayName=`UITableInnerWrapperProvider`;const it=w(({table:e,innerTableId:t,totalSize:n,children:r})=>{let i=O(()=>({table:e,innerTableId:t,totalSize:n}),[e,t,n]);return j(Ue.Provider,{value:i,children:r})});it.displayName=`UITableInnerTableProvider`;const at=w(({isAllRowsSelected:e,columnPinningState:t,leftPinnedHeaders:n,rightPinnedHeaders:r,onToggleAllRowsSelected:i,children:a})=>{let o=O(()=>({isAllRowsSelected:e,columnPinningState:t,leftPinnedHeaders:n,rightPinnedHeaders:r,onToggleAllRowsSelected:i}),[e,t,n,r,i]);return j(Ge.Provider,{value:o,children:a})});at.displayName=`UITableHeadRowProvider`;const ot=w(({isFetching:e,isEmpty:t,rowSelectionState:n,children:r})=>{let i=O(()=>({isFetching:e,isEmpty:t,rowSelectionState:n}),[e,t,n]);return j(qe.Provider,{value:i,children:r})});ot.displayName=`UITableBodyProvider`;const st=w(({keyOfClickRow:e,isAllRowsSelected:t,columnPinningState:n,leftPinnedHeaders:r,rightPinnedHeaders:i,onClickRow:a,children:o})=>{let s=O(()=>({keyOfClickRow:e,isAllRowsSelected:t,columnPinningState:n,leftPinnedHeaders:r,rightPinnedHeaders:i,onClickRow:a}),[e,t,n,r,i,a]);return j(Ye.Provider,{value:s,children:o})});st.displayName=`UITableRowProvider`;const ct=({title:e,isFetching:t=!1,isRefetching:n=!1,data:r,columns:i,totalRows:a,leftPinnedColumns:o=[],rightPinnedColumns:s=[],keyOfClickRow:c,onClickRow:l,onRowSelection:u,onColumnPinning:d,fetchMoreData:f,children:p})=>{let m=ne(),h=ne(),[g,_]=A({}),[v,y]=A({right:s,left:[`select`,...o]}),[b,ee]=A({}),te=E(e=>(_(e),u?.(e instanceof Function?e(g):e),e),[g,u]),x=E(e=>{y(e),d?.(e instanceof Function?e(v):e)},[v,d]),S=Ee({data:r,columns:i,state:{rowSelection:g,columnPinning:v,expanded:b},defaultColumn:{enableResizing:!1,size:void 0,minSize:void 0,maxSize:void 0},columnResizeMode:`onChange`,columnResizeDirection:`ltr`,enableColumnPinning:!0,enableRowSelection:!0,enableColumnResizing:!0,enableMultiRowSelection:!0,autoResetAll:!1,autoResetExpanded:!1,autoResetPageIndex:!1,getSubRows:e=>e.subRows,getCoreRowModel:Ce(),getGroupedRowModel:Te(),getExpandedRowModel:we(),onRowSelectionChange:te,onColumnPinningChange:x,onExpandedChange:ee}),C=O(()=>{let{rows:e}=S.getRowModel();return e},[S.getRowModel().rows,S.getState().columnPinning]),w=O(()=>!t&&C.length===0,[C,t]),T=O(()=>({title:e,table:S,isEmpty:w,isFetching:t,isRefetching:n,totalRows:a,fetchMoreData:f}),[e,S,w,n,t,a,f,S.getState().columnPinning,S.getState().expanded]),D=O(()=>S.getState(),[S.getState()]),k=O(()=>S.getIsAllRowsSelected(),[S.getIsAllRowsSelected()]),M=O(()=>D.rowSelection,[D.rowSelection]),N=O(()=>D.columnPinning,[D.columnPinning]),P=O(()=>S.getLeftHeaderGroups()[0]?.headers||[],[S.getState().columnPinning]),F=O(()=>S.getRightHeaderGroups()[0]?.headers||[],[S.getState().columnPinning]),re=O(()=>S.getTotalSize(),[S.getTotalSize()]);return j(Ze.Provider,{value:T,children:j(rt,{innerWrapperId:m,children:j(it,{table:S,innerTableId:h,totalSize:re,children:j(at,{isAllRowsSelected:k,columnPinningState:N,leftPinnedHeaders:P,rightPinnedHeaders:F,onToggleAllRowsSelected:S.toggleAllRowsSelected,children:j(ot,{isFetching:t,isEmpty:w,rowSelectionState:M,children:j(st,{keyOfClickRow:c,isAllRowsSelected:k,columnPinningState:N,leftPinnedHeaders:P,rightPinnedHeaders:F,onClickRow:l,children:p})})})})})})},lt=({onSearch:e,onChange:t,...n})=>{let r=Oe(t=>{e?.(t)},500);return M(`div`,{className:`relative w-full max-w-80 flex-1`,children:[j(te,{...n,size:`lg`,type:`search`,placeholder:`Search records...`,className:`flex-1 ps-9 pe-9`,onChange:e=>{t?.(e),r(e.target.value??``)}}),j(`div`,{className:`pointer-events-none absolute inset-y-0 start-0 flex items-center justify-center ps-3 text-text-positive-weak peer-disabled:opacity-50`,children:j(ve,{size:16})}),j(`button`,{className:`absolute inset-y-0 end-0 flex h-full w-9 items-center justify-center rounded-e-md text-text-positive-weak outline-none transition-[color,box-shadow] hover:text-text-positive focus:z-10 focus-visible:border focus-visible:border-primary-strong focus-visible:ring-[3px] focus-visible:ring-primary-weak disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,"aria-label":`Submit search`,type:`submit`,children:j(P,{size:16,"aria-hidden":`true`})})]})},$=({children:e,disabled:t,onClick:n})=>j(`button`,{type:`button`,disabled:t,className:`flex cursor-pointer items-center gap-x-1 rounded-sm border border-border bg-background p-2.5 text-sm text-text-positive-weak outline-none transition-all hover:shadow-card focus:border-border-emphasis focus:bg-muted-muted active:border-border-emphasis active:bg-muted-muted active:text-text-positive disabled:pointer-events-none disabled:cursor-default disabled:opacity-60 [&_svg]:size-3.5`,onClick:n,children:e}),ut=({onCreate:e,onDownload:t,onRefresh:n})=>M(`div`,{className:`flex [&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none`,children:[j($,{disabled:!e,onClick:t=>{e?.(),t.stopPropagation(),t.preventDefault()},children:j(ae,{})}),j($,{disabled:!n,onClick:e=>{n?.(),e.stopPropagation(),e.preventDefault()},children:j(_e,{})}),j($,{disabled:!t,onClick:e=>{t?.(),e.stopPropagation(),e.preventDefault()},children:j(se,{})})]}),dt=({children:e})=>{let{title:t}=R();return M(`div`,{"data-slot":`table-tooltip`,className:`relative m-0 flex w-full flex-0 flex-col flex-wrap items-start space-y-2 p-0 px-2 text-sm`,children:[j(`h3`,{className:`font-semibold text-base text-text-positive`,children:t}),j(`div`,{className:`flex w-full flex-1 justify-between gap-x-2`,children:e})]})};dt.displayName=`TableTooltip`;export{ke as UITableBadgeDisplay,q as UITableBody,Ae as UITableBooleanDisplay,Z as UITableCell,X as UITableCellActions,Y as UITableCellSelect,et as UITableContainer,je as UITableDateDisplay,Me as UITableDescriptionDisplay,V as UITableEmptyDisplay,nt as UITableFilter,$e as UITableFooter,W as UITableHead,K as UITableHeadCell,z as UITableHeadCellOption,B as UITableHeadCellSelect,G as UITableHeadRow,U as UITableInnerTable,H as UITableInnerWrapper,Q as UITableLoadMore,Ne as UITableMoreButton,Pe as UITableNameDisplay,Fe as UITablePermalink,Ie as UITablePhoneNumberDisplay,ct as UITableProvider,Le as UITableRemoveButton,J as UITableRow,ze as UITableStatisticDisplay,dt as UITableTooltip,ut as UITableTooltipActions,lt as UITableTooltipFilter,Be as UITableUserDataDisplay,Qe as UITableWrapper};
1
+ import{t as e}from"../../paragraph-DmiXlAnE.mjs";import"../../button.variants-B_dFX3i2.mjs";import{t}from"../../button-D8BUqpI2.mjs";import{t as n}from"../../flex-CeizYtXs.mjs";import{t as r}from"../../date-uVTm7J09.mjs";import{t as i}from"../../badge-B4Fa7-J3.mjs";import{i as a,n as o,r as s,t as c}from"../../tooltip-B3dTcgcc.mjs";import{n as l,t as u}from"../../avatar-DReNH6rV.mjs";import{t as d}from"../../separator-Bf0gymN4.mjs";import{a as f,d as p,h as m,i as h,r as g,t as _}from"../../dropdown-menu-B8GUTfTp.mjs";import{t as v}from"../../checkbox-Bg2FiuQw.mjs";import{t as y}from"../../spinner-D1v3Bard.mjs";import{n as b,r as ee}from"../../resizable-RPObV6jc.mjs";import{t as te}from"../../input-DMjPBcJO.mjs";import{cn as x}from"@customafk/react-toolkit/utils";import{jsx as S,jsxs as C}from"react/jsx-runtime";import{AlertTriangle as w,ArrowRightIcon as T,BoxIcon as ne,CheckIcon as E,ChevronDown as re,CirclePlus as ie,Columns4Icon as D,DownloadIcon as O,EllipsisVerticalIcon as k,ExternalLinkIcon as ae,ListFilterIcon as oe,ListFilterPlus as se,MinusIcon as ce,MoreVerticalIcon as le,MoveLeftIcon as ue,MoveRightIcon as de,PinOffIcon as fe,RefreshCwIcon as pe,SearchIcon as me,Trash2Icon as he,UserRoundIcon as ge,XIcon as _e}from"lucide-react";import{Activity as A,createContext as j,memo as M,use as N,useCallback as P,useEffect as F,useId as ve,useMemo as I,useRef as L,useState as R}from"react";import{colorHashLight as ye}from"@customafk/react-toolkit/color-hash";import{flexRender as z,getCoreRowModel as be,getExpandedRowModel as xe,getGroupedRowModel as Se,useReactTable as Ce}from"@tanstack/react-table";import{useVirtualizer as we}from"@tanstack/react-virtual";import{useDebounceCallback as Te}from"@customafk/react-toolkit/hooks/useDebounceCallback";const B=()=>C(`div`,{className:`flex gap-0 text-text-positive-weak`,children:[S(ce,{size:16}),S(ce,{size:16})]}),Ee=({label:e,onClick:t,onRemove:n})=>e?n?C(`div`,{className:`flex w-fit gap-x-0.5 rounded-full border border-border py-1 pr-2 pl-3 text-text-positive text-xs shadow-xs`,onClick:e=>{t?.(),e.stopPropagation(),e.preventDefault()},children:[e,S(`button`,{className:`cursor-pointer text-text-positive-weak hover:text-text-positive-strong`,onClick:e=>{n?.(),e.stopPropagation(),e.preventDefault()},children:S(_e,{size:12})})]}):S(`button`,{className:`w-fit rounded-full border border-border px-3 py-1 text-text-positive text-xs shadow-xs`,onClick:e=>{t?.(),e.stopPropagation(),e.preventDefault()},children:e}):S(B,{}),De=({value:e})=>e==null?S(B,{}):e===!1?S(`div`,{className:`text-danger-strong`,children:S(_e,{})}):S(`div`,{className:`text-success-strong`,children:S(E,{})}),Oe=({date:e})=>e==null?S(B,{}):S(s,{children:C(c,{children:[S(a,{asChild:!0,children:S(i,{className:`h-fit`,children:S(r,{date:e,format:`medium`,className:`font-normal text-white`})})}),S(o,{className:`rounded px-2`,children:S(r,{date:e,format:`full`,showTime:!0,className:`font-medium text-text-negative text-xs`})})]})}),ke=({content:t})=>t==null?S(B,{}):C(c,{children:[S(a,{children:S(e,{variant:`sm`,className:`line-clamp-2 whitespace-pre-line break-all`,children:t})}),S(o,{align:`start`,className:`h-fit min-w-48 max-w-80 pt-4`,children:C(`div`,{className:`flex flex-col gap-y-2`,children:[S(e,{variant:`xs`,className:`whitespace-pre-line text-wrap break-keep text-text-negative-weak`,children:t}),C(`p`,{className:`w-full text-end`,children:[t.toString().length,` chars`]})]})})]}),Ae=({items:e=[]})=>C(_,{children:[S(m,{asChild:!0,children:S(t,{size:`sm`,variant:`ghost`,color:`secondary`,className:`size-9 rounded-full`,children:S(le,{})})}),S(g,{children:S(h,{children:e.map(e=>S(f,{className:`px-3`,onSelect:t=>{e.onClick(e.id),t.stopPropagation()},children:e.label},e.id))})})]}),je=({name:t})=>t?C(c,{children:[S(a,{children:S(e,{variant:`sm`,className:`line-clamp-2 w-full truncate text-wrap pb-px text-start`,children:t})}),S(o,{align:`start`,className:`h-fit min-w-48 max-w-80 pt-4`,children:C(`div`,{className:`flex flex-col gap-y-2`,children:[S(`p`,{className:`whitespace-pre-line text-wrap break-keep`,children:t}),C(`p`,{className:`w-full text-end`,children:[t.length,` chars`]})]})})]}):S(B,{}),Me=({href:e,label:t})=>C(`a`,{href:e,target:`_blank`,className:`inline-flex items-center gap-1 truncate text-primary text-sm underline`,rel:`noopener noreferrer`,children:[S(`span`,{children:t||e}),S(ae,{size:14})]}),Ne=({value:e})=>C(c,{children:[S(a,{asChild:!0,children:S(`p`,{className:`font-number text-secondary-foreground text-sm tabular-nums`,children:e.replace(/(\d{3})(\d{3})(\d{4})/,`($1) $2-$3`)})}),S(o,{align:`start`,children:S(`p`,{className:`tabular-nums`,children:e.slice(1).replace(/(\d{2})(\d{3})(\d{4})/,`(00) (+84) ($1) $2-$3`)})})]}),Pe=({title:e,onClick:n})=>C(c,{children:[S(a,{children:S(t,{type:`button`,variant:`ghost`,color:`danger`,size:`icon`,onClick:P(async e=>{e.preventDefault(),e.stopPropagation(),await n?.()},[n]),children:S(he,{})})}),S(o,{children:S(`p`,{children:e||`Remove item from list table`})})]}),Fe=(e,t,n)=>{let r=10**t;switch(n){case`floor`:return Math.floor(e*r)/r;case`ceil`:return Math.ceil(e*r)/r;default:return Math.round(e*r)/r}},Ie=M(({decimalSeparator:e=`.`,groupSeparator:t=`,`,prefix:r,suffix:i,precision:a,roundingMode:o=`round`,showTrailingZeros:s=!1,size:c=`lg`,value:l=0})=>{let u=I(()=>{let e={};return typeof a==`number`&&a>=0&&s&&(e.minimumFractionDigits=a),e.maximumFractionDigits=a,e},[a,s]),d=P(e=>{let t=e;return typeof a==`number`&&a>=0&&(t=Fe(e,a,o)),t.toLocaleString(`en-US`,u)},[o,u,a]),f=I(()=>{if(typeof l==`number`)return Number.isNaN(l)||!Number.isFinite(l)?`N/A`:d(l);if(typeof l==`string`){let e=l.trim();if(!e)return`N/A`;let t=Number(e);return Number.isNaN(t)||!Number.isFinite(t)?`N/A`:d(t)}return`N/A`},[l,d]),p=I(()=>e===`.`&&t===`,`?f:f.replace(/,/g,t).replace(/\./g,e),[f,e,t]);return p===`0`||p===`N/A`||!p?S(B,{}):C(n,{padding:`none`,className:x(`font-number text-lg text-secondary-foreground tabular-nums`,c===`xs`&&`text-xs`,c===`sm`&&`text-sm`,c===`md`&&`text-base`,c===`lg`&&`text-lg`,c===`xl`&&`text-xl`),children:[r,S(`p`,{children:p}),i]})});Ie.displayName=`UITableStatisticDisplay`;const Le=({uuid:t,username:r,email:i})=>C(n,{wrap:!1,gap:`sm`,padding:`none`,children:[!t&&S(u,{className:`size-10 shadow-card`,children:S(l,{className:`bg-muted-weak`,children:S(ge,{size:28,className:`text-text-negative`})})}),t&&S(u,{className:`size-10 shadow-card`,children:S(l,{style:{backgroundColor:ye.hex(t)},children:S(ge,{size:28,className:`text-white`})})}),C(n,{vertical:!0,padding:`none`,gap:`none`,align:`start`,children:[S(e,{className:`font-medium text-sm text-text-positive-weak`,children:r??`Unknown User`}),S(e,{variant:`sm`,className:`mt-0! text-text-positive-weak text-xs`,children:i})]})]}),Re=j(null),ze=()=>{let e=N(Re);if(!e)throw Error(`useTableInnerWrapperContext must be used within a TableInnerWrapperProvider`);return e},Be=j(null),Ve=()=>{let e=N(Be);if(!e)throw Error(`useTableInnerTableContext must be used within a TableInnerTableProvider`);return e},He=j(null),Ue=()=>{let e=N(He);if(!e)throw Error(`useTableHeaderRowContext must be used within a TableHeaderRowProvider`);return e},We=j(null),Ge=()=>{let e=N(We);if(!e)throw Error(`useTableBodyContext must be used within a TableBodyProvider`);return e},Ke=j(null),qe=()=>{let e=N(Ke);if(!e)throw Error(`useTableRowContext must be used within a TableRowProvider`);return e},Je=j(null),V=()=>{let e=N(Je);if(!e)throw Error(`useTableContext must be used within a TableProvider`);return e},H=M(({isPinned:e,onLeftPin:t,onRightPin:n,onUnpin:r,className:i})=>{let a=P(()=>{t?.(`left`)},[t]),o=P(()=>{n?.(`right`)},[n]),s=P(()=>{r?.(!1)},[r]);return C(_,{children:[S(m,{asChild:!0,children:S(`button`,{className:x(`absolute right-2 z-10 p-0.5 opacity-0`,`cursor-pointer rounded-full transition-all`,`text-text-positive-weak`,`[&>svg]:size-4`,`group-hover:opacity-100`,`hover:bg-muted-muted hover:text-text-positive`,i),children:S(k,{})})}),S(g,{align:`end`,className:`w-64 p-4`,children:C(h,{className:`*:data-[slot=dropdown-menu-item]:rounded-xs *:data-[slot=dropdown-menu-item]:p-2`,children:[S(A,{mode:e?`visible`:`hidden`,children:C(f,{onClick:s,children:[!!e&&`Unpin`,S(p,{children:S(fe,{className:`size-4`})})]})}),C(A,{mode:e?`hidden`:`visible`,children:[C(f,{onClick:a,children:[e?`Unpin`:`Pin to Left`,S(p,{children:S(ue,{className:`size-4`})})]}),C(f,{onClick:o,children:[e?`Unpin`:`Pin to Right`,S(p,{children:S(de,{className:`size-4`})})]})]})]})})]})});H.displayName=`UITableHeadCellOption`;const U=M(({isPinned:e,isAllRowsSelected:t,style:n,onToggleAllRowsSelected:r,...i})=>{let a=P(e=>{r?.(!!e)},[r]);return S(`th`,{slot:`table-header-cell`,"data-pinned":!0,style:{left:0,zIndex:20,width:60,maxWidth:60},className:x(e?`sticky`:`relative`),...i,children:S(`div`,{className:`absolute inset-0 flex items-center justify-center`,onClick:e=>{e.preventDefault(),e.stopPropagation()},children:S(v,{"aria-label":`Select All Rows`,checked:t,onCheckedChange:a})})})});U.displayName=`UITableHeadCellSelect`;const W=M(({isEmpty:e,isFetching:t})=>!e&&!t?null:C(`div`,{className:`sticky left-0 flex min-h-96 flex-1 items-center justify-center bg-transparent text-text-positive-weak opacity-100`,children:[t&&C(`div`,{className:`flex flex-col items-center gap-1`,children:[S(y,{className:`size-12`}),S(`p`,{children:`Loading data...`})]}),e&&!t&&C(`div`,{className:`flex flex-col items-center gap-1`,children:[S(ne,{strokeWidth:1,size:48}),S(`p`,{children:`No data available`})]})]}));W.displayName=`UITableEmptyDisplay`;const Ye=M(({className:e,children:t,...n})=>S(`div`,{slot:`table-wrapper`,className:x(`relative m-0 flex size-full flex-col flex-nowrap items-start justify-start gap-2`,e),...n,children:t}));Ye.displayName=`UITableWrapper`;const G=M(({children:e,...t})=>{let{innerWrapperId:n}=ze();return S(`div`,{id:n,slot:`table-inner-wrapper`,className:`relative size-full overflow-auto border-b border-b-border border-l border-l-border bg-card`,...t,children:e})});G.displayName=`UITableInnerWrapper`;const K=M(({children:e,...t})=>{let{table:n,innerTableId:r,totalSize:i}=Ve(),a=L(null);return F(()=>{if(!a.current)return;let e=n.getFlatHeaders(),t=new ResizeObserver(t=>{requestAnimationFrame(()=>{let r=t[0].target;if(r instanceof HTMLTableElement){let i=t[0];if(!i)return;let a=i.contentRect.width,{left:o=[],right:s=[]}=n.getState().columnPinning,c=0,l=0,u=0,d=e.map(e=>{let{id:t}=e,n=t===`select`||t===`actions`,r=o.includes(t)||s.includes(t),i=e.getSize(),a=e.column.columnDef.maxSize;return n?(c+=60,{id:t,isFlex:!1,width:60}):r?(c+=i,{id:t,isFlex:!1,width:i}):e.column.columnDef.size||i!==150?(u+=i,{id:t,isFlex:!1,width:i}):(l++,{id:t,isFlex:!0,maxSize:a})}),f=a-c-u,p=l>0?Math.max(0,Math.floor(f/l)):0;d.forEach(e=>{if(e.isFlex){let t=e.maxSize?Math.min(p,e.maxSize):p;r.style.setProperty(`--header-${e.id}-size`,`${t}`),r.style.setProperty(`--col-${e.id}-size`,`${t}`),e.maxSize&&r.style.setProperty(`--col-${e.id}-maxSize`,`${e.maxSize}`)}else r.style.setProperty(`--header-${e.id}-size`,`${e.width}`),r.style.setProperty(`--col-${e.id}-size`,`${e.width}`)})}})});return t.observe(a.current),()=>t.disconnect()},[n.getState().columnSizingInfo,n.getState().columnSizing,n.getState().columnPinning]),S(`table`,{id:r,ref:a,slot:`table-inner-table`,className:`grid w-full table-fixed caption-bottom border-collapse border-spacing-0 flex-col content-start [&_tfoot_td]:border-t`,style:{minWidth:i},...t,children:e})});K.displayName=`UITableInnerTable`;const q=M(({className:e,children:t,...n})=>S(`thead`,{slot:`table-head`,className:x(`sticky top-0 z-20 h-9 w-full`,`grid select-none bg-muted-bg-subtle`,`border-b border-b-border shadow`,`font-medium text-[13px] text-text-positive-weak`,`[&_tr:not(:last-child)_td]:border-b`,`[&_th]:inline-flex`,`[&_th]:items-center`,`[&_th]:transition-all`,`[&_th]:duration-300`,`[&_th]:whitespace-nowrap`,`[&_th]:border-border`,`[&_th]:last:border-r-0`,`[&_th]:first:border-l-0`,`[&_tr_th:not([data-pinned=false])]:bg-muted-bg-subtle`,e),...n,children:t}));q.displayName=`UITableHead`;const J=M(({headerGroup:e,className:t,...n})=>{let{isAllRowsSelected:r,columnPinningState:i,leftPinnedHeaders:a,rightPinnedHeaders:o,onToggleAllRowsSelected:s}=Ue(),c=o[0]?.id,l=a[a.length-1]?.id;return S(`tr`,{slot:`table-head-row`,className:x(`flex`,t),...n,children:e.headers.map((e,t)=>{let n=e.column.getIsVisible(),a=i.left?.includes(e.id)?`left`:i.right?.includes(e.id)?`right`:!1;return e.id===`select`?S(U,{isPinned:a,isAllRowsSelected:r,onToggleAllRowsSelected:s},e.id):S(Y,{isVisible:n,isPinned:a,isFirstCell:e.id===c,isLastCell:e.id===l,isOptionsVisible:![`select`,`actions`].includes(e.id),headerId:e.id,headerColumn:e.column,colSpan:e.colSpan,onColumnPin:e.column.pin,onToggleVisibility:e.column.toggleVisibility,children:z(e.column.columnDef.header,e.getContext())},`${e.id}-${t}`)})})});J.displayName=`UITableHeadRow`;const Y=M(({isVisible:e=!0,isPinned:t=!1,isFirstCell:n=!1,isLastCell:r=!1,isOptionsVisible:i=!0,headerId:a,headerColumn:o,className:s,children:c,onColumnPin:l,onToggleVisibility:u,...d})=>{let f=I(()=>t?20:void 0,[t]),p=I(()=>{let e=o?.getStart?.(`left`);return t===`left`&&typeof e==`number`?`${e}px`:void 0},[t,o]),m=I(()=>{let e=o?.getAfter?.(`right`);return t===`right`&&typeof e==`number`?`${e}px`:void 0},[t,o]),h=I(()=>`calc(var(--header-${a}-size) * 1px)`,[a]),g=I(()=>o?.columnDef.minSize?`calc(var(--col-${a}-minSize) * 1px)`:void 0,[a,o]),_=I(()=>o?.columnDef.maxSize?`calc(var(--col-${a}-maxSize) * 1px)`:void 0,[a,o]);return C(`th`,{slot:`table-head-cell`,"data-pinned":t,"data-header":a,style:{zIndex:f,left:p,right:m,width:h,minWidth:g,maxWidth:_},className:x(`group flex`,t?`sticky`:`relative`,t===`left`&&r&&`border-r border-r-border`,t===`right`&&n&&`border-l border-l-border`,o?.columnDef.meta?.position===`center`&&`justify-center`,o?.columnDef.meta?.position===`end`&&`justify-end`,o?.columnDef.meta?.position===`start`&&`justify-start`,s),...d,children:[S(`div`,{className:`truncate pl-4`,children:c}),i&&S(H,{isPinned:t,isVisible:e,onLeftPin:l,onRightPin:l,onUnpin:l})]})});Y.displayName=`UITableHeadCell`;const X=M(({height:e,className:t,children:n,...r})=>{let{isFetching:i,isEmpty:a}=Ge();return a||i?null:S(`tbody`,{slot:`table-body`,style:{height:e},className:x(`relative w-full`,`grid`,`[&_tr]:absolute`,`[&_tr]:flex`,`[&_tr]:flex-none`,`[&_tr]:w-full`,`[&_tr]:cursor-pointer [&_tr]:focus:outline-none`,`[&_tr]:border-b [&_tr]:border-b-border`,`[&_td]:z-10`,`[&_td]:transition-all`,`[&_td]:duration-300`,`[&_td]:flex`,`[&_td]:flex-none`,`[&_td]:overflow-hidden`,`[&_td]:whitespace-nowrap`,`[&_td]:px-4`,`[&_td]:py-2.5`,`[&_td]:align-middle`,`[&_td]:border-border`,`[&_td]:data-[selected=true]:bg-muted-muted!`,`[&_td]:data-[selected=true]:hover:bg-muted-muted!`,`[&_td>div]:inline-flex`,`[&_td>div]:items-center`,`[&_td>div]:w-full`,`[&_td:not([data-pinned=false])]:z-20`,`[&_td:not([data-pinned=false])]:sticky`,`[&_td:not([data-pinned=false])]:bg-card`,`**:data-lastcell:border-r`,`**:data-firstcell:border-l`,t),...r,children:n})});X.displayName=`UITableBody`;const Z=M(({row:e,isSelected:t,virtualRowIndex:n,virtualRowStart:r,children:i,...a})=>{let{keyOfClickRow:o,isAllRowsSelected:s,columnPinningState:c,leftPinnedHeaders:l,rightPinnedHeaders:u,onClickRow:d}=qe(),f=I(()=>c.left??[],[c]),p=I(()=>c.right??[],[c]),m=I(()=>u?.[0]?.id,[u]),h=I(()=>l?.[l.length-1]?.id,[l]),g=P(t=>{let r=o?e.original?.[o]:void 0;d?.(n,typeof r==`string`||typeof r==`number`?r:void 0),t.preventDefault(),t.stopPropagation()},[o,d,e,n]);return S(`tr`,{slot:`table-row`,"data-index":n,style:{transform:`translateY(${r}px)`},className:`group`,onClick:g,...a,children:e.getVisibleCells().map((e,r)=>{let i=f.includes(e.column.id),a=p.includes(e.column.id),o=i?`left`:a?`right`:!1;return e.column.id===`actions`?S($,{"data-col":e.column.id,"data-cell":n,"data-selected":t||void 0,virtualRowIndex:n,column:e.column,getContext:e.getContext},`${e.id}-${r}`):e.column.id===`select`?S(Q,{"data-col":e.column.id,"data-cell":n,"data-selected":t||void 0,isPinned:o,isSelected:s||t,onToggleRowSelected:e.row.toggleSelected},`${e.id}-${r}`):S(Xe,{"data-col":e.column.id,"data-cell":n,"data-selected":t||void 0,isPinned:o,isFirstCell:e.column.id===m,isLastCell:e.column.id===h,colId:e.column.id,position:e.column.columnDef.meta?.position??`start`,column:e.column,getContext:e.getContext},`${e.id}-${r}`)})})});Z.displayName=`UITableRow`;const Q=M(({isPinned:e,isSelected:t=!1,className:n,onToggleRowSelected:r,...i})=>{let a=P(e=>{r?.(!!e)},[r]);return S(`td`,{slot:`table-body-cell`,"data-pinned":!0,style:{left:0,zIndex:20,width:60,maxWidth:60},className:x(`group-hover:bg-muted-bg-subtle!`,e?`sticky`:`relative`,n),...i,children:S(`div`,{"data-slot":`table-cell-inner`,className:`flex! w-full! items-center justify-center bg-transparent text-center align-middle`,onClick:e=>{e.preventDefault(),e.stopPropagation()},children:S(v,{"aria-label":`Select Row`,checked:t,onCheckedChange:a})})})});Q.displayName=`UITableCellSelect`;const $=M(({virtualRowIndex:e,column:t,getContext:n,className:r,...i})=>{let a=I(()=>z(t?.columnDef.cell,n()),[t,n]);return S(`td`,{"data-col":`actions`,"data-cell":e,className:`sticky inset-y-0 right-0 z-50 flex items-center pr-4 group-hover:bg-muted-bg-subtle!`,...i,children:a})});$.displayName=`UITableCellActions`;const Xe=M(({isPinned:e=!1,isFirstCell:t=!1,isLastCell:n=!1,colId:r,position:i=`start`,column:a,getContext:o,...s})=>{let{innerTableId:c,table:l}=Ve(),u=L(document.querySelector(`table[id="${c}"]`)),d=L(null),f=I(()=>{let t=a?.getStart(`left`);return e===`left`&&typeof t==`number`?`${t}px`:void 0},[e,a]),p=I(()=>{let t=a?.getAfter(`right`);return e===`right`&&typeof t==`number`?`${t}px`:void 0},[e,a]),m=I(()=>`calc(var(--col-${r}-size) * 1px)`,[r]),h=I(()=>a?.columnDef.minSize?`calc(var(--col-${r}-minSize) * 1px)`:void 0,[r,a]),g=I(()=>a?.columnDef.maxSize?`calc(var(--col-${r}-maxSize) * 1px)`:void 0,[r,a]),_=I(()=>z(a?.columnDef.cell,o()),[a,o]);return F(()=>{if(!d.current)return;let e=d.current.scrollWidth,t=a?.getSize();t&&e>t&&u.current instanceof HTMLTableElement&&typeof r==`string`&&a?.columnDef.meta?.fitContent&&l.setColumnSizing(t=>({...t,[r]:e+32}))},[r,a,l]),S(`td`,{slot:`table-body-cell`,"data-pinned":e,"data-lastcell":n||void 0,"data-firstcell":t||void 0,style:{left:f,right:p,width:m,minWidth:h,maxWidth:g},className:`group-hover:bg-muted-bg-subtle!`,...s,children:S(`div`,{ref:d,slot:`table-body-cell-inner`,className:x(i===`start`&&`justify-start`,i===`center`&&`justify-center`,i===`end`&&`justify-end`),children:_})})});Xe.displayName=`UITableCell`;const Ze=M(({className:e,children:t,...n})=>S(`tfoot`,{slot:`table-footer`,className:x(`flex w-full justify-center border-border-weak border-t py-2 font-medium [&>tr]:last:border-b-0`,e),...n,children:t}));Ze.displayName=`UITableFooter`;const Qe=M(({virtualRowIndex:e,virtualRowStart:t,fetchMoreData:n})=>{let{innerWrapperId:r}=ze(),i=L(document.querySelector(`div[id="${r}"]`)),a=L(null),[o,s]=R(`idle`),[c,l]=R(0),u=P(async()=>{try{s(`fetching`),await n?.(),s(`idle`)}catch(e){console.error(`Error fetching more data:`,e),s(`error`)}},[n]);return F(()=>{if(!i.current)return;let e=new ResizeObserver(e=>{l(e[0].contentRect.width)});return e.observe(i.current),()=>e.disconnect()},[]),n?S(`tr`,{ref:a,"data-index":e,style:{transform:`translateY(${t}px)`,width:c},className:`sticky! left-0 h-10`,children:S(`td`,{className:`absolute left-0 flex w-full items-center justify-center text-xs`,children:C(`button`,{type:`button`,disabled:o===`fetching`,className:x(`flex cursor-pointer gap-x-0.5`,o===`fetching`&&`cursor-not-allowed`,o===`idle`&&`text-text-positive-weak hover:text-text-positive`,o===`error`&&`text-danger hover:text-danger-strong`),onClick:u,children:[o===`idle`&&S(re,{className:`size-4`}),o===`fetching`&&S(y,{className:`size-4 animate-spin`}),o===`error`&&S(w,{className:`size-4 text-danger`}),o===`idle`&&`Load More`,o===`fetching`&&`Loading...`,o===`error`&&`Error! Retry?`]})})}):null});Qe.displayName=`UITableLoadMore`;const $e=()=>{let{table:e,isEmpty:t,isFetching:n,fetchMoreData:r}=V(),{rowSelectionState:i}=Ge(),a=L(null),{rows:o}=e.getRowModel(),s=we({count:o.length+1,estimateSize:()=>40,getScrollElement:()=>a.current,measureElement:typeof window<`u`&&navigator.userAgent.indexOf(`Firefox`)===-1?e=>e?.getBoundingClientRect().height:void 0,overscan:2}),c=I(()=>{let e=s.getTotalSize(),t=a.current?.clientHeight||0;return e<t?`${t}px`:`${e}px`},[s.getTotalSize()]);return S(ee,{direction:`horizontal`,style:{direction:e.options.columnResizeDirection},className:`relative flex w-full max-w-full flex-1 gap-1 overflow-auto border-t border-t-border border-r border-r-border bg-slate-50 p-0 text-sm`,children:S(b,{className:`relative`,children:C(G,{ref:a,children:[C(K,{children:[S(q,{children:e.getHeaderGroups().map(e=>S(J,{headerGroup:e},e.id))}),S(X,{height:c,children:s.getVirtualItems().map(e=>{let t=o[e.index],n=Object.entries(i).some(([e,n])=>e===`${t?.id}`&&n);return t?S(Z,{ref:s.measureElement,row:t,isSelected:n,virtualRowIndex:e.index,virtualRowStart:e.start},e.index):S(Qe,{virtualRowIndex:e.index,virtualRowStart:e.start,fetchMoreData:r},e.index)})})]}),S(W,{isEmpty:t,isFetching:n})]})})})},et=({checked:e,title:t,onCheckedChange:n})=>C(`div`,{className:`flex h-fit items-center gap-2`,children:[S(v,{checked:e,onCheckedChange:n}),S(`p`,{className:`text-sm`,children:t})]}),tt=()=>{let{table:e}=V(),[n,r]=R(null);return S(b,{defaultSize:25,className:x(`bg-card`,n===null?`max-w-8!`:`min-w-64`),children:C(`div`,{className:`relative z-20 flex size-full bg-muted-bg-subtle`,children:[C(`div`,{className:`flex-1`,children:[S(A,{mode:n===`columns`?`visible`:`hidden`,children:C(`div`,{className:`flex size-full flex-col gap-2 p-4`,children:[S(`p`,{className:`px-2 font-medium`,children:`Columns Visibility`}),S(d,{}),S(`div`,{className:`flex flex-col gap-4 pt-4`,children:e.getAllColumns().map(e=>[`select`,`actions`].includes(e.id)?null:S(et,{checked:e.getIsVisible(),title:String(e.columnDef.header),onCheckedChange:t=>e.toggleVisibility(!!t)},e.id))})]})}),S(A,{mode:n===`filters`?`visible`:`hidden`,children:S(`div`,{className:`flex size-full flex-col p-2`,children:C(t,{variant:`outline`,color:`muted`,children:[S(se,{}),`Add Filter`]})})})]}),C(`div`,{className:`flex h-full flex-col border-border border-l bg-muted-bg-subtle text-sm`,children:[C(`button`,{className:x(`flex h-32 cursor-pointer flex-col items-center gap-y-2 p-2 py-4`,n===`columns`&&`bg-card`),onClick:()=>r(n===`columns`?null:`columns`),children:[S(D,{size:18}),S(`span`,{className:`text-nowrap [writing-mode:vertical-lr]`,children:`Columns`})]}),S(d,{}),C(`button`,{className:x(`flex h-32 cursor-pointer flex-col items-center gap-y-2 p-2 py-4`,n===`filters`&&`bg-card`),onClick:()=>r(n===`filters`?null:`filters`),children:[S(oe,{size:18}),S(`span`,{className:`text-nowrap [writing-mode:vertical-lr]`,children:`Filters`})]}),S(d,{})]})]})})},nt=M(({innerWrapperId:e,children:t})=>{let n=I(()=>({innerWrapperId:e}),[e]);return S(Re.Provider,{value:n,children:t})});nt.displayName=`UITableInnerWrapperProvider`;const rt=M(({table:e,innerTableId:t,totalSize:n,children:r})=>{let i=I(()=>({table:e,innerTableId:t,totalSize:n}),[e,t,n]);return S(Be.Provider,{value:i,children:r})});rt.displayName=`UITableInnerTableProvider`;const it=M(({isAllRowsSelected:e,columnPinningState:t,leftPinnedHeaders:n,rightPinnedHeaders:r,onToggleAllRowsSelected:i,children:a})=>{let o=I(()=>({isAllRowsSelected:e,columnPinningState:t,leftPinnedHeaders:n,rightPinnedHeaders:r,onToggleAllRowsSelected:i}),[e,t,n,r,i]);return S(He.Provider,{value:o,children:a})});it.displayName=`UITableHeadRowProvider`;const at=M(({isFetching:e,isEmpty:t,rowSelectionState:n,children:r})=>{let i=I(()=>({isFetching:e,isEmpty:t,rowSelectionState:n}),[e,t,n]);return S(We.Provider,{value:i,children:r})});at.displayName=`UITableBodyProvider`;const ot=M(({keyOfClickRow:e,isAllRowsSelected:t,columnPinningState:n,leftPinnedHeaders:r,rightPinnedHeaders:i,onClickRow:a,children:o})=>{let s=I(()=>({keyOfClickRow:e,isAllRowsSelected:t,columnPinningState:n,leftPinnedHeaders:r,rightPinnedHeaders:i,onClickRow:a}),[e,t,n,r,i,a]);return S(Ke.Provider,{value:s,children:o})});ot.displayName=`UITableRowProvider`;const st=({title:e,isFetching:t=!1,isRefetching:n=!1,data:r,columns:i,totalRows:a,leftPinnedColumns:o=[],rightPinnedColumns:s=[],keyOfClickRow:c,onClickRow:l,onRowSelection:u,onColumnPinning:d,fetchMoreData:f,children:p})=>{let m=ve(),h=ve(),[g,_]=R({}),[v,y]=R({right:s,left:[`select`,...o]}),[b,ee]=R({}),te=P(e=>(_(e),u?.(e instanceof Function?e(g):e),e),[g,u]),x=P(e=>{y(e),d?.(e instanceof Function?e(v):e)},[v,d]),C=Ce({data:r,columns:i,state:{rowSelection:g,columnPinning:v,expanded:b},defaultColumn:{enableResizing:!1,size:void 0,minSize:void 0,maxSize:void 0},columnResizeMode:`onChange`,columnResizeDirection:`ltr`,enableColumnPinning:!0,enableRowSelection:!0,enableColumnResizing:!0,enableMultiRowSelection:!0,autoResetAll:!1,autoResetExpanded:!1,autoResetPageIndex:!1,getSubRows:e=>e.subRows,getCoreRowModel:be(),getGroupedRowModel:Se(),getExpandedRowModel:xe(),onRowSelectionChange:te,onColumnPinningChange:x,onExpandedChange:ee}),w=I(()=>{let{rows:e}=C.getRowModel();return e},[C.getRowModel().rows,C.getState().columnPinning]),T=I(()=>!t&&w.length===0,[w,t]),ne=I(()=>({title:e,table:C,isEmpty:T,isFetching:t,isRefetching:n,totalRows:a,fetchMoreData:f}),[e,C,T,n,t,a,f,C.getState().columnPinning,C.getState().expanded]),E=I(()=>C.getState(),[C.getState()]),re=I(()=>C.getIsAllRowsSelected(),[C.getIsAllRowsSelected()]),ie=I(()=>E.rowSelection,[E.rowSelection]),D=I(()=>E.columnPinning,[E.columnPinning]),O=I(()=>C.getLeftHeaderGroups()[0]?.headers||[],[C.getState().columnPinning]),k=I(()=>C.getRightHeaderGroups()[0]?.headers||[],[C.getState().columnPinning]),ae=I(()=>C.getTotalSize(),[C.getTotalSize()]);return S(Je.Provider,{value:ne,children:S(nt,{innerWrapperId:m,children:S(rt,{table:C,innerTableId:h,totalSize:ae,children:S(it,{isAllRowsSelected:re,columnPinningState:D,leftPinnedHeaders:O,rightPinnedHeaders:k,onToggleAllRowsSelected:C.toggleAllRowsSelected,children:S(at,{isFetching:t,isEmpty:T,rowSelectionState:ie,children:S(ot,{keyOfClickRow:c,isAllRowsSelected:re,columnPinningState:D,leftPinnedHeaders:O,rightPinnedHeaders:k,onClickRow:l,children:p})})})})})})},ct=({onSearch:e,onChange:t,...n})=>{let r=Te(t=>{e?.(t)},500);return C(`div`,{className:`relative w-full max-w-80 flex-1`,children:[S(te,{...n,size:`lg`,type:`search`,placeholder:`Search records...`,className:`flex-1 ps-9 pe-9`,onChange:e=>{t?.(e),r(e.target.value??``)}}),S(`div`,{className:`pointer-events-none absolute inset-y-0 start-0 flex items-center justify-center ps-3 text-text-positive-weak peer-disabled:opacity-50`,children:S(me,{size:16})}),S(`button`,{className:`absolute inset-y-0 end-0 flex h-full w-9 items-center justify-center rounded-e-md text-text-positive-weak outline-none transition-[color,box-shadow] hover:text-text-positive focus:z-10 focus-visible:border focus-visible:border-primary-strong focus-visible:ring-[3px] focus-visible:ring-primary-weak disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,"aria-label":`Submit search`,type:`submit`,children:S(T,{size:16,"aria-hidden":`true`})})]})},lt=({children:e,disabled:t,onClick:n})=>S(`button`,{type:`button`,disabled:t,className:`flex cursor-pointer items-center gap-x-1 rounded-sm border border-border bg-background p-2.5 text-sm text-text-positive-weak outline-none transition-all hover:shadow-card focus:border-border-emphasis focus:bg-muted-muted active:border-border-emphasis active:bg-muted-muted active:text-text-positive disabled:pointer-events-none disabled:cursor-default disabled:opacity-60 [&_svg]:size-3.5`,onClick:n,children:e}),ut=({onCreate:e,onDownload:t,onRefresh:n})=>C(`div`,{className:`flex [&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none`,children:[S(lt,{disabled:!e,onClick:t=>{e?.(),t.stopPropagation(),t.preventDefault()},children:S(ie,{})}),S(lt,{disabled:!n,onClick:e=>{n?.(),e.stopPropagation(),e.preventDefault()},children:S(pe,{})}),S(lt,{disabled:!t,onClick:e=>{t?.(),e.stopPropagation(),e.preventDefault()},children:S(O,{})})]}),dt=({children:e})=>{let{title:t}=V();return C(`div`,{"data-slot":`table-tooltip`,className:`relative m-0 flex w-full flex-0 flex-col flex-wrap items-start space-y-2 p-0 px-2 text-sm`,children:[S(`h3`,{className:`font-semibold text-base text-text-positive`,children:t}),S(`div`,{className:`flex w-full flex-1 justify-between gap-x-2`,children:e})]})};dt.displayName=`TableTooltip`;export{Ee as UITableBadgeDisplay,X as UITableBody,De as UITableBooleanDisplay,Xe as UITableCell,$ as UITableCellActions,Q as UITableCellSelect,$e as UITableContainer,Oe as UITableDateDisplay,ke as UITableDescriptionDisplay,W as UITableEmptyDisplay,tt as UITableFilter,Ze as UITableFooter,q as UITableHead,Y as UITableHeadCell,H as UITableHeadCellOption,U as UITableHeadCellSelect,J as UITableHeadRow,K as UITableInnerTable,G as UITableInnerWrapper,Qe as UITableLoadMore,Ae as UITableMoreButton,je as UITableNameDisplay,Me as UITablePermalink,Ne as UITablePhoneNumberDisplay,st as UITableProvider,Pe as UITableRemoveButton,Z as UITableRow,Ie as UITableStatisticDisplay,dt as UITableTooltip,ut as UITableTooltipActions,ct as UITableTooltipFilter,Le as UITableUserDataDisplay,Ye as UITableWrapper};
2
2
  //# sourceMappingURL=index.mjs.map