@vlrc-fe/components 1.0.6 → 1.0.8

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 (452) hide show
  1. package/dist/Form/FormFileUpload/index.d.ts +1 -1
  2. package/dist/Form/FormFileUpload/index.d.ts.map +1 -1
  3. package/dist/Form/index.d.ts +1 -1
  4. package/dist/Form/index.d.ts.map +1 -1
  5. package/dist/MultiSelect/type.d.ts +2 -2
  6. package/dist/index.cjs +1 -1
  7. package/dist/index.js +64 -40
  8. package/dist/index10.cjs +1 -1
  9. package/dist/index10.js +46 -80
  10. package/dist/index100.cjs +1 -1
  11. package/dist/index100.js +22 -60
  12. package/dist/index101.cjs +1 -1
  13. package/dist/index101.js +1147 -43
  14. package/dist/index102.cjs +1 -1
  15. package/dist/index102.js +30 -64
  16. package/dist/index103.cjs +1 -1
  17. package/dist/index103.js +31 -147
  18. package/dist/index104.cjs +1 -1
  19. package/dist/index104.js +93 -19
  20. package/dist/index105.cjs +1 -1
  21. package/dist/index105.js +80 -25
  22. package/dist/index106.cjs +1 -1
  23. package/dist/index106.js +9 -50
  24. package/dist/index107.cjs +1 -1
  25. package/dist/index107.js +30 -156
  26. package/dist/index108.cjs +1 -1
  27. package/dist/index108.js +350 -14
  28. package/dist/index109.cjs +1 -1
  29. package/dist/index109.js +11 -0
  30. package/dist/index11.cjs +1 -1
  31. package/dist/index11.js +55 -60
  32. package/dist/index110.cjs +1 -0
  33. package/dist/index110.js +430 -0
  34. package/dist/index111.cjs +1 -0
  35. package/dist/index111.js +36 -0
  36. package/dist/index112.cjs +1 -0
  37. package/dist/index112.js +28 -0
  38. package/dist/index113.cjs +1 -0
  39. package/dist/index113.js +14 -0
  40. package/dist/index114.cjs +1 -0
  41. package/dist/index114.js +156 -0
  42. package/dist/index115.cjs +1 -0
  43. package/dist/index115.js +19 -0
  44. package/dist/index116.cjs +1 -0
  45. package/dist/index116.js +67 -0
  46. package/dist/index117.cjs +1 -0
  47. package/dist/index117.js +118 -0
  48. package/dist/index118.cjs +1 -0
  49. package/dist/index118.js +36 -0
  50. package/dist/index119.cjs +1 -0
  51. package/dist/index119.js +13 -0
  52. package/dist/index12.cjs +1 -1
  53. package/dist/index12.js +44 -121
  54. package/dist/index120.cjs +1 -0
  55. package/dist/index120.js +31 -0
  56. package/dist/index121.cjs +1 -0
  57. package/dist/index121.js +37 -0
  58. package/dist/index122.cjs +1 -0
  59. package/dist/index122.js +123 -0
  60. package/dist/index123.cjs +1 -0
  61. package/dist/index123.js +44 -0
  62. package/dist/index124.cjs +1 -0
  63. package/dist/index124.js +43 -0
  64. package/dist/index125.cjs +1 -0
  65. package/dist/index125.js +14 -0
  66. package/dist/index126.cjs +1 -0
  67. package/dist/index126.js +64 -0
  68. package/dist/index127.cjs +1 -0
  69. package/dist/index127.js +23 -0
  70. package/dist/index128.cjs +1 -0
  71. package/dist/index128.js +34 -0
  72. package/dist/index129.cjs +1 -0
  73. package/dist/index129.js +27 -0
  74. package/dist/index13.cjs +1 -1
  75. package/dist/index13.js +30 -12
  76. package/dist/index130.cjs +1 -0
  77. package/dist/index130.js +26 -0
  78. package/dist/index131.cjs +1 -0
  79. package/dist/index131.js +157 -0
  80. package/dist/index132.cjs +1 -0
  81. package/dist/index132.js +34 -0
  82. package/dist/index133.cjs +1 -0
  83. package/dist/index133.js +46 -0
  84. package/dist/index134.cjs +1 -0
  85. package/dist/index134.js +142 -0
  86. package/dist/index135.cjs +1 -0
  87. package/dist/index135.js +125 -0
  88. package/dist/index136.cjs +1 -0
  89. package/dist/index136.js +26 -0
  90. package/dist/index137.cjs +1 -0
  91. package/dist/index137.js +88 -0
  92. package/dist/index138.cjs +1 -0
  93. package/dist/index138.js +221 -0
  94. package/dist/index139.cjs +1 -0
  95. package/dist/index139.js +166 -0
  96. package/dist/index14.cjs +1 -1
  97. package/dist/index14.js +8 -12
  98. package/dist/index140.cjs +1 -0
  99. package/dist/index140.js +126 -0
  100. package/dist/index141.cjs +1 -0
  101. package/dist/index141.js +15 -0
  102. package/dist/index142.cjs +1 -0
  103. package/dist/index142.js +9 -0
  104. package/dist/index143.cjs +1 -0
  105. package/dist/index143.js +17 -0
  106. package/dist/index144.cjs +1 -0
  107. package/dist/index144.js +22 -0
  108. package/dist/index145.cjs +1 -0
  109. package/dist/index145.js +18 -0
  110. package/dist/index146.cjs +1 -0
  111. package/dist/index146.js +6 -0
  112. package/dist/index147.cjs +1 -0
  113. package/dist/index147.js +7 -0
  114. package/dist/index148.cjs +1 -0
  115. package/dist/index148.js +8 -0
  116. package/dist/index149.cjs +1 -0
  117. package/dist/index149.js +7 -0
  118. package/dist/index15.cjs +1 -1
  119. package/dist/index15.js +12 -112
  120. package/dist/index150.cjs +1 -0
  121. package/dist/index150.js +7 -0
  122. package/dist/index151.cjs +1 -0
  123. package/dist/index151.js +9 -0
  124. package/dist/index152.cjs +1 -0
  125. package/dist/index152.js +69 -0
  126. package/dist/index153.cjs +1 -0
  127. package/dist/index153.js +11 -0
  128. package/dist/index154.cjs +1 -0
  129. package/dist/index154.js +202 -0
  130. package/dist/index155.cjs +1 -0
  131. package/dist/index155.js +124 -0
  132. package/dist/index156.cjs +1 -0
  133. package/dist/index156.js +32 -0
  134. package/dist/index157.cjs +1 -0
  135. package/dist/index157.js +20 -0
  136. package/dist/index158.cjs +1 -0
  137. package/dist/index158.js +69 -0
  138. package/dist/index159.cjs +1 -0
  139. package/dist/index159.js +32 -0
  140. package/dist/index16.cjs +1 -1
  141. package/dist/index16.js +4 -726
  142. package/dist/index160.cjs +1 -0
  143. package/dist/index160.js +11 -0
  144. package/dist/index161.cjs +1 -0
  145. package/dist/index161.js +280 -0
  146. package/dist/index162.cjs +1 -0
  147. package/dist/index162.js +157 -0
  148. package/dist/index163.cjs +1 -0
  149. package/dist/index163.js +20 -0
  150. package/dist/index164.cjs +1 -0
  151. package/dist/index164.js +10 -0
  152. package/dist/index165.cjs +1 -0
  153. package/dist/index165.js +14 -0
  154. package/dist/index166.cjs +1 -0
  155. package/dist/index166.js +8 -0
  156. package/dist/index167.cjs +1 -0
  157. package/dist/index167.js +8 -0
  158. package/dist/index168.cjs +1 -0
  159. package/dist/index168.js +11 -0
  160. package/dist/index169.cjs +1 -0
  161. package/dist/index169.js +10 -0
  162. package/dist/index17.cjs +1 -1
  163. package/dist/index17.js +79 -339
  164. package/dist/index170.cjs +1 -0
  165. package/dist/index170.js +6 -0
  166. package/dist/index171.cjs +1 -0
  167. package/dist/index171.js +8 -0
  168. package/dist/index172.cjs +1 -0
  169. package/dist/index172.js +8 -0
  170. package/dist/index173.cjs +1 -0
  171. package/dist/index173.js +10 -0
  172. package/dist/index174.cjs +1 -0
  173. package/dist/index174.js +11 -0
  174. package/dist/index175.cjs +1 -0
  175. package/dist/index175.js +15 -0
  176. package/dist/index176.cjs +1 -0
  177. package/dist/index176.js +11 -0
  178. package/dist/index177.cjs +1 -0
  179. package/dist/index177.js +11 -0
  180. package/dist/index178.cjs +1 -0
  181. package/dist/index178.js +6 -0
  182. package/dist/index179.cjs +1 -0
  183. package/dist/index179.js +43 -0
  184. package/dist/index18.cjs +1 -1
  185. package/dist/index18.js +19 -66
  186. package/dist/index180.cjs +1 -0
  187. package/dist/index180.js +382 -0
  188. package/dist/index181.cjs +1 -0
  189. package/dist/index181.js +40 -0
  190. package/dist/index182.cjs +1 -0
  191. package/dist/index182.js +23 -0
  192. package/dist/index183.cjs +1 -0
  193. package/dist/index183.js +59 -0
  194. package/dist/index184.cjs +1 -0
  195. package/dist/index184.js +55 -0
  196. package/dist/index185.cjs +1 -0
  197. package/dist/index185.js +54 -0
  198. package/dist/index186.cjs +1 -0
  199. package/dist/index186.js +57 -0
  200. package/dist/index187.cjs +1 -0
  201. package/dist/index187.js +57 -0
  202. package/dist/index188.cjs +1 -0
  203. package/dist/index188.js +88 -0
  204. package/dist/index189.cjs +1 -0
  205. package/dist/index189.js +66 -0
  206. package/dist/index19.cjs +1 -1
  207. package/dist/index19.js +18 -8
  208. package/dist/index190.cjs +1 -0
  209. package/dist/index190.js +594 -0
  210. package/dist/index191.cjs +9 -0
  211. package/dist/index191.js +30 -0
  212. package/dist/index192.cjs +1 -0
  213. package/dist/index192.js +50 -0
  214. package/dist/index193.cjs +1 -0
  215. package/dist/index193.js +65 -0
  216. package/dist/index194.cjs +1 -0
  217. package/dist/index194.js +48 -0
  218. package/dist/index195.cjs +1 -0
  219. package/dist/index195.js +67 -0
  220. package/dist/index196.cjs +1 -0
  221. package/dist/index196.js +151 -0
  222. package/dist/index197.cjs +1 -0
  223. package/dist/index197.js +23 -0
  224. package/dist/index198.cjs +1 -0
  225. package/dist/index198.js +27 -0
  226. package/dist/index199.cjs +1 -0
  227. package/dist/index199.js +53 -0
  228. package/dist/index20.cjs +1 -1
  229. package/dist/index20.js +51 -98
  230. package/dist/index200.cjs +1 -0
  231. package/dist/index200.js +161 -0
  232. package/dist/index201.cjs +1 -0
  233. package/dist/index201.js +16 -0
  234. package/dist/index202.cjs +1 -0
  235. package/dist/index21.cjs +1 -1
  236. package/dist/index21.js +81 -28
  237. package/dist/index22.cjs +1 -1
  238. package/dist/index22.js +64 -14
  239. package/dist/index23.cjs +1 -1
  240. package/dist/index23.js +25 -22
  241. package/dist/index24.cjs +1 -1
  242. package/dist/index24.js +1014 -33
  243. package/dist/index25.cjs +1 -1
  244. package/dist/index25.js +22 -96
  245. package/dist/index26.cjs +1 -1
  246. package/dist/index26.js +108 -25
  247. package/dist/index27.cjs +1 -1
  248. package/dist/index27.js +15 -9
  249. package/dist/index28.cjs +1 -1
  250. package/dist/index28.js +20 -66
  251. package/dist/index29.cjs +1 -1
  252. package/dist/index29.js +81 -11
  253. package/dist/index30.cjs +1 -1
  254. package/dist/index30.js +91 -29
  255. package/dist/index31.cjs +1 -1
  256. package/dist/index31.js +14 -41
  257. package/dist/index32.cjs +1 -1
  258. package/dist/index32.js +93 -12
  259. package/dist/index33.cjs +1 -1
  260. package/dist/index33.js +22 -62
  261. package/dist/index34.cjs +1 -1
  262. package/dist/index34.js +84 -22
  263. package/dist/index35.cjs +1 -1
  264. package/dist/index35.js +85 -33
  265. package/dist/index36.cjs +1 -1
  266. package/dist/index36.js +407 -25
  267. package/dist/index37.cjs +1 -1
  268. package/dist/index37.js +170 -25
  269. package/dist/index38.cjs +1 -1
  270. package/dist/index38.js +28 -154
  271. package/dist/index39.cjs +1 -1
  272. package/dist/index39.js +158 -33
  273. package/dist/index40.cjs +1 -1
  274. package/dist/index40.js +104 -45
  275. package/dist/index41.cjs +1 -1
  276. package/dist/index41.js +337 -140
  277. package/dist/index42.cjs +1 -1
  278. package/dist/index42.js +96 -124
  279. package/dist/index43.cjs +1 -1
  280. package/dist/index43.js +319 -23
  281. package/dist/index44.cjs +1 -1
  282. package/dist/index44.js +205 -81
  283. package/dist/index45.cjs +1 -1
  284. package/dist/index45.js +33 -220
  285. package/dist/index46.cjs +1 -1
  286. package/dist/index46.js +161 -163
  287. package/dist/index47.cjs +1 -1
  288. package/dist/index47.js +20 -125
  289. package/dist/index48.cjs +1 -1
  290. package/dist/index48.js +24 -14
  291. package/dist/index49.cjs +1 -1
  292. package/dist/index49.js +167 -7
  293. package/dist/index5.js +26 -14
  294. package/dist/index50.cjs +1 -1
  295. package/dist/index50.js +44 -15
  296. package/dist/index51.cjs +1 -1
  297. package/dist/index51.js +15 -18
  298. package/dist/index52.cjs +1 -1
  299. package/dist/index52.js +3 -17
  300. package/dist/index53.cjs +1 -1
  301. package/dist/index53.js +5 -5
  302. package/dist/index54.cjs +1 -1
  303. package/dist/index54.js +19 -4
  304. package/dist/index55.cjs +1 -1
  305. package/dist/index55.js +24 -6
  306. package/dist/index56.cjs +1 -1
  307. package/dist/index56.js +66 -4
  308. package/dist/index57.cjs +1 -1
  309. package/dist/index57.js +14 -5
  310. package/dist/index58.cjs +1 -1
  311. package/dist/index58.js +4 -8
  312. package/dist/index59.cjs +1 -1
  313. package/dist/index59.js +50 -67
  314. package/dist/index6.cjs +1 -1
  315. package/dist/index6.js +85 -46
  316. package/dist/index60.cjs +1 -1
  317. package/dist/index60.js +6 -10
  318. package/dist/index61.cjs +1 -1
  319. package/dist/index61.js +25 -199
  320. package/dist/index62.cjs +1 -1
  321. package/dist/index62.js +13 -122
  322. package/dist/index63.cjs +1 -1
  323. package/dist/index63.js +9 -30
  324. package/dist/index64.cjs +1 -1
  325. package/dist/index64.js +3 -20
  326. package/dist/index65.cjs +1 -1
  327. package/dist/index65.js +24 -66
  328. package/dist/index66.cjs +1 -1
  329. package/dist/index66.js +68 -30
  330. package/dist/index67.cjs +38 -1
  331. package/dist/index67.js +3 -11
  332. package/dist/index68.cjs +1 -1
  333. package/dist/index68.js +12 -279
  334. package/dist/index69.cjs +1 -1
  335. package/dist/index69.js +50 -155
  336. package/dist/index7.cjs +1 -1
  337. package/dist/index7.js +29 -85
  338. package/dist/index70.cjs +1 -1
  339. package/dist/index70.js +115 -19
  340. package/dist/index71.cjs +4 -1
  341. package/dist/index71.js +6 -9
  342. package/dist/index72.cjs +1 -1
  343. package/dist/index72.js +12 -12
  344. package/dist/index73.cjs +1 -1
  345. package/dist/index73.js +539 -6
  346. package/dist/index74.cjs +1 -1
  347. package/dist/index74.js +197 -6
  348. package/dist/index75.cjs +1 -1
  349. package/dist/index75.js +120 -9
  350. package/dist/index76.cjs +1 -1
  351. package/dist/index76.js +912 -8
  352. package/dist/index77.cjs +3 -1
  353. package/dist/index77.js +76 -4
  354. package/dist/index78.cjs +1 -1
  355. package/dist/index78.js +120 -6
  356. package/dist/index79.cjs +1 -1
  357. package/dist/index79.js +12 -6
  358. package/dist/index8.cjs +1 -1
  359. package/dist/index8.js +35 -62
  360. package/dist/index80.cjs +1 -1
  361. package/dist/index80.js +14 -8
  362. package/dist/index81.cjs +1 -1
  363. package/dist/index81.js +113 -9
  364. package/dist/index82.cjs +1 -1
  365. package/dist/index82.js +725 -13
  366. package/dist/index83.cjs +1 -1
  367. package/dist/index83.js +346 -9
  368. package/dist/index84.cjs +1 -1
  369. package/dist/index84.js +74 -9
  370. package/dist/index85.cjs +1 -1
  371. package/dist/index85.js +148 -4
  372. package/dist/index86.cjs +1 -1
  373. package/dist/index86.js +31 -42
  374. package/dist/index87.cjs +1 -1
  375. package/dist/index87.js +12 -380
  376. package/dist/index88.cjs +1 -1
  377. package/dist/index88.js +345 -37
  378. package/dist/index89.cjs +20 -1
  379. package/dist/index89.js +40 -18
  380. package/dist/index9.cjs +1 -1
  381. package/dist/index9.js +85 -17
  382. package/dist/index90.cjs +1 -1
  383. package/dist/index90.js +113 -56
  384. package/dist/index91.cjs +1 -1
  385. package/dist/index91.js +272 -51
  386. package/dist/index92.cjs +1 -1
  387. package/dist/index92.js +129 -50
  388. package/dist/index93.cjs +1 -1
  389. package/dist/index93.js +13 -54
  390. package/dist/index94.cjs +1 -1
  391. package/dist/index94.js +28 -55
  392. package/dist/index95.cjs +1 -1
  393. package/dist/index95.js +525 -80
  394. package/dist/index96.cjs +1 -1
  395. package/dist/index96.js +75 -61
  396. package/dist/index97.cjs +1 -1
  397. package/dist/index97.js +67 -583
  398. package/dist/index98.cjs +1 -9
  399. package/dist/index98.js +32 -27
  400. package/dist/index99.cjs +1 -1
  401. package/dist/index99.js +17 -49
  402. package/dist/ui/alert-dialog.d.ts +15 -0
  403. package/dist/ui/alert-dialog.d.ts.map +1 -0
  404. package/dist/ui/alert.d.ts +10 -0
  405. package/dist/ui/alert.d.ts.map +1 -0
  406. package/dist/ui/aspect-ratio.d.ts +4 -0
  407. package/dist/ui/aspect-ratio.d.ts.map +1 -0
  408. package/dist/ui/avatar.d.ts +7 -0
  409. package/dist/ui/avatar.d.ts.map +1 -0
  410. package/dist/ui/badge.d.ts +1 -1
  411. package/dist/ui/breadcrumb.d.ts +12 -0
  412. package/dist/ui/breadcrumb.d.ts.map +1 -0
  413. package/dist/ui/button.d.ts +1 -1
  414. package/dist/ui/carousel.d.ts +20 -0
  415. package/dist/ui/carousel.d.ts.map +1 -0
  416. package/dist/ui/collapsible.d.ts +6 -0
  417. package/dist/ui/collapsible.d.ts.map +1 -0
  418. package/dist/ui/context-menu.d.ts +26 -0
  419. package/dist/ui/context-menu.d.ts.map +1 -0
  420. package/dist/ui/drawer.d.ts +14 -0
  421. package/dist/ui/drawer.d.ts.map +1 -0
  422. package/dist/ui/hover-card.d.ts +7 -0
  423. package/dist/ui/hover-card.d.ts.map +1 -0
  424. package/dist/ui/index.d.ts +23 -0
  425. package/dist/ui/index.d.ts.map +1 -1
  426. package/dist/ui/input-otp.d.ts +12 -0
  427. package/dist/ui/input-otp.d.ts.map +1 -0
  428. package/dist/ui/menubar.d.ts +27 -0
  429. package/dist/ui/menubar.d.ts.map +1 -0
  430. package/dist/ui/navigation-menu.d.ts +15 -0
  431. package/dist/ui/navigation-menu.d.ts.map +1 -0
  432. package/dist/ui/pagination.d.ts +14 -0
  433. package/dist/ui/pagination.d.ts.map +1 -0
  434. package/dist/ui/resizable.d.ts +9 -0
  435. package/dist/ui/resizable.d.ts.map +1 -0
  436. package/dist/ui/sheet.d.ts +14 -0
  437. package/dist/ui/sheet.d.ts.map +1 -0
  438. package/dist/ui/sidebar.d.ts +70 -0
  439. package/dist/ui/sidebar.d.ts.map +1 -0
  440. package/dist/ui/skeleton.d.ts +3 -0
  441. package/dist/ui/skeleton.d.ts.map +1 -0
  442. package/dist/ui/slider.d.ts +5 -0
  443. package/dist/ui/slider.d.ts.map +1 -0
  444. package/dist/ui/switch.d.ts +5 -0
  445. package/dist/ui/switch.d.ts.map +1 -0
  446. package/dist/ui/tabs.d.ts +8 -0
  447. package/dist/ui/tabs.d.ts.map +1 -0
  448. package/dist/ui/toggle-group.d.ts +8 -0
  449. package/dist/ui/toggle-group.d.ts.map +1 -0
  450. package/dist/ui/toggle.d.ts +10 -0
  451. package/dist/ui/toggle.d.ts.map +1 -0
  452. package/package.json +23 -5
package/dist/index35.js CHANGED
@@ -1,34 +1,86 @@
1
- import { Input as e } from "./index19.js";
2
- import { useEffect as t, useRef as n } from "react";
3
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
4
- import { debounce as a, isEmpty as o } from "lodash-es";
5
- //#region src/DataTable/components/DataTableToolbar.tsx
6
- var s = ({ table: s, placeholder: c, debounceMs: l, right: u }) => {
7
- let d = s.getState().globalFilter, f = typeof d == "string" ? d : "", p = n(a((e) => {
8
- s.setGlobalFilter(e);
9
- }, l));
10
- return t(() => (p.current = a((e) => {
11
- s.setGlobalFilter(e);
12
- }, l), () => {
13
- p.current.cancel();
14
- }), [s, l]), t(() => () => {
15
- p.current.cancel();
16
- }, []), /* @__PURE__ */ i("div", {
17
- className: "flex items-center gap-2 py-4",
18
- children: [/* @__PURE__ */ r(e, {
19
- placeholder: c,
20
- defaultValue: f,
21
- onChange: (e) => {
22
- let t = e.target.value;
23
- if (o(t)) {
24
- p.current("");
25
- return;
26
- }
27
- p.current(t);
28
- },
29
- className: "max-w-sm"
30
- }), u]
31
- });
32
- };
1
+ "use client";
2
+ import { cn as e } from "./index3.js";
3
+ import { Dialog as t, DialogContent as n, DialogDescription as r, DialogHeader as i, DialogTitle as a } from "./index34.js";
4
+ import { SearchIcon as o } from "lucide-react";
5
+ import "react";
6
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
7
+ import { Command as l } from "cmdk";
8
+ //#region src/ui/command.tsx
9
+ function u({ className: t, ...n }) {
10
+ return /* @__PURE__ */ s(l, {
11
+ "data-slot": "command",
12
+ className: e("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md", t),
13
+ ...n
14
+ });
15
+ }
16
+ function d({ title: o = "Command Palette", description: l = "Search for a command to run...", children: d, className: f, showCloseButton: p = !0, ...m }) {
17
+ return /* @__PURE__ */ c(t, {
18
+ ...m,
19
+ children: [/* @__PURE__ */ c(i, {
20
+ className: "sr-only",
21
+ children: [/* @__PURE__ */ s(a, { children: o }), /* @__PURE__ */ s(r, { children: l })]
22
+ }), /* @__PURE__ */ s(n, {
23
+ className: e("overflow-hidden p-0", f),
24
+ showCloseButton: p,
25
+ children: /* @__PURE__ */ s(u, {
26
+ className: "[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",
27
+ children: d
28
+ })
29
+ })]
30
+ });
31
+ }
32
+ function f({ className: t, ...n }) {
33
+ return /* @__PURE__ */ c("div", {
34
+ "data-slot": "command-input-wrapper",
35
+ className: "flex h-9 items-center gap-2 border-b px-3",
36
+ children: [/* @__PURE__ */ s(o, { className: "size-4 shrink-0 opacity-50" }), /* @__PURE__ */ s(l.Input, {
37
+ "data-slot": "command-input",
38
+ className: e("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50", t),
39
+ ...n
40
+ })]
41
+ });
42
+ }
43
+ function p({ className: t, ...n }) {
44
+ return /* @__PURE__ */ s(l.List, {
45
+ "data-slot": "command-list",
46
+ className: e("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto", t),
47
+ ...n
48
+ });
49
+ }
50
+ function m({ ...e }) {
51
+ return /* @__PURE__ */ s(l.Empty, {
52
+ "data-slot": "command-empty",
53
+ className: "py-6 text-center text-sm",
54
+ ...e
55
+ });
56
+ }
57
+ function h({ className: t, ...n }) {
58
+ return /* @__PURE__ */ s(l.Group, {
59
+ "data-slot": "command-group",
60
+ className: e("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium", t),
61
+ ...n
62
+ });
63
+ }
64
+ function g({ className: t, ...n }) {
65
+ return /* @__PURE__ */ s(l.Separator, {
66
+ "data-slot": "command-separator",
67
+ className: e("bg-border -mx-1 h-px", t),
68
+ ...n
69
+ });
70
+ }
71
+ function _({ className: t, ...n }) {
72
+ return /* @__PURE__ */ s(l.Item, {
73
+ "data-slot": "command-item",
74
+ className: e("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", t),
75
+ ...n
76
+ });
77
+ }
78
+ function v({ className: t, ...n }) {
79
+ return /* @__PURE__ */ s("span", {
80
+ "data-slot": "command-shortcut",
81
+ className: e("text-muted-foreground ml-auto text-xs tracking-widest", t),
82
+ ...n
83
+ });
84
+ }
33
85
  //#endregion
34
- export { s as DataTableToolbar };
86
+ export { u as Command, d as CommandDialog, m as CommandEmpty, h as CommandGroup, f as CommandInput, _ as CommandItem, p as CommandList, g as CommandSeparator, v as CommandShortcut };
package/dist/index36.cjs CHANGED
@@ -1 +1 @@
1
- const e=require("./index20.cjs");let t=require("react"),n=require("react/jsx-runtime"),r=require("lodash-es");var i=({table:i,placeholder:a,debounceMs:o,right:s})=>{let c=i.getState().globalFilter,l=typeof c==`string`?c:``,u=(0,t.useRef)((0,r.debounce)(e=>{i.setGlobalFilter(e)},o));return(0,t.useEffect)(()=>(u.current=(0,r.debounce)(e=>{i.setGlobalFilter(e)},o),()=>{u.current.cancel()}),[i,o]),(0,t.useEffect)(()=>()=>{u.current.cancel()},[]),(0,n.jsxs)(`div`,{className:`flex items-center gap-2 py-4`,children:[(0,n.jsx)(e.Input,{placeholder:a,defaultValue:l,onChange:e=>{let t=e.target.value;if((0,r.isEmpty)(t)){u.current(``);return}u.current(t)},className:`max-w-sm`}),s]})};exports.DataTableToolbar=i;
1
+ "use client";const e=require("./index2.cjs"),t=require("./index4.cjs"),n=require("./index35.cjs");let r=require("lucide-react"),i=require("react");i=e.__toESM(i,1);let a=require("react/jsx-runtime"),o=require("cmdk");function s({className:e,...n}){return(0,a.jsx)(o.Command,{"data-slot":`command`,className:t.cn(`bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md`,e),...n})}function c({title:e=`Command Palette`,description:r=`Search for a command to run...`,children:i,className:o,showCloseButton:c=!0,...l}){return(0,a.jsxs)(n.Dialog,{...l,children:[(0,a.jsxs)(n.DialogHeader,{className:`sr-only`,children:[(0,a.jsx)(n.DialogTitle,{children:e}),(0,a.jsx)(n.DialogDescription,{children:r})]}),(0,a.jsx)(n.DialogContent,{className:t.cn(`overflow-hidden p-0`,o),showCloseButton:c,children:(0,a.jsx)(s,{className:`[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5`,children:i})})]})}function l({className:e,...n}){return(0,a.jsxs)(`div`,{"data-slot":`command-input-wrapper`,className:`flex h-9 items-center gap-2 border-b px-3`,children:[(0,a.jsx)(r.SearchIcon,{className:`size-4 shrink-0 opacity-50`}),(0,a.jsx)(o.Command.Input,{"data-slot":`command-input`,className:t.cn(`placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50`,e),...n})]})}function u({className:e,...n}){return(0,a.jsx)(o.Command.List,{"data-slot":`command-list`,className:t.cn(`max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto`,e),...n})}function d({...e}){return(0,a.jsx)(o.Command.Empty,{"data-slot":`command-empty`,className:`py-6 text-center text-sm`,...e})}function f({className:e,...n}){return(0,a.jsx)(o.Command.Group,{"data-slot":`command-group`,className:t.cn(`text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium`,e),...n})}function p({className:e,...n}){return(0,a.jsx)(o.Command.Separator,{"data-slot":`command-separator`,className:t.cn(`bg-border -mx-1 h-px`,e),...n})}function m({className:e,...n}){return(0,a.jsx)(o.Command.Item,{"data-slot":`command-item`,className:t.cn(`data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...n})}function h({className:e,...n}){return(0,a.jsx)(`span`,{"data-slot":`command-shortcut`,className:t.cn(`text-muted-foreground ml-auto text-xs tracking-widest`,e),...n})}exports.Command=s,exports.CommandDialog=c,exports.CommandEmpty=d,exports.CommandGroup=f,exports.CommandInput=l,exports.CommandItem=m,exports.CommandList=u,exports.CommandSeparator=p,exports.CommandShortcut=h;
package/dist/index36.js CHANGED
@@ -1,27 +1,409 @@
1
- import { Button as e } from "./index6.js";
2
- import { DropdownMenu as t, DropdownMenuCheckboxItem as n, DropdownMenuContent as r, DropdownMenuTrigger as i } from "./index12.js";
3
- import { ChevronDown as a } from "lucide-react";
4
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
5
- import { map as c } from "lodash-es";
6
- //#region src/DataTable/components/DataTableViewOptions.tsx
7
- var l = ({ table: l, columnVisibility: u }) => {
8
- let d = l.getAllColumns().filter((e) => e.getCanHide());
9
- return /* @__PURE__ */ s(t, { children: [/* @__PURE__ */ o(i, {
10
- asChild: !0,
11
- children: /* @__PURE__ */ s(e, {
12
- variant: "outline",
13
- className: "ml-auto",
14
- children: ["Columns ", /* @__PURE__ */ o(a, {})]
15
- })
16
- }), /* @__PURE__ */ o(r, {
17
- align: "end",
18
- children: c(d, (e) => /* @__PURE__ */ o(n, {
19
- className: "capitalize",
20
- checked: u[e.id] !== !1,
21
- onCheckedChange: () => e.toggleVisibility(u[e.id] === !1),
22
- children: e.id
23
- }, e.id))
24
- })] });
1
+ "use client";
2
+ import { createContextScope as e } from "./index6.js";
3
+ import { useComposedRefs as t } from "./index7.js";
4
+ import * as n from "react";
5
+ import { jsx as r } from "react/jsx-runtime";
6
+ import { createSlot as i } from "@radix-ui/react-slot";
7
+ //#region ../../node_modules/.pnpm/@radix-ui+react-collection@1.1.15_@types+react-dom@19.2.3_@types+react@19.2.17__@types+_e3b314e214d3788bd2a3a0fbdfeba189/node_modules/@radix-ui/react-collection/dist/index.mjs
8
+ var a = Object.defineProperty, o = (e, t) => a(e, "name", {
9
+ value: t,
10
+ configurable: !0
11
+ });
12
+ /* @__NO_SIDE_EFFECTS__ */
13
+ function s(a) {
14
+ let s = a + "CollectionProvider", [c, l] = e(s), [u, d] = c(s, {
15
+ collectionRef: { current: null },
16
+ itemMap: /* @__PURE__ */ new Map()
17
+ }), f = /* @__PURE__ */ o((e) => {
18
+ let { scope: t, children: i } = e, a = n.useRef(null), o = n.useRef(/* @__PURE__ */ new Map()).current;
19
+ return /* @__PURE__ */ r(u, {
20
+ scope: t,
21
+ itemMap: o,
22
+ collectionRef: a,
23
+ children: i
24
+ });
25
+ }, "CollectionProvider");
26
+ f.displayName = s;
27
+ let p = a + "CollectionSlot", m = i(p), h = n.forwardRef((e, n) => {
28
+ let { scope: i, children: a } = e;
29
+ return /* @__PURE__ */ r(m, {
30
+ ref: t(n, d(p, i).collectionRef),
31
+ children: a
32
+ });
33
+ });
34
+ h.displayName = p;
35
+ let g = a + "CollectionItemSlot", _ = "data-radix-collection-item", v = i(g), y = n.forwardRef((e, i) => {
36
+ let { scope: a, children: o, ...s } = e, c = n.useRef(null), l = t(i, c), u = d(g, a);
37
+ return n.useEffect(() => (u.itemMap.set(c, {
38
+ ref: c,
39
+ ...s
40
+ }), () => void u.itemMap.delete(c))), /* @__PURE__ */ r(v, {
41
+ [_]: "",
42
+ ref: l,
43
+ children: o
44
+ });
45
+ });
46
+ y.displayName = g;
47
+ function b(e) {
48
+ let t = d(a + "CollectionConsumer", e);
49
+ return n.useCallback(() => {
50
+ let e = t.collectionRef.current;
51
+ if (!e) return [];
52
+ let n = Array.from(e.querySelectorAll(`[${_}]`));
53
+ return Array.from(t.itemMap.values()).sort((e, t) => n.indexOf(e.ref.current) - n.indexOf(t.ref.current));
54
+ }, [t.collectionRef, t.itemMap]);
55
+ }
56
+ return o(b, "useCollection"), [
57
+ {
58
+ Provider: f,
59
+ Slot: h,
60
+ ItemSlot: y
61
+ },
62
+ b,
63
+ l
64
+ ];
65
+ }
66
+ o(s, "createCollection");
67
+ var c = /* @__PURE__ */ new WeakMap(), l = class e extends Map {
68
+ static {
69
+ o(this, "OrderedDict");
70
+ }
71
+ #e;
72
+ constructor(e) {
73
+ super(e), this.#e = [...super.keys()], c.set(this, !0);
74
+ }
75
+ set(e, t) {
76
+ return c.get(this) && (this.has(e) ? this.#e[this.#e.indexOf(e)] = e : this.#e.push(e)), super.set(e, t), this;
77
+ }
78
+ insert(e, t, n) {
79
+ let r = this.has(t), i = this.#e.length, a = f(e), o = a >= 0 ? a : i + a, s = o < 0 || o >= i ? -1 : o;
80
+ if (s === this.size || r && s === this.size - 1 || s === -1) return this.set(t, n), this;
81
+ let c = this.size + +!r;
82
+ a < 0 && o++;
83
+ let l = [...this.#e], u, d = !1;
84
+ for (let e = o; e < c; e++) if (o === e) {
85
+ let i = l[e];
86
+ l[e] === t && (i = l[e + 1]), r && this.delete(t), u = this.get(i), this.set(t, n);
87
+ } else {
88
+ !d && l[e - 1] === t && (d = !0);
89
+ let n = l[d ? e : e - 1], r = u;
90
+ u = this.get(n), this.delete(n), this.set(n, r);
91
+ }
92
+ return this;
93
+ }
94
+ with(t, n, r) {
95
+ let i = new e(this);
96
+ return i.insert(t, n, r), i;
97
+ }
98
+ before(e) {
99
+ let t = this.#e.indexOf(e) - 1;
100
+ if (!(t < 0)) return this.entryAt(t);
101
+ }
102
+ setBefore(e, t, n) {
103
+ let r = this.#e.indexOf(e);
104
+ return r === -1 ? this : this.insert(r, t, n);
105
+ }
106
+ after(e) {
107
+ let t = this.#e.indexOf(e);
108
+ if (t = t === -1 || t === this.size - 1 ? -1 : t + 1, t !== -1) return this.entryAt(t);
109
+ }
110
+ setAfter(e, t, n) {
111
+ let r = this.#e.indexOf(e);
112
+ return r === -1 ? this : this.insert(r + 1, t, n);
113
+ }
114
+ first() {
115
+ return this.entryAt(0);
116
+ }
117
+ last() {
118
+ return this.entryAt(-1);
119
+ }
120
+ clear() {
121
+ return this.#e = [], super.clear();
122
+ }
123
+ delete(e) {
124
+ let t = super.delete(e);
125
+ return t && this.#e.splice(this.#e.indexOf(e), 1), t;
126
+ }
127
+ deleteAt(e) {
128
+ let t = this.keyAt(e);
129
+ return t === void 0 ? !1 : this.delete(t);
130
+ }
131
+ at(e) {
132
+ let t = u(this.#e, e);
133
+ if (t !== void 0) return this.get(t);
134
+ }
135
+ entryAt(e) {
136
+ let t = u(this.#e, e);
137
+ if (t !== void 0) return [t, this.get(t)];
138
+ }
139
+ indexOf(e) {
140
+ return this.#e.indexOf(e);
141
+ }
142
+ keyAt(e) {
143
+ return u(this.#e, e);
144
+ }
145
+ from(e, t) {
146
+ let n = this.indexOf(e);
147
+ if (n === -1) return;
148
+ let r = n + t;
149
+ return r < 0 && (r = 0), r >= this.size && (r = this.size - 1), this.at(r);
150
+ }
151
+ keyFrom(e, t) {
152
+ let n = this.indexOf(e);
153
+ if (n === -1) return;
154
+ let r = n + t;
155
+ return r < 0 && (r = 0), r >= this.size && (r = this.size - 1), this.keyAt(r);
156
+ }
157
+ find(e, t) {
158
+ let n = 0;
159
+ for (let r of this) {
160
+ if (Reflect.apply(e, t, [
161
+ r,
162
+ n,
163
+ this
164
+ ])) return r;
165
+ n++;
166
+ }
167
+ }
168
+ findIndex(e, t) {
169
+ let n = 0;
170
+ for (let r of this) {
171
+ if (Reflect.apply(e, t, [
172
+ r,
173
+ n,
174
+ this
175
+ ])) return n;
176
+ n++;
177
+ }
178
+ return -1;
179
+ }
180
+ filter(t, n) {
181
+ let r = [], i = 0;
182
+ for (let e of this) Reflect.apply(t, n, [
183
+ e,
184
+ i,
185
+ this
186
+ ]) && r.push(e), i++;
187
+ return new e(r);
188
+ }
189
+ map(t, n) {
190
+ let r = [], i = 0;
191
+ for (let e of this) r.push([e[0], Reflect.apply(t, n, [
192
+ e,
193
+ i,
194
+ this
195
+ ])]), i++;
196
+ return new e(r);
197
+ }
198
+ reduce(...e) {
199
+ let [t, n] = e, r = 0, i = n ?? this.at(0);
200
+ for (let n of this) i = r === 0 && e.length === 1 ? n : Reflect.apply(t, this, [
201
+ i,
202
+ n,
203
+ r,
204
+ this
205
+ ]), r++;
206
+ return i;
207
+ }
208
+ reduceRight(...e) {
209
+ let [t, n] = e, r = n ?? this.at(-1);
210
+ for (let n = this.size - 1; n >= 0; n--) {
211
+ let i = this.at(n);
212
+ r = n === this.size - 1 && e.length === 1 ? i : Reflect.apply(t, this, [
213
+ r,
214
+ i,
215
+ n,
216
+ this
217
+ ]);
218
+ }
219
+ return r;
220
+ }
221
+ toSorted(t) {
222
+ return new e([...this.entries()].sort(t));
223
+ }
224
+ toReversed() {
225
+ let t = new e();
226
+ for (let e = this.size - 1; e >= 0; e--) {
227
+ let n = this.keyAt(e), r = this.get(n);
228
+ t.set(n, r);
229
+ }
230
+ return t;
231
+ }
232
+ toSpliced(...t) {
233
+ let n = [...this.entries()];
234
+ return n.splice(...t), new e(n);
235
+ }
236
+ slice(t, n) {
237
+ let r = new e(), i = this.size - 1;
238
+ if (t === void 0) return r;
239
+ t < 0 && (t += this.size), n !== void 0 && n > 0 && (i = n - 1);
240
+ for (let e = t; e <= i; e++) {
241
+ let t = this.keyAt(e), n = this.get(t);
242
+ r.set(t, n);
243
+ }
244
+ return r;
245
+ }
246
+ every(e, t) {
247
+ let n = 0;
248
+ for (let r of this) {
249
+ if (!Reflect.apply(e, t, [
250
+ r,
251
+ n,
252
+ this
253
+ ])) return !1;
254
+ n++;
255
+ }
256
+ return !0;
257
+ }
258
+ some(e, t) {
259
+ let n = 0;
260
+ for (let r of this) {
261
+ if (Reflect.apply(e, t, [
262
+ r,
263
+ n,
264
+ this
265
+ ])) return !0;
266
+ n++;
267
+ }
268
+ return !1;
269
+ }
25
270
  };
271
+ function u(e, t) {
272
+ if ("at" in Array.prototype) return Array.prototype.at.call(e, t);
273
+ let n = d(e, t);
274
+ return n === -1 ? void 0 : e[n];
275
+ }
276
+ o(u, "at");
277
+ function d(e, t) {
278
+ let n = e.length, r = f(t), i = r >= 0 ? r : n + r;
279
+ return i < 0 || i >= n ? -1 : i;
280
+ }
281
+ o(d, "toSafeIndex");
282
+ function f(e) {
283
+ return e !== e || e === 0 ? 0 : Math.trunc(e);
284
+ }
285
+ o(f, "toSafeInteger");
286
+ /* @__NO_SIDE_EFFECTS__ */
287
+ function p(a) {
288
+ let s = a + "CollectionProvider", [c, u] = e(s), [d, f] = c(s, {
289
+ collectionElement: null,
290
+ collectionRef: { current: null },
291
+ collectionRefObject: { current: null },
292
+ itemMap: new l(),
293
+ setItemMap: /* @__PURE__ */ o(() => void 0, "setItemMap")
294
+ }), p = /* @__PURE__ */ o(({ state: e, ...t }) => e ? /* @__PURE__ */ r(v, {
295
+ ...t,
296
+ state: e
297
+ }) : /* @__PURE__ */ r(h, { ...t }), "CollectionProvider");
298
+ p.displayName = s;
299
+ let h = /* @__PURE__ */ o((e) => {
300
+ let t = T();
301
+ return /* @__PURE__ */ r(v, {
302
+ ...e,
303
+ state: t
304
+ });
305
+ }, "CollectionInit");
306
+ h.displayName = s + "Init";
307
+ let v = /* @__PURE__ */ o((e) => {
308
+ let { scope: i, children: a, state: o } = e, s = n.useRef(null), [c, l] = n.useState(null), u = t(s, l), [f, p] = o;
309
+ return n.useEffect(() => {
310
+ if (!c) return;
311
+ let e = _(() => {});
312
+ return e.observe(c, {
313
+ childList: !0,
314
+ subtree: !0
315
+ }), () => {
316
+ e.disconnect();
317
+ };
318
+ }, [c]), /* @__PURE__ */ r(d, {
319
+ scope: i,
320
+ itemMap: f,
321
+ setItemMap: p,
322
+ collectionRef: u,
323
+ collectionRefObject: s,
324
+ collectionElement: c,
325
+ children: a
326
+ });
327
+ }, "CollectionProviderImpl");
328
+ v.displayName = s + "Impl";
329
+ let y = a + "CollectionSlot", b = i(y), x = n.forwardRef((e, n) => {
330
+ let { scope: i, children: a } = e;
331
+ return /* @__PURE__ */ r(b, {
332
+ ref: t(n, f(y, i).collectionRef),
333
+ children: a
334
+ });
335
+ });
336
+ x.displayName = y;
337
+ let S = a + "CollectionItemSlot", C = i(S), w = n.forwardRef((e, i) => {
338
+ let { scope: a, children: o, ...s } = e, c = n.useRef(null), [u, d] = n.useState(null), p = t(i, c, d), { setItemMap: h } = f(S, a), _ = n.useRef(s);
339
+ m(_.current, s) || (_.current = s);
340
+ let v = _.current;
341
+ return n.useEffect(() => {
342
+ let e = v;
343
+ return h((t) => u ? t.has(u) ? t.set(u, {
344
+ ...e,
345
+ element: u
346
+ }).toSorted(g) : (t.set(u, {
347
+ ...e,
348
+ element: u
349
+ }), t.toSorted(g)) : t), () => {
350
+ h((e) => !u || !e.has(u) ? e : (e.delete(u), new l(e)));
351
+ };
352
+ }, [
353
+ u,
354
+ v,
355
+ h
356
+ ]), /* @__PURE__ */ r(C, {
357
+ "data-radix-collection-item": "",
358
+ ref: p,
359
+ children: o
360
+ });
361
+ });
362
+ w.displayName = S;
363
+ function T() {
364
+ return n.useState(new l());
365
+ }
366
+ o(T, "useInitCollection");
367
+ function E(e) {
368
+ let { itemMap: t } = f(a + "CollectionConsumer", e);
369
+ return t;
370
+ }
371
+ return o(E, "useCollection"), [{
372
+ Provider: p,
373
+ Slot: x,
374
+ ItemSlot: w
375
+ }, {
376
+ createCollectionScope: u,
377
+ useCollection: E,
378
+ useInitCollection: T
379
+ }];
380
+ }
381
+ o(p, "createCollection");
382
+ function m(e, t) {
383
+ if (e === t) return !0;
384
+ if (typeof e != "object" || typeof t != "object" || e == null || t == null) return !1;
385
+ let n = Object.keys(e), r = Object.keys(t);
386
+ if (n.length !== r.length) return !1;
387
+ for (let r of n) if (!Object.prototype.hasOwnProperty.call(t, r) || e[r] !== t[r]) return !1;
388
+ return !0;
389
+ }
390
+ o(m, "shallowEqual");
391
+ function h(e, t) {
392
+ return !!(t.compareDocumentPosition(e) & Node.DOCUMENT_POSITION_PRECEDING);
393
+ }
394
+ o(h, "isElementPreceding");
395
+ function g(e, t) {
396
+ return !e[1].element || !t[1].element ? 0 : h(e[1].element, t[1].element) ? -1 : 1;
397
+ }
398
+ o(g, "sortByDocumentPosition");
399
+ function _(e) {
400
+ return new MutationObserver((t) => {
401
+ for (let n of t) if (n.type === "childList") {
402
+ e();
403
+ return;
404
+ }
405
+ });
406
+ }
407
+ o(_, "getChildListObserver");
26
408
  //#endregion
27
- export { l as DataTableViewOptions };
409
+ export { s as createCollection };
package/dist/index37.cjs CHANGED
@@ -1 +1 @@
1
- const e=require("./index7.cjs"),t=require("./index13.cjs");let n=require("lucide-react"),r=require("react/jsx-runtime"),i=require("lodash-es");var a=({table:a,columnVisibility:o})=>{let s=a.getAllColumns().filter(e=>e.getCanHide());return(0,r.jsxs)(t.DropdownMenu,{children:[(0,r.jsx)(t.DropdownMenuTrigger,{asChild:!0,children:(0,r.jsxs)(e.Button,{variant:`outline`,className:`ml-auto`,children:[`Columns `,(0,r.jsx)(n.ChevronDown,{})]})}),(0,r.jsx)(t.DropdownMenuContent,{align:`end`,children:(0,i.map)(s,e=>(0,r.jsx)(t.DropdownMenuCheckboxItem,{className:`capitalize`,checked:o[e.id]!==!1,onCheckedChange:()=>e.toggleVisibility(o[e.id]===!1),children:e.id},e.id))})]})};exports.DataTableViewOptions=a;
1
+ "use client";const e=require("./index2.cjs"),t=require("./index7.cjs"),n=require("./index8.cjs");let r=require("react");r=e.__toESM(r,1);let i=require("react/jsx-runtime"),a=require("@radix-ui/react-slot");var o=Object.defineProperty,s=(e,t)=>o(e,`name`,{value:t,configurable:!0});function c(e){let o=e+`CollectionProvider`,[c,l]=t.createContextScope(o),[u,d]=c(o,{collectionRef:{current:null},itemMap:new Map}),f=s(e=>{let{scope:t,children:n}=e,a=r.useRef(null),o=r.useRef(new Map).current;return(0,i.jsx)(u,{scope:t,itemMap:o,collectionRef:a,children:n})},`CollectionProvider`);f.displayName=o;let p=e+`CollectionSlot`,m=(0,a.createSlot)(p),h=r.forwardRef((e,t)=>{let{scope:r,children:a}=e;return(0,i.jsx)(m,{ref:n.useComposedRefs(t,d(p,r).collectionRef),children:a})});h.displayName=p;let g=e+`CollectionItemSlot`,_=`data-radix-collection-item`,v=(0,a.createSlot)(g),y=r.forwardRef((e,t)=>{let{scope:a,children:o,...s}=e,c=r.useRef(null),l=n.useComposedRefs(t,c),u=d(g,a);return r.useEffect(()=>(u.itemMap.set(c,{ref:c,...s}),()=>void u.itemMap.delete(c))),(0,i.jsx)(v,{[_]:``,ref:l,children:o})});y.displayName=g;function b(t){let n=d(e+`CollectionConsumer`,t);return r.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${_}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return s(b,`useCollection`),[{Provider:f,Slot:h,ItemSlot:y},b,l]}s(c,`createCollection`);var l=new WeakMap,u=class e extends Map{static{s(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],l.set(this,!0)}set(e,t){return l.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=this.#e.length,a=p(e),o=a>=0?a:i+a,s=o<0||o>=i?-1:o;if(s===this.size||r&&s===this.size-1||s===-1)return this.set(t,n),this;let c=this.size+ +!r;a<0&&o++;let l=[...this.#e],u,d=!1;for(let e=o;e<c;e++)if(o===e){let i=l[e];l[e]===t&&(i=l[e+1]),r&&this.delete(t),u=this.get(i),this.set(t,n)}else{!d&&l[e-1]===t&&(d=!0);let n=l[d?e:e-1],r=u;u=this.get(n),this.delete(n),this.set(n,r)}return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r+1,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return t===void 0?!1:this.delete(t)}at(e){let t=d(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=d(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return d(this.#e,e)}from(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=0,i=n??this.at(0);for(let n of this)i=r===0&&e.length===1?n:Reflect.apply(t,this,[i,n,r,this]),r++;return i}reduceRight(...e){let[t,n]=e,r=n??this.at(-1);for(let n=this.size-1;n>=0;n--){let i=this.at(n);r=n===this.size-1&&e.length===1?i:Reflect.apply(t,this,[r,i,n,this])}return r}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e,i=this.size-1;if(t===void 0)return r;t<0&&(t+=this.size),n!==void 0&&n>0&&(i=n-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),n=this.get(t);r.set(t,n)}return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function d(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=f(e,t);return n===-1?void 0:e[n]}s(d,`at`);function f(e,t){let n=e.length,r=p(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}s(f,`toSafeIndex`);function p(e){return e!==e||e===0?0:Math.trunc(e)}s(p,`toSafeInteger`);function m(e){let o=e+`CollectionProvider`,[c,l]=t.createContextScope(o),[d,f]=c(o,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new u,setItemMap:s(()=>void 0,`setItemMap`)}),p=s(({state:e,...t})=>e?(0,i.jsx)(g,{...t,state:e}):(0,i.jsx)(m,{...t}),`CollectionProvider`);p.displayName=o;let m=s(e=>{let t=T();return(0,i.jsx)(g,{...e,state:t})},`CollectionInit`);m.displayName=o+`Init`;let g=s(e=>{let{scope:t,children:a,state:o}=e,s=r.useRef(null),[c,l]=r.useState(null),u=n.useComposedRefs(s,l),[f,p]=o;return r.useEffect(()=>{if(!c)return;let e=v(()=>{});return e.observe(c,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[c]),(0,i.jsx)(d,{scope:t,itemMap:f,setItemMap:p,collectionRef:u,collectionRefObject:s,collectionElement:c,children:a})},`CollectionProviderImpl`);g.displayName=o+`Impl`;let y=e+`CollectionSlot`,b=(0,a.createSlot)(y),x=r.forwardRef((e,t)=>{let{scope:r,children:a}=e;return(0,i.jsx)(b,{ref:n.useComposedRefs(t,f(y,r).collectionRef),children:a})});x.displayName=y;let S=e+`CollectionItemSlot`,C=(0,a.createSlot)(S),w=r.forwardRef((e,t)=>{let{scope:a,children:o,...s}=e,c=r.useRef(null),[l,d]=r.useState(null),p=n.useComposedRefs(t,c,d),{setItemMap:m}=f(S,a),g=r.useRef(s);h(g.current,s)||(g.current=s);let v=g.current;return r.useEffect(()=>{let e=v;return m(t=>l?t.has(l)?t.set(l,{...e,element:l}).toSorted(_):(t.set(l,{...e,element:l}),t.toSorted(_)):t),()=>{m(e=>!l||!e.has(l)?e:(e.delete(l),new u(e)))}},[l,v,m]),(0,i.jsx)(C,{"data-radix-collection-item":``,ref:p,children:o})});w.displayName=S;function T(){return r.useState(new u)}s(T,`useInitCollection`);function E(t){let{itemMap:n}=f(e+`CollectionConsumer`,t);return n}return s(E,`useCollection`),[{Provider:p,Slot:x,ItemSlot:w},{createCollectionScope:l,useCollection:E,useInitCollection:T}]}s(m,`createCollection`);function h(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}s(h,`shallowEqual`);function g(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}s(g,`isElementPreceding`);function _(e,t){return!e[1].element||!t[1].element?0:g(e[1].element,t[1].element)?-1:1}s(_,`sortByDocumentPosition`);function v(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}s(v,`getChildListObserver`),exports.createCollection=c;