@vlrc-fe/components 1.0.7 → 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 (448) hide show
  1. package/dist/MultiSelect/type.d.ts +2 -2
  2. package/dist/index.cjs +1 -1
  3. package/dist/index.js +64 -41
  4. package/dist/index10.cjs +1 -1
  5. package/dist/index10.js +46 -80
  6. package/dist/index100.cjs +1 -1
  7. package/dist/index100.js +22 -60
  8. package/dist/index101.cjs +1 -1
  9. package/dist/index101.js +1147 -43
  10. package/dist/index102.cjs +1 -1
  11. package/dist/index102.js +30 -64
  12. package/dist/index103.cjs +1 -1
  13. package/dist/index103.js +31 -147
  14. package/dist/index104.cjs +1 -1
  15. package/dist/index104.js +93 -19
  16. package/dist/index105.cjs +1 -1
  17. package/dist/index105.js +80 -25
  18. package/dist/index106.cjs +1 -1
  19. package/dist/index106.js +9 -50
  20. package/dist/index107.cjs +1 -1
  21. package/dist/index107.js +30 -156
  22. package/dist/index108.cjs +1 -1
  23. package/dist/index108.js +350 -14
  24. package/dist/index109.cjs +1 -1
  25. package/dist/index109.js +11 -0
  26. package/dist/index11.cjs +1 -1
  27. package/dist/index11.js +55 -60
  28. package/dist/index110.cjs +1 -0
  29. package/dist/index110.js +430 -0
  30. package/dist/index111.cjs +1 -0
  31. package/dist/index111.js +36 -0
  32. package/dist/index112.cjs +1 -0
  33. package/dist/index112.js +28 -0
  34. package/dist/index113.cjs +1 -0
  35. package/dist/index113.js +14 -0
  36. package/dist/index114.cjs +1 -0
  37. package/dist/index114.js +156 -0
  38. package/dist/index115.cjs +1 -0
  39. package/dist/index115.js +19 -0
  40. package/dist/index116.cjs +1 -0
  41. package/dist/index116.js +67 -0
  42. package/dist/index117.cjs +1 -0
  43. package/dist/index117.js +118 -0
  44. package/dist/index118.cjs +1 -0
  45. package/dist/index118.js +36 -0
  46. package/dist/index119.cjs +1 -0
  47. package/dist/index119.js +13 -0
  48. package/dist/index12.cjs +1 -1
  49. package/dist/index12.js +44 -121
  50. package/dist/index120.cjs +1 -0
  51. package/dist/index120.js +31 -0
  52. package/dist/index121.cjs +1 -0
  53. package/dist/index121.js +37 -0
  54. package/dist/index122.cjs +1 -0
  55. package/dist/index122.js +123 -0
  56. package/dist/index123.cjs +1 -0
  57. package/dist/index123.js +44 -0
  58. package/dist/index124.cjs +1 -0
  59. package/dist/index124.js +43 -0
  60. package/dist/index125.cjs +1 -0
  61. package/dist/index125.js +14 -0
  62. package/dist/index126.cjs +1 -0
  63. package/dist/index126.js +64 -0
  64. package/dist/index127.cjs +1 -0
  65. package/dist/index127.js +23 -0
  66. package/dist/index128.cjs +1 -0
  67. package/dist/index128.js +34 -0
  68. package/dist/index129.cjs +1 -0
  69. package/dist/index129.js +27 -0
  70. package/dist/index13.cjs +1 -1
  71. package/dist/index13.js +30 -12
  72. package/dist/index130.cjs +1 -0
  73. package/dist/index130.js +26 -0
  74. package/dist/index131.cjs +1 -0
  75. package/dist/index131.js +157 -0
  76. package/dist/index132.cjs +1 -0
  77. package/dist/index132.js +34 -0
  78. package/dist/index133.cjs +1 -0
  79. package/dist/index133.js +46 -0
  80. package/dist/index134.cjs +1 -0
  81. package/dist/index134.js +142 -0
  82. package/dist/index135.cjs +1 -0
  83. package/dist/index135.js +125 -0
  84. package/dist/index136.cjs +1 -0
  85. package/dist/index136.js +26 -0
  86. package/dist/index137.cjs +1 -0
  87. package/dist/index137.js +88 -0
  88. package/dist/index138.cjs +1 -0
  89. package/dist/index138.js +221 -0
  90. package/dist/index139.cjs +1 -0
  91. package/dist/index139.js +166 -0
  92. package/dist/index14.cjs +1 -1
  93. package/dist/index14.js +8 -12
  94. package/dist/index140.cjs +1 -0
  95. package/dist/index140.js +126 -0
  96. package/dist/index141.cjs +1 -0
  97. package/dist/index141.js +15 -0
  98. package/dist/index142.cjs +1 -0
  99. package/dist/index142.js +9 -0
  100. package/dist/index143.cjs +1 -0
  101. package/dist/index143.js +17 -0
  102. package/dist/index144.cjs +1 -0
  103. package/dist/index144.js +22 -0
  104. package/dist/index145.cjs +1 -0
  105. package/dist/index145.js +18 -0
  106. package/dist/index146.cjs +1 -0
  107. package/dist/index146.js +6 -0
  108. package/dist/index147.cjs +1 -0
  109. package/dist/index147.js +7 -0
  110. package/dist/index148.cjs +1 -0
  111. package/dist/index148.js +8 -0
  112. package/dist/index149.cjs +1 -0
  113. package/dist/index149.js +7 -0
  114. package/dist/index15.cjs +1 -1
  115. package/dist/index15.js +12 -112
  116. package/dist/index150.cjs +1 -0
  117. package/dist/index150.js +7 -0
  118. package/dist/index151.cjs +1 -0
  119. package/dist/index151.js +9 -0
  120. package/dist/index152.cjs +1 -0
  121. package/dist/index152.js +69 -0
  122. package/dist/index153.cjs +1 -0
  123. package/dist/index153.js +11 -0
  124. package/dist/index154.cjs +1 -0
  125. package/dist/index154.js +202 -0
  126. package/dist/index155.cjs +1 -0
  127. package/dist/index155.js +124 -0
  128. package/dist/index156.cjs +1 -0
  129. package/dist/index156.js +32 -0
  130. package/dist/index157.cjs +1 -0
  131. package/dist/index157.js +20 -0
  132. package/dist/index158.cjs +1 -0
  133. package/dist/index158.js +69 -0
  134. package/dist/index159.cjs +1 -0
  135. package/dist/index159.js +32 -0
  136. package/dist/index16.cjs +1 -1
  137. package/dist/index16.js +4 -726
  138. package/dist/index160.cjs +1 -0
  139. package/dist/index160.js +11 -0
  140. package/dist/index161.cjs +1 -0
  141. package/dist/index161.js +280 -0
  142. package/dist/index162.cjs +1 -0
  143. package/dist/index162.js +157 -0
  144. package/dist/index163.cjs +1 -0
  145. package/dist/index163.js +20 -0
  146. package/dist/index164.cjs +1 -0
  147. package/dist/index164.js +10 -0
  148. package/dist/index165.cjs +1 -0
  149. package/dist/index165.js +14 -0
  150. package/dist/index166.cjs +1 -0
  151. package/dist/index166.js +8 -0
  152. package/dist/index167.cjs +1 -0
  153. package/dist/index167.js +8 -0
  154. package/dist/index168.cjs +1 -0
  155. package/dist/index168.js +11 -0
  156. package/dist/index169.cjs +1 -0
  157. package/dist/index169.js +10 -0
  158. package/dist/index17.cjs +1 -1
  159. package/dist/index17.js +79 -339
  160. package/dist/index170.cjs +1 -0
  161. package/dist/index170.js +6 -0
  162. package/dist/index171.cjs +1 -0
  163. package/dist/index171.js +8 -0
  164. package/dist/index172.cjs +1 -0
  165. package/dist/index172.js +8 -0
  166. package/dist/index173.cjs +1 -0
  167. package/dist/index173.js +10 -0
  168. package/dist/index174.cjs +1 -0
  169. package/dist/index174.js +11 -0
  170. package/dist/index175.cjs +1 -0
  171. package/dist/index175.js +15 -0
  172. package/dist/index176.cjs +1 -0
  173. package/dist/index176.js +11 -0
  174. package/dist/index177.cjs +1 -0
  175. package/dist/index177.js +11 -0
  176. package/dist/index178.cjs +1 -0
  177. package/dist/index178.js +6 -0
  178. package/dist/index179.cjs +1 -0
  179. package/dist/index179.js +43 -0
  180. package/dist/index18.cjs +1 -1
  181. package/dist/index18.js +19 -66
  182. package/dist/index180.cjs +1 -0
  183. package/dist/index180.js +382 -0
  184. package/dist/index181.cjs +1 -0
  185. package/dist/index181.js +40 -0
  186. package/dist/index182.cjs +1 -0
  187. package/dist/index182.js +23 -0
  188. package/dist/index183.cjs +1 -0
  189. package/dist/index183.js +59 -0
  190. package/dist/index184.cjs +1 -0
  191. package/dist/index184.js +55 -0
  192. package/dist/index185.cjs +1 -0
  193. package/dist/index185.js +54 -0
  194. package/dist/index186.cjs +1 -0
  195. package/dist/index186.js +57 -0
  196. package/dist/index187.cjs +1 -0
  197. package/dist/index187.js +57 -0
  198. package/dist/index188.cjs +1 -0
  199. package/dist/index188.js +88 -0
  200. package/dist/index189.cjs +1 -0
  201. package/dist/index189.js +66 -0
  202. package/dist/index19.cjs +1 -1
  203. package/dist/index19.js +18 -8
  204. package/dist/index190.cjs +1 -0
  205. package/dist/index190.js +594 -0
  206. package/dist/index191.cjs +9 -0
  207. package/dist/index191.js +30 -0
  208. package/dist/index192.cjs +1 -0
  209. package/dist/index192.js +50 -0
  210. package/dist/index193.cjs +1 -0
  211. package/dist/index193.js +65 -0
  212. package/dist/index194.cjs +1 -0
  213. package/dist/index194.js +48 -0
  214. package/dist/index195.cjs +1 -0
  215. package/dist/index195.js +67 -0
  216. package/dist/index196.cjs +1 -0
  217. package/dist/index196.js +151 -0
  218. package/dist/index197.cjs +1 -0
  219. package/dist/index197.js +23 -0
  220. package/dist/index198.cjs +1 -0
  221. package/dist/index198.js +27 -0
  222. package/dist/index199.cjs +1 -0
  223. package/dist/index199.js +53 -0
  224. package/dist/index20.cjs +1 -1
  225. package/dist/index20.js +51 -98
  226. package/dist/index200.cjs +1 -0
  227. package/dist/index200.js +161 -0
  228. package/dist/index201.cjs +1 -0
  229. package/dist/index201.js +16 -0
  230. package/dist/index202.cjs +1 -0
  231. package/dist/index21.cjs +1 -1
  232. package/dist/index21.js +81 -28
  233. package/dist/index22.cjs +1 -1
  234. package/dist/index22.js +64 -14
  235. package/dist/index23.cjs +1 -1
  236. package/dist/index23.js +25 -22
  237. package/dist/index24.cjs +1 -1
  238. package/dist/index24.js +1014 -33
  239. package/dist/index25.cjs +1 -1
  240. package/dist/index25.js +22 -96
  241. package/dist/index26.cjs +1 -1
  242. package/dist/index26.js +108 -25
  243. package/dist/index27.cjs +1 -1
  244. package/dist/index27.js +15 -9
  245. package/dist/index28.cjs +1 -1
  246. package/dist/index28.js +20 -66
  247. package/dist/index29.cjs +1 -1
  248. package/dist/index29.js +81 -11
  249. package/dist/index30.cjs +1 -1
  250. package/dist/index30.js +91 -29
  251. package/dist/index31.cjs +1 -1
  252. package/dist/index31.js +14 -41
  253. package/dist/index32.cjs +1 -1
  254. package/dist/index32.js +93 -12
  255. package/dist/index33.cjs +1 -1
  256. package/dist/index33.js +22 -62
  257. package/dist/index34.cjs +1 -1
  258. package/dist/index34.js +84 -22
  259. package/dist/index35.cjs +1 -1
  260. package/dist/index35.js +85 -33
  261. package/dist/index36.cjs +1 -1
  262. package/dist/index36.js +407 -25
  263. package/dist/index37.cjs +1 -1
  264. package/dist/index37.js +170 -25
  265. package/dist/index38.cjs +1 -1
  266. package/dist/index38.js +28 -154
  267. package/dist/index39.cjs +1 -1
  268. package/dist/index39.js +158 -33
  269. package/dist/index40.cjs +1 -1
  270. package/dist/index40.js +104 -45
  271. package/dist/index41.cjs +1 -1
  272. package/dist/index41.js +337 -140
  273. package/dist/index42.cjs +1 -1
  274. package/dist/index42.js +96 -124
  275. package/dist/index43.cjs +1 -1
  276. package/dist/index43.js +319 -23
  277. package/dist/index44.cjs +1 -1
  278. package/dist/index44.js +205 -81
  279. package/dist/index45.cjs +1 -1
  280. package/dist/index45.js +33 -220
  281. package/dist/index46.cjs +1 -1
  282. package/dist/index46.js +161 -163
  283. package/dist/index47.cjs +1 -1
  284. package/dist/index47.js +20 -125
  285. package/dist/index48.cjs +1 -1
  286. package/dist/index48.js +24 -14
  287. package/dist/index49.cjs +1 -1
  288. package/dist/index49.js +167 -7
  289. package/dist/index5.js +26 -14
  290. package/dist/index50.cjs +1 -1
  291. package/dist/index50.js +44 -15
  292. package/dist/index51.cjs +1 -1
  293. package/dist/index51.js +15 -18
  294. package/dist/index52.cjs +1 -1
  295. package/dist/index52.js +3 -17
  296. package/dist/index53.cjs +1 -1
  297. package/dist/index53.js +5 -5
  298. package/dist/index54.cjs +1 -1
  299. package/dist/index54.js +19 -4
  300. package/dist/index55.cjs +1 -1
  301. package/dist/index55.js +24 -6
  302. package/dist/index56.cjs +1 -1
  303. package/dist/index56.js +66 -4
  304. package/dist/index57.cjs +1 -1
  305. package/dist/index57.js +14 -5
  306. package/dist/index58.cjs +1 -1
  307. package/dist/index58.js +4 -8
  308. package/dist/index59.cjs +1 -1
  309. package/dist/index59.js +50 -67
  310. package/dist/index6.cjs +1 -1
  311. package/dist/index6.js +85 -46
  312. package/dist/index60.cjs +1 -1
  313. package/dist/index60.js +6 -10
  314. package/dist/index61.cjs +1 -1
  315. package/dist/index61.js +25 -199
  316. package/dist/index62.cjs +1 -1
  317. package/dist/index62.js +13 -122
  318. package/dist/index63.cjs +1 -1
  319. package/dist/index63.js +9 -30
  320. package/dist/index64.cjs +1 -1
  321. package/dist/index64.js +3 -20
  322. package/dist/index65.cjs +1 -1
  323. package/dist/index65.js +24 -66
  324. package/dist/index66.cjs +1 -1
  325. package/dist/index66.js +68 -30
  326. package/dist/index67.cjs +38 -1
  327. package/dist/index67.js +3 -11
  328. package/dist/index68.cjs +1 -1
  329. package/dist/index68.js +12 -279
  330. package/dist/index69.cjs +1 -1
  331. package/dist/index69.js +50 -155
  332. package/dist/index7.cjs +1 -1
  333. package/dist/index7.js +29 -85
  334. package/dist/index70.cjs +1 -1
  335. package/dist/index70.js +115 -19
  336. package/dist/index71.cjs +4 -1
  337. package/dist/index71.js +6 -9
  338. package/dist/index72.cjs +1 -1
  339. package/dist/index72.js +12 -12
  340. package/dist/index73.cjs +1 -1
  341. package/dist/index73.js +539 -6
  342. package/dist/index74.cjs +1 -1
  343. package/dist/index74.js +197 -6
  344. package/dist/index75.cjs +1 -1
  345. package/dist/index75.js +120 -9
  346. package/dist/index76.cjs +1 -1
  347. package/dist/index76.js +912 -8
  348. package/dist/index77.cjs +3 -1
  349. package/dist/index77.js +76 -4
  350. package/dist/index78.cjs +1 -1
  351. package/dist/index78.js +120 -6
  352. package/dist/index79.cjs +1 -1
  353. package/dist/index79.js +12 -6
  354. package/dist/index8.cjs +1 -1
  355. package/dist/index8.js +35 -62
  356. package/dist/index80.cjs +1 -1
  357. package/dist/index80.js +14 -8
  358. package/dist/index81.cjs +1 -1
  359. package/dist/index81.js +113 -9
  360. package/dist/index82.cjs +1 -1
  361. package/dist/index82.js +725 -13
  362. package/dist/index83.cjs +1 -1
  363. package/dist/index83.js +346 -9
  364. package/dist/index84.cjs +1 -1
  365. package/dist/index84.js +74 -9
  366. package/dist/index85.cjs +1 -1
  367. package/dist/index85.js +148 -4
  368. package/dist/index86.cjs +1 -1
  369. package/dist/index86.js +31 -42
  370. package/dist/index87.cjs +1 -1
  371. package/dist/index87.js +12 -380
  372. package/dist/index88.cjs +1 -1
  373. package/dist/index88.js +345 -37
  374. package/dist/index89.cjs +20 -1
  375. package/dist/index89.js +40 -18
  376. package/dist/index9.cjs +1 -1
  377. package/dist/index9.js +85 -17
  378. package/dist/index90.cjs +1 -1
  379. package/dist/index90.js +113 -56
  380. package/dist/index91.cjs +1 -1
  381. package/dist/index91.js +272 -51
  382. package/dist/index92.cjs +1 -1
  383. package/dist/index92.js +129 -50
  384. package/dist/index93.cjs +1 -1
  385. package/dist/index93.js +13 -54
  386. package/dist/index94.cjs +1 -1
  387. package/dist/index94.js +28 -55
  388. package/dist/index95.cjs +1 -1
  389. package/dist/index95.js +525 -80
  390. package/dist/index96.cjs +1 -1
  391. package/dist/index96.js +75 -61
  392. package/dist/index97.cjs +1 -1
  393. package/dist/index97.js +67 -583
  394. package/dist/index98.cjs +1 -9
  395. package/dist/index98.js +32 -27
  396. package/dist/index99.cjs +1 -1
  397. package/dist/index99.js +17 -49
  398. package/dist/ui/alert-dialog.d.ts +15 -0
  399. package/dist/ui/alert-dialog.d.ts.map +1 -0
  400. package/dist/ui/alert.d.ts +10 -0
  401. package/dist/ui/alert.d.ts.map +1 -0
  402. package/dist/ui/aspect-ratio.d.ts +4 -0
  403. package/dist/ui/aspect-ratio.d.ts.map +1 -0
  404. package/dist/ui/avatar.d.ts +7 -0
  405. package/dist/ui/avatar.d.ts.map +1 -0
  406. package/dist/ui/badge.d.ts +1 -1
  407. package/dist/ui/breadcrumb.d.ts +12 -0
  408. package/dist/ui/breadcrumb.d.ts.map +1 -0
  409. package/dist/ui/button.d.ts +1 -1
  410. package/dist/ui/carousel.d.ts +20 -0
  411. package/dist/ui/carousel.d.ts.map +1 -0
  412. package/dist/ui/collapsible.d.ts +6 -0
  413. package/dist/ui/collapsible.d.ts.map +1 -0
  414. package/dist/ui/context-menu.d.ts +26 -0
  415. package/dist/ui/context-menu.d.ts.map +1 -0
  416. package/dist/ui/drawer.d.ts +14 -0
  417. package/dist/ui/drawer.d.ts.map +1 -0
  418. package/dist/ui/hover-card.d.ts +7 -0
  419. package/dist/ui/hover-card.d.ts.map +1 -0
  420. package/dist/ui/index.d.ts +23 -0
  421. package/dist/ui/index.d.ts.map +1 -1
  422. package/dist/ui/input-otp.d.ts +12 -0
  423. package/dist/ui/input-otp.d.ts.map +1 -0
  424. package/dist/ui/menubar.d.ts +27 -0
  425. package/dist/ui/menubar.d.ts.map +1 -0
  426. package/dist/ui/navigation-menu.d.ts +15 -0
  427. package/dist/ui/navigation-menu.d.ts.map +1 -0
  428. package/dist/ui/pagination.d.ts +14 -0
  429. package/dist/ui/pagination.d.ts.map +1 -0
  430. package/dist/ui/resizable.d.ts +9 -0
  431. package/dist/ui/resizable.d.ts.map +1 -0
  432. package/dist/ui/sheet.d.ts +14 -0
  433. package/dist/ui/sheet.d.ts.map +1 -0
  434. package/dist/ui/sidebar.d.ts +70 -0
  435. package/dist/ui/sidebar.d.ts.map +1 -0
  436. package/dist/ui/skeleton.d.ts +3 -0
  437. package/dist/ui/skeleton.d.ts.map +1 -0
  438. package/dist/ui/slider.d.ts +5 -0
  439. package/dist/ui/slider.d.ts.map +1 -0
  440. package/dist/ui/switch.d.ts +5 -0
  441. package/dist/ui/switch.d.ts.map +1 -0
  442. package/dist/ui/tabs.d.ts +8 -0
  443. package/dist/ui/tabs.d.ts.map +1 -0
  444. package/dist/ui/toggle-group.d.ts +8 -0
  445. package/dist/ui/toggle-group.d.ts.map +1 -0
  446. package/dist/ui/toggle.d.ts +10 -0
  447. package/dist/ui/toggle.d.ts.map +1 -0
  448. package/package.json +23 -5
package/dist/index30.js CHANGED
@@ -1,35 +1,97 @@
1
- import { cn as e } from "./index3.js";
2
- import "react";
3
- import { jsx as t, jsxs as n } from "react/jsx-runtime";
4
- import * as r from "@radix-ui/react-tooltip";
5
- //#region src/ui/tooltip.tsx
6
- function i({ delayDuration: e = 0, ...n }) {
7
- return /* @__PURE__ */ t(r.Provider, {
8
- "data-slot": "tooltip-provider",
9
- delayDuration: e,
10
- ...n
1
+ "use client";
2
+ import { useLayoutEffect2 as e } from "./index16.js";
3
+ import * as t from "react";
4
+ //#region ../../node_modules/.pnpm/@radix-ui+react-presence@1.1.10_@types+react-dom@19.2.3_@types+react@19.2.17__@types+re_138587ba593102bdcf335a5673d92068/node_modules/@radix-ui/react-presence/dist/index.mjs
5
+ var n = Object.defineProperty, r = (e, t) => n(e, "name", {
6
+ value: t,
7
+ configurable: !0
8
+ });
9
+ function i(e, n) {
10
+ return t.useReducer((e, t) => n[e][t] ?? e, e);
11
+ }
12
+ r(i, "useStateMachine");
13
+ var a = /* @__PURE__ */ r((e) => {
14
+ let { present: n, children: r } = e, i = o(n), a = typeof r == "function" ? r({ present: i.isPresent }) : t.Children.only(r), s = c(i.ref, u(a));
15
+ return typeof r == "function" || i.isPresent ? t.cloneElement(a, { ref: s }) : null;
16
+ }, "Presence");
17
+ function o(n) {
18
+ let [a, o] = t.useState(), s = t.useRef(null), c = t.useRef(n), u = t.useRef("none"), d = t.useRef(void 0), [f, p] = i(n ? "mounted" : "unmounted", {
19
+ mounted: {
20
+ UNMOUNT: "unmounted",
21
+ ANIMATION_OUT: "unmountSuspended"
22
+ },
23
+ unmountSuspended: {
24
+ MOUNT: "mounted",
25
+ ANIMATION_END: "unmounted"
26
+ },
27
+ unmounted: { MOUNT: "mounted" }
11
28
  });
29
+ return t.useEffect(() => {
30
+ f === "mounted" ? (u.current = d.current ?? l(s.current), d.current = void 0) : u.current = "none";
31
+ }, [f]), e(() => {
32
+ let e = s.current, t = c.current;
33
+ if (t !== n) {
34
+ let r = u.current, i = l(e);
35
+ n ? (d.current = i, p("MOUNT")) : i === "none" || e?.display === "none" ? p("UNMOUNT") : p(t && r !== i ? "ANIMATION_OUT" : "UNMOUNT"), c.current = n;
36
+ }
37
+ }, [n, p]), e(() => {
38
+ if (a) {
39
+ let e, t = a.ownerDocument.defaultView ?? window, n = /* @__PURE__ */ r((n) => {
40
+ let r = l(s.current).includes(CSS.escape(n.animationName));
41
+ if (n.target === a && r && (p("ANIMATION_END"), !c.current)) {
42
+ let n = a.style.animationFillMode;
43
+ a.style.animationFillMode = "forwards", e = t.setTimeout(() => {
44
+ a.style.animationFillMode === "forwards" && (a.style.animationFillMode = n);
45
+ });
46
+ }
47
+ }, "handleAnimationEnd"), i = /* @__PURE__ */ r((e) => {
48
+ e.target === a && (u.current = l(s.current));
49
+ }, "handleAnimationStart");
50
+ return a.addEventListener("animationstart", i), a.addEventListener("animationcancel", n), a.addEventListener("animationend", n), () => {
51
+ t.clearTimeout(e), a.removeEventListener("animationstart", i), a.removeEventListener("animationcancel", n), a.removeEventListener("animationend", n);
52
+ };
53
+ } else p("ANIMATION_END");
54
+ }, [a, p]), {
55
+ isPresent: ["mounted", "unmountSuspended"].includes(f),
56
+ ref: t.useCallback((e) => {
57
+ if (e) {
58
+ let t = getComputedStyle(e);
59
+ s.current = t, d.current = l(t);
60
+ } else s.current = null;
61
+ o(e);
62
+ }, [])
63
+ };
12
64
  }
13
- function a({ ...e }) {
14
- return /* @__PURE__ */ t(i, { children: /* @__PURE__ */ t(r.Root, {
15
- "data-slot": "tooltip",
16
- ...e
17
- }) });
65
+ r(o, "usePresence");
66
+ function s(e, t) {
67
+ if (typeof e == "function") return e(t);
68
+ e != null && (e.current = t);
18
69
  }
19
- function o({ ...e }) {
20
- return /* @__PURE__ */ t(r.Trigger, {
21
- "data-slot": "tooltip-trigger",
22
- ...e
23
- });
70
+ r(s, "setRef");
71
+ function c(...e) {
72
+ let n = t.useRef(e);
73
+ return n.current = e, t.useCallback((e) => {
74
+ let t = n.current, r = !1, i = t.map((t) => {
75
+ let n = s(t, e);
76
+ return !r && typeof n == "function" && (r = !0), n;
77
+ });
78
+ if (r) return () => {
79
+ for (let e = 0; e < i.length; e++) {
80
+ let n = i[e];
81
+ typeof n == "function" ? n() : s(t[e], null);
82
+ }
83
+ };
84
+ }, []);
85
+ }
86
+ r(c, "useStableComposedRefs");
87
+ function l(e) {
88
+ return e?.animationName || "none";
24
89
  }
25
- function s({ className: i, sideOffset: a = 0, children: o, ...s }) {
26
- return /* @__PURE__ */ t(r.Portal, { children: /* @__PURE__ */ n(r.Content, {
27
- "data-slot": "tooltip-content",
28
- sideOffset: a,
29
- className: e("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance", i),
30
- ...s,
31
- children: [o, /* @__PURE__ */ t(r.Arrow, { className: "bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })]
32
- }) });
90
+ r(l, "getAnimationName");
91
+ function u(e) {
92
+ let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
93
+ return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
33
94
  }
95
+ r(u, "getElementRef");
34
96
  //#endregion
35
- export { a as Tooltip, s as TooltipContent, i as TooltipProvider, o as TooltipTrigger };
97
+ export { a as Presence };
package/dist/index31.cjs CHANGED
@@ -1 +1 @@
1
- const e=require("./index2.cjs"),t=require("./index4.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("react/jsx-runtime"),i=require("@radix-ui/react-tooltip");i=e.__toESM(i,1);function a({delayDuration:e=0,...t}){return(0,r.jsx)(i.Provider,{"data-slot":`tooltip-provider`,delayDuration:e,...t})}function o({...e}){return(0,r.jsx)(a,{children:(0,r.jsx)(i.Root,{"data-slot":`tooltip`,...e})})}function s({...e}){return(0,r.jsx)(i.Trigger,{"data-slot":`tooltip-trigger`,...e})}function c({className:e,sideOffset:n=0,children:a,...o}){return(0,r.jsx)(i.Portal,{children:(0,r.jsxs)(i.Content,{"data-slot":`tooltip-content`,sideOffset:n,className:t.cn(`bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance`,e),...o,children:[a,(0,r.jsx)(i.Arrow,{className:`bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]`})]})})}exports.Tooltip=o,exports.TooltipContent=c,exports.TooltipProvider=a,exports.TooltipTrigger=s;
1
+ "use client";const e=require("./index2.cjs"),t=require("./index17.cjs");let n=require("react");n=e.__toESM(n,1);var r=Object.defineProperty,i=(e,t)=>r(e,`name`,{value:t,configurable:!0});function a(e,t){return n.useReducer((e,n)=>t[e][n]??e,e)}i(a,`useStateMachine`);var o=i(e=>{let{present:t,children:r}=e,i=s(t),a=typeof r==`function`?r({present:i.isPresent}):n.Children.only(r),o=l(i.ref,d(a));return typeof r==`function`||i.isPresent?n.cloneElement(a,{ref:o}):null},`Presence`);function s(e){let[r,o]=n.useState(),s=n.useRef(null),c=n.useRef(e),l=n.useRef(`none`),d=n.useRef(void 0),[f,p]=a(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return n.useEffect(()=>{f===`mounted`?(l.current=d.current??u(s.current),d.current=void 0):l.current=`none`},[f]),t.useLayoutEffect2(()=>{let t=s.current,n=c.current;if(n!==e){let r=l.current,i=u(t);e?(d.current=i,p(`MOUNT`)):i===`none`||t?.display===`none`?p(`UNMOUNT`):p(n&&r!==i?`ANIMATION_OUT`:`UNMOUNT`),c.current=e}},[e,p]),t.useLayoutEffect2(()=>{if(r){let e,t=r.ownerDocument.defaultView??window,n=i(n=>{let i=u(s.current).includes(CSS.escape(n.animationName));if(n.target===r&&i&&(p(`ANIMATION_END`),!c.current)){let n=r.style.animationFillMode;r.style.animationFillMode=`forwards`,e=t.setTimeout(()=>{r.style.animationFillMode===`forwards`&&(r.style.animationFillMode=n)})}},`handleAnimationEnd`),a=i(e=>{e.target===r&&(l.current=u(s.current))},`handleAnimationStart`);return r.addEventListener(`animationstart`,a),r.addEventListener(`animationcancel`,n),r.addEventListener(`animationend`,n),()=>{t.clearTimeout(e),r.removeEventListener(`animationstart`,a),r.removeEventListener(`animationcancel`,n),r.removeEventListener(`animationend`,n)}}else p(`ANIMATION_END`)},[r,p]),{isPresent:[`mounted`,`unmountSuspended`].includes(f),ref:n.useCallback(e=>{if(e){let t=getComputedStyle(e);s.current=t,d.current=u(t)}else s.current=null;o(e)},[])}}i(s,`usePresence`);function c(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}i(c,`setRef`);function l(...e){let t=n.useRef(e);return t.current=e,n.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=c(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():c(n[e],null)}}},[])}i(l,`useStableComposedRefs`);function u(e){return e?.animationName||`none`}i(u,`getAnimationName`);function d(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}i(d,`getElementRef`),exports.Presence=o;
package/dist/index31.js CHANGED
@@ -1,43 +1,16 @@
1
- import { cn as e } from "./index3.js";
2
- import { Button as t } from "./index6.js";
3
- import { Dialog as n, DialogContent as r, DialogDescription as i, DialogFooter as a, DialogHeader as o, DialogTitle as s } from "./index10.js";
4
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
5
- //#region src/Modal.tsx
6
- function u({ open: u = !0, title: d, description: f, children: p, footer: m, width: h = 900, confirmText: g = "Xác nhận", cancelText: _ = "Hủy", isLoading: v = !1, onCancel: y, onConfirm: b }) {
7
- return /* @__PURE__ */ c(n, {
8
- open: u,
9
- onOpenChange: (e) => !e && y(),
10
- children: /* @__PURE__ */ l(r, {
11
- className: e("flex max-h-[calc(100vh-150px)] flex-col gap-0 p-0 sm:max-w-175"),
12
- style: { maxWidth: h },
13
- children: [
14
- /* @__PURE__ */ l(o, {
15
- className: "px-6 py-4 border-b",
16
- children: [/* @__PURE__ */ c(s, { children: d }), f ? /* @__PURE__ */ c(i, { children: f }) : null]
17
- }),
18
- /* @__PURE__ */ c("div", {
19
- className: "flex-1 overflow-y-auto px-6 py-4",
20
- children: p
21
- }),
22
- (m || b) && /* @__PURE__ */ c(a, {
23
- className: "px-6 py-4 border-t",
24
- children: m || /* @__PURE__ */ l("div", {
25
- className: "flex w-full justify-end gap-2",
26
- children: [/* @__PURE__ */ c(t, {
27
- variant: "outline",
28
- onClick: y,
29
- disabled: v,
30
- children: _
31
- }), b ? /* @__PURE__ */ c(t, {
32
- onClick: b,
33
- disabled: v,
34
- children: g
35
- }) : null]
36
- })
37
- })
38
- ]
39
- })
40
- });
1
+ import { useLayoutEffect2 as e } from "./index16.js";
2
+ import * as t from "react";
3
+ //#region ../../node_modules/.pnpm/@radix-ui+react-id@1.1.4_@types+react@19.2.17_react@19.2.8/node_modules/@radix-ui/react-id/dist/index.mjs
4
+ var n = Object.defineProperty, r = (e, t) => n(e, "name", {
5
+ value: t,
6
+ configurable: !0
7
+ }), i = t.useId || (() => void 0), a = 0;
8
+ function o(n) {
9
+ let [r, o] = t.useState(i());
10
+ return e(() => {
11
+ n || o((e) => e ?? String(a++));
12
+ }, [n]), n || (r ? `radix-${r}` : "");
41
13
  }
14
+ r(o, "useId");
42
15
  //#endregion
43
- export { u as Modal };
16
+ export { o as useId };
package/dist/index32.cjs CHANGED
@@ -1 +1 @@
1
- const e=require("./index4.cjs"),t=require("./index7.cjs"),n=require("./index11.cjs");let r=require("react/jsx-runtime");function i({open:i=!0,title:a,description:o,children:s,footer:c,width:l=900,confirmText:u=`Xác nhận`,cancelText:d=`Hủy`,isLoading:f=!1,onCancel:p,onConfirm:m}){return(0,r.jsx)(n.Dialog,{open:i,onOpenChange:e=>!e&&p(),children:(0,r.jsxs)(n.DialogContent,{className:e.cn(`flex max-h-[calc(100vh-150px)] flex-col gap-0 p-0 sm:max-w-175`),style:{maxWidth:l},children:[(0,r.jsxs)(n.DialogHeader,{className:`px-6 py-4 border-b`,children:[(0,r.jsx)(n.DialogTitle,{children:a}),o?(0,r.jsx)(n.DialogDescription,{children:o}):null]}),(0,r.jsx)(`div`,{className:`flex-1 overflow-y-auto px-6 py-4`,children:s}),(c||m)&&(0,r.jsx)(n.DialogFooter,{className:`px-6 py-4 border-t`,children:c||(0,r.jsxs)(`div`,{className:`flex w-full justify-end gap-2`,children:[(0,r.jsx)(t.Button,{variant:`outline`,onClick:p,disabled:f,children:d}),m?(0,r.jsx)(t.Button,{onClick:m,disabled:f,children:u}):null]})})]})})}exports.Modal=i;
1
+ const e=require("./index2.cjs"),t=require("./index17.cjs");let n=require("react");n=e.__toESM(n,1);var r=Object.defineProperty,i=(e,t)=>r(e,`name`,{value:t,configurable:!0}),a=n.useId||(()=>void 0),o=0;function s(e){let[r,i]=n.useState(a());return t.useLayoutEffect2(()=>{e||i(e=>e??String(o++))},[e]),e||(r?`radix-${r}`:``)}i(s,`useId`),exports.useId=s;
package/dist/index32.js CHANGED
@@ -1,14 +1,95 @@
1
- import { Suspense as e, lazy as t } from "react";
2
- import { jsx as n } from "react/jsx-runtime";
3
- //#region src/lazyLoad.tsx
4
- function r(r, i = /* @__PURE__ */ n("div", { children: "Loading..." })) {
5
- let a = t(r);
6
- return function(t) {
7
- return /* @__PURE__ */ n(e, {
8
- fallback: i,
9
- children: /* @__PURE__ */ n(a, { ...t })
10
- });
11
- };
1
+ "use client";
2
+ import { createContextScope as e } from "./index6.js";
3
+ import { useComposedRefs as t } from "./index7.js";
4
+ import { composeEventHandlers as n } from "./index8.js";
5
+ import { Primitive as r } from "./index12.js";
6
+ import { useLayoutEffect2 as i } from "./index16.js";
7
+ import { useControllableState as a } from "./index29.js";
8
+ import { Presence as o } from "./index30.js";
9
+ import { useId as s } from "./index31.js";
10
+ import * as c from "react";
11
+ import { jsx as l } from "react/jsx-runtime";
12
+ //#region ../../node_modules/.pnpm/@radix-ui+react-collapsible@1.1.20_@types+react-dom@19.2.3_@types+react@19.2.17__@types_8ccab72b6d36cb21f6789c4ac3698ef5/node_modules/@radix-ui/react-collapsible/dist/index.mjs
13
+ var u = Object.defineProperty, d = (e, t) => u(e, "name", {
14
+ value: t,
15
+ configurable: !0
16
+ }), f = "Collapsible", [p, m] = e(f), [h, g] = p(f), _ = /* @__PURE__ */ c.forwardRef(/* @__PURE__ */ d(function(e, t) {
17
+ let { __scopeCollapsible: n, open: i, defaultOpen: o, disabled: u, onOpenChange: d, ...p } = e, [m, g] = a({
18
+ prop: i,
19
+ defaultProp: o ?? !1,
20
+ onChange: d,
21
+ caller: f
22
+ });
23
+ return /* @__PURE__ */ l(h, {
24
+ scope: n,
25
+ disabled: u,
26
+ contentId: s(),
27
+ open: m,
28
+ onOpenToggle: c.useCallback(() => g((e) => !e), [g]),
29
+ children: /* @__PURE__ */ l(r.div, {
30
+ "data-state": C(m),
31
+ "data-disabled": u ? "" : void 0,
32
+ ...p,
33
+ ref: t
34
+ })
35
+ });
36
+ }, "Collapsible")), v = "CollapsibleTrigger", y = /* @__PURE__ */ c.forwardRef(/* @__PURE__ */ d(function(e, t) {
37
+ let { __scopeCollapsible: i, ...a } = e, o = g(v, i);
38
+ return /* @__PURE__ */ l(r.button, {
39
+ type: "button",
40
+ "aria-controls": o.open ? o.contentId : void 0,
41
+ "aria-expanded": o.open || !1,
42
+ "data-state": C(o.open),
43
+ "data-disabled": o.disabled ? "" : void 0,
44
+ disabled: o.disabled,
45
+ ...a,
46
+ ref: t,
47
+ onClick: n(e.onClick, o.onOpenToggle)
48
+ });
49
+ }, "CollapsibleTrigger")), b = "CollapsibleContent", x = /* @__PURE__ */ c.forwardRef(/* @__PURE__ */ d(function(e, t) {
50
+ let { forceMount: n, ...r } = e, i = g(b, e.__scopeCollapsible);
51
+ return /* @__PURE__ */ l(o, {
52
+ present: n || i.open,
53
+ children: ({ present: e }) => /* @__PURE__ */ l(S, {
54
+ ...r,
55
+ ref: t,
56
+ present: e
57
+ })
58
+ });
59
+ }, "CollapsibleContent")), S = /* @__PURE__ */ c.forwardRef(/* @__PURE__ */ d(function(e, n) {
60
+ let { __scopeCollapsible: a, present: o, children: s, ...u } = e, d = g(b, a), [f, p] = c.useState(o), m = c.useRef(null), h = t(n, m), _ = c.useRef(0), v = _.current, y = c.useRef(0), x = y.current, S = d.open || f, w = c.useRef(S), T = c.useRef(void 0);
61
+ return c.useEffect(() => {
62
+ let e = requestAnimationFrame(() => w.current = !1);
63
+ return () => cancelAnimationFrame(e);
64
+ }, []), i(() => {
65
+ let e = m.current;
66
+ if (e) {
67
+ T.current = T.current || {
68
+ transitionDuration: e.style.transitionDuration,
69
+ animationName: e.style.animationName
70
+ }, e.style.transitionDuration = "0s", e.style.animationName = "none";
71
+ let t = e.getBoundingClientRect();
72
+ _.current = t.height, y.current = t.width, w.current || (e.style.transitionDuration = T.current.transitionDuration, e.style.animationName = T.current.animationName), p(o);
73
+ }
74
+ }, [d.open, o]), /* @__PURE__ */ l(r.div, {
75
+ "data-state": C(d.open),
76
+ "data-disabled": d.disabled ? "" : void 0,
77
+ id: d.contentId,
78
+ hidden: !S,
79
+ ...u,
80
+ ref: h,
81
+ style: {
82
+ "--radix-collapsible-content-height": v ? `${v}px` : void 0,
83
+ "--radix-collapsible-content-width": x ? `${x}px` : void 0,
84
+ ...e.style
85
+ },
86
+ children: S && s
87
+ });
88
+ }, "CollapsibleContentImpl"));
89
+ function C(e) {
90
+ return e ? "open" : "closed";
12
91
  }
92
+ d(C, "getState");
93
+ var w = _;
13
94
  //#endregion
14
- export { r as lazyLoad };
95
+ export { x as CollapsibleContent, y as CollapsibleTrigger, w as Root };
package/dist/index33.cjs CHANGED
@@ -1 +1 @@
1
- let e=require("react"),t=require("react/jsx-runtime");function n(n,r=(0,t.jsx)(`div`,{children:`Loading...`})){let i=(0,e.lazy)(n);return function(n){return(0,t.jsx)(e.Suspense,{fallback:r,children:(0,t.jsx)(i,{...n})})}}exports.lazyLoad=n;
1
+ "use client";const e=require("./index2.cjs"),t=require("./index7.cjs"),n=require("./index8.cjs"),r=require("./index9.cjs"),i=require("./index13.cjs"),a=require("./index17.cjs"),o=require("./index30.cjs"),s=require("./index31.cjs"),c=require("./index32.cjs");let l=require("react");l=e.__toESM(l,1);let u=require("react/jsx-runtime");var d=Object.defineProperty,f=(e,t)=>d(e,`name`,{value:t,configurable:!0}),p=`Collapsible`,[m,h]=t.createContextScope(p),[g,_]=m(p),v=l.forwardRef(f(function(e,t){let{__scopeCollapsible:n,open:r,defaultOpen:a,disabled:s,onOpenChange:d,...f}=e,[m,h]=o.useControllableState({prop:r,defaultProp:a??!1,onChange:d,caller:p});return(0,u.jsx)(g,{scope:n,disabled:s,contentId:c.useId(),open:m,onOpenToggle:l.useCallback(()=>h(e=>!e),[h]),children:(0,u.jsx)(i.Primitive.div,{"data-state":w(m),"data-disabled":s?``:void 0,...f,ref:t})})},`Collapsible`)),y=`CollapsibleTrigger`,b=l.forwardRef(f(function(e,t){let{__scopeCollapsible:n,...a}=e,o=_(y,n);return(0,u.jsx)(i.Primitive.button,{type:`button`,"aria-controls":o.open?o.contentId:void 0,"aria-expanded":o.open||!1,"data-state":w(o.open),"data-disabled":o.disabled?``:void 0,disabled:o.disabled,...a,ref:t,onClick:r.composeEventHandlers(e.onClick,o.onOpenToggle)})},`CollapsibleTrigger`)),x=`CollapsibleContent`,S=l.forwardRef(f(function(e,t){let{forceMount:n,...r}=e,i=_(x,e.__scopeCollapsible);return(0,u.jsx)(s.Presence,{present:n||i.open,children:({present:e})=>(0,u.jsx)(C,{...r,ref:t,present:e})})},`CollapsibleContent`)),C=l.forwardRef(f(function(e,t){let{__scopeCollapsible:r,present:o,children:s,...c}=e,d=_(x,r),[f,p]=l.useState(o),m=l.useRef(null),h=n.useComposedRefs(t,m),g=l.useRef(0),v=g.current,y=l.useRef(0),b=y.current,S=d.open||f,C=l.useRef(S),T=l.useRef(void 0);return l.useEffect(()=>{let e=requestAnimationFrame(()=>C.current=!1);return()=>cancelAnimationFrame(e)},[]),a.useLayoutEffect2(()=>{let e=m.current;if(e){T.current=T.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();g.current=t.height,y.current=t.width,C.current||(e.style.transitionDuration=T.current.transitionDuration,e.style.animationName=T.current.animationName),p(o)}},[d.open,o]),(0,u.jsx)(i.Primitive.div,{"data-state":w(d.open),"data-disabled":d.disabled?``:void 0,id:d.contentId,hidden:!S,...c,ref:h,style:{"--radix-collapsible-content-height":v?`${v}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style},children:S&&s})},`CollapsibleContentImpl`));function w(e){return e?`open`:`closed`}f(w,`getState`);var T=v;exports.CollapsibleContent=S,exports.CollapsibleTrigger=b,exports.Root=T;
package/dist/index33.js CHANGED
@@ -1,64 +1,24 @@
1
- import { Button as e } from "./index6.js";
2
- import { DropdownMenu as t, DropdownMenuContent as n, DropdownMenuItem as r, DropdownMenuTrigger as i } from "./index12.js";
3
- import { jsx as a, jsxs as o } from "react/jsx-runtime";
4
- import { map as s } from "lodash-es";
5
- //#region src/DataTable/components/DataTablePagination.tsx
6
- var c = ({ table: c, tableState: l, pageSizeOptions: u, apiConfig: d }) => {
7
- let f = l.pagination.pageIndex, p = l.pagination.pageSize, m = d.mode === "server" ? d.totalRows : c.getFilteredRowModel().rows.length, h = p > 0 ? Math.ceil(m / p) : 0;
8
- return /* @__PURE__ */ o("div", {
9
- className: "flex items-center justify-between gap-4 py-4",
10
- children: [/* @__PURE__ */ o("div", {
11
- className: "text-muted-foreground flex-1 text-sm",
12
- children: [
13
- c.getFilteredSelectedRowModel().rows.length,
14
- " of ",
15
- m,
16
- " row(s) selected."
17
- ]
18
- }), /* @__PURE__ */ o("div", {
19
- className: "flex items-center gap-2",
20
- children: [
21
- /* @__PURE__ */ o(t, { children: [/* @__PURE__ */ a(i, {
22
- asChild: !0,
23
- children: /* @__PURE__ */ o(e, {
24
- variant: "outline",
25
- size: "sm",
26
- children: ["Rows: ", p]
27
- })
28
- }), /* @__PURE__ */ a(n, {
29
- align: "end",
30
- children: s(u, (e) => /* @__PURE__ */ a(r, {
31
- onClick: () => c.setPageSize(e),
32
- disabled: e === p,
33
- children: e
34
- }, String(e)))
35
- })] }),
36
- /* @__PURE__ */ a(e, {
37
- variant: "outline",
38
- size: "sm",
39
- onClick: () => c.previousPage(),
40
- disabled: !c.getCanPreviousPage(),
41
- children: "Previous"
42
- }),
43
- /* @__PURE__ */ a(e, {
44
- variant: "outline",
45
- size: "sm",
46
- onClick: () => c.nextPage(),
47
- disabled: !c.getCanNextPage(),
48
- children: "Next"
49
- }),
50
- /* @__PURE__ */ o("div", {
51
- className: "text-muted-foreground px-2 text-sm",
52
- children: [
53
- "Page ",
54
- f + 1,
55
- " / ",
56
- h === 0 ? 1 : h
57
- ]
58
- })
59
- ]
60
- })]
1
+ "use client";
2
+ import { CollapsibleContent as e, CollapsibleTrigger as t, Root as n } from "./index32.js";
3
+ import { jsx as r } from "react/jsx-runtime";
4
+ //#region src/ui/collapsible.tsx
5
+ function i({ ...e }) {
6
+ return /* @__PURE__ */ r(n, {
7
+ "data-slot": "collapsible",
8
+ ...e
61
9
  });
62
- };
10
+ }
11
+ function a({ ...e }) {
12
+ return /* @__PURE__ */ r(t, {
13
+ "data-slot": "collapsible-trigger",
14
+ ...e
15
+ });
16
+ }
17
+ function o({ ...t }) {
18
+ return /* @__PURE__ */ r(e, {
19
+ "data-slot": "collapsible-content",
20
+ ...t
21
+ });
22
+ }
63
23
  //#endregion
64
- export { c as DataTablePagination };
24
+ export { i as Collapsible, o as CollapsibleContent, a as CollapsibleTrigger };
package/dist/index34.cjs CHANGED
@@ -1 +1 @@
1
- const e=require("./index7.cjs"),t=require("./index13.cjs");let n=require("react/jsx-runtime"),r=require("lodash-es");var i=({table:i,tableState:a,pageSizeOptions:o,apiConfig:s})=>{let c=a.pagination.pageIndex,l=a.pagination.pageSize,u=s.mode===`server`?s.totalRows:i.getFilteredRowModel().rows.length,d=l>0?Math.ceil(u/l):0;return(0,n.jsxs)(`div`,{className:`flex items-center justify-between gap-4 py-4`,children:[(0,n.jsxs)(`div`,{className:`text-muted-foreground flex-1 text-sm`,children:[i.getFilteredSelectedRowModel().rows.length,` of `,u,` row(s) selected.`]}),(0,n.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,n.jsxs)(t.DropdownMenu,{children:[(0,n.jsx)(t.DropdownMenuTrigger,{asChild:!0,children:(0,n.jsxs)(e.Button,{variant:`outline`,size:`sm`,children:[`Rows: `,l]})}),(0,n.jsx)(t.DropdownMenuContent,{align:`end`,children:(0,r.map)(o,e=>(0,n.jsx)(t.DropdownMenuItem,{onClick:()=>i.setPageSize(e),disabled:e===l,children:e},String(e)))})]}),(0,n.jsx)(e.Button,{variant:`outline`,size:`sm`,onClick:()=>i.previousPage(),disabled:!i.getCanPreviousPage(),children:`Previous`}),(0,n.jsx)(e.Button,{variant:`outline`,size:`sm`,onClick:()=>i.nextPage(),disabled:!i.getCanNextPage(),children:`Next`}),(0,n.jsxs)(`div`,{className:`text-muted-foreground px-2 text-sm`,children:[`Page `,c+1,` / `,d===0?1:d]})]})]})};exports.DataTablePagination=i;
1
+ "use client";const e=require("./index33.cjs");let t=require("react/jsx-runtime");function n({...n}){return(0,t.jsx)(e.Root,{"data-slot":`collapsible`,...n})}function r({...n}){return(0,t.jsx)(e.CollapsibleTrigger,{"data-slot":`collapsible-trigger`,...n})}function i({...n}){return(0,t.jsx)(e.CollapsibleContent,{"data-slot":`collapsible-content`,...n})}exports.Collapsible=n,exports.CollapsibleContent=i,exports.CollapsibleTrigger=r;
package/dist/index34.js CHANGED
@@ -1,23 +1,85 @@
1
- import { Table as e, TableBody as t, TableCell as n, TableHead as r, TableHeader as i, TableRow as a } from "./index28.js";
2
- import { Fragment as o } from "react";
3
- import { jsx as s, jsxs as c } from "react/jsx-runtime";
4
- import { isEmpty as l, map as u } from "lodash-es";
5
- import { flexRender as d } from "@tanstack/react-table";
6
- //#region src/DataTable/components/DataTableTable.tsx
7
- var f = ({ table: f, columnVisibility: p, expandedState: m, expandConfig: h, empty: g, columnsCount: _ }) => {
8
- let v = f.getRowModel().rows;
9
- return /* @__PURE__ */ c(e, { children: [/* @__PURE__ */ s(i, { children: u(f.getHeaderGroups(), (e) => /* @__PURE__ */ s(a, { children: u(e.headers, (e) => e.isPlaceholder || p[e.column.id] === !1 || e.column.columnDef.header === void 0 ? null : /* @__PURE__ */ s(r, { children: d(e.column.columnDef.header, e.getContext()) }, e.id)) }, e.id)) }), /* @__PURE__ */ s(t, { children: l(v) ? /* @__PURE__ */ s(a, { children: /* @__PURE__ */ s(n, {
10
- colSpan: _,
11
- className: "h-24 text-center",
12
- children: g.render()
13
- }) }) : u(v, (e) => /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s(a, {
14
- "data-state": e.getIsSelected() ? "selected" : void 0,
15
- children: u(e.getVisibleCells(), (e) => /* @__PURE__ */ s(n, { children: d(e.column.columnDef.cell, e.getContext()) }, e.id))
16
- }), h.enabled && e.getIsExpanded() ? /* @__PURE__ */ s(a, { children: /* @__PURE__ */ s(n, {
17
- colSpan: _,
18
- className: "p-0",
19
- children: h.renderSubComponent(e)
20
- }) }) : null] }, e.id)) })] });
21
- };
1
+ import { cn as e } from "./index3.js";
2
+ import { XIcon as t } from "lucide-react";
3
+ import "react";
4
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
5
+ import * as i from "@radix-ui/react-dialog";
6
+ //#region src/ui/dialog.tsx
7
+ function a({ ...e }) {
8
+ return /* @__PURE__ */ n(i.Root, {
9
+ "data-slot": "dialog",
10
+ ...e
11
+ });
12
+ }
13
+ function o({ ...e }) {
14
+ return /* @__PURE__ */ n(i.Trigger, {
15
+ "data-slot": "dialog-trigger",
16
+ ...e
17
+ });
18
+ }
19
+ function s({ ...e }) {
20
+ return /* @__PURE__ */ n(i.Portal, {
21
+ "data-slot": "dialog-portal",
22
+ ...e
23
+ });
24
+ }
25
+ function c({ ...e }) {
26
+ return /* @__PURE__ */ n(i.Close, {
27
+ "data-slot": "dialog-close",
28
+ ...e
29
+ });
30
+ }
31
+ function l({ className: t, ...r }) {
32
+ return /* @__PURE__ */ n(i.Overlay, {
33
+ "data-slot": "dialog-overlay",
34
+ className: e("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50", t),
35
+ ...r
36
+ });
37
+ }
38
+ function u({ className: a, children: o, showCloseButton: c = !0, ...u }) {
39
+ return /* @__PURE__ */ r(s, {
40
+ "data-slot": "dialog-portal",
41
+ children: [/* @__PURE__ */ n(l, {}), /* @__PURE__ */ r(i.Content, {
42
+ "data-slot": "dialog-content",
43
+ className: e("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 outline-none sm:max-w-lg", a),
44
+ ...u,
45
+ children: [o, c && /* @__PURE__ */ r(i.Close, {
46
+ "data-slot": "dialog-close",
47
+ className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
48
+ children: [/* @__PURE__ */ n(t, {}), /* @__PURE__ */ n("span", {
49
+ className: "sr-only",
50
+ children: "Close"
51
+ })]
52
+ })]
53
+ })]
54
+ });
55
+ }
56
+ function d({ className: t, ...r }) {
57
+ return /* @__PURE__ */ n("div", {
58
+ "data-slot": "dialog-header",
59
+ className: e("flex flex-col gap-2 text-center sm:text-left", t),
60
+ ...r
61
+ });
62
+ }
63
+ function f({ className: t, ...r }) {
64
+ return /* @__PURE__ */ n("div", {
65
+ "data-slot": "dialog-footer",
66
+ className: e("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", t),
67
+ ...r
68
+ });
69
+ }
70
+ function p({ className: t, ...r }) {
71
+ return /* @__PURE__ */ n(i.Title, {
72
+ "data-slot": "dialog-title",
73
+ className: e("text-lg leading-none font-semibold", t),
74
+ ...r
75
+ });
76
+ }
77
+ function m({ className: t, ...r }) {
78
+ return /* @__PURE__ */ n(i.Description, {
79
+ "data-slot": "dialog-description",
80
+ className: e("text-muted-foreground text-sm", t),
81
+ ...r
82
+ });
83
+ }
22
84
  //#endregion
23
- export { f as DataTableTable };
85
+ export { a as Dialog, c as DialogClose, u as DialogContent, m as DialogDescription, f as DialogFooter, d as DialogHeader, l as DialogOverlay, s as DialogPortal, p as DialogTitle, o as DialogTrigger };
package/dist/index35.cjs CHANGED
@@ -1 +1 @@
1
- const e=require("./index29.cjs");let t=require("react"),n=require("react/jsx-runtime"),r=require("lodash-es"),i=require("@tanstack/react-table");var a=({table:a,columnVisibility:o,expandedState:s,expandConfig:c,empty:l,columnsCount:u})=>{let d=a.getRowModel().rows;return(0,n.jsxs)(e.Table,{children:[(0,n.jsx)(e.TableHeader,{children:(0,r.map)(a.getHeaderGroups(),t=>(0,n.jsx)(e.TableRow,{children:(0,r.map)(t.headers,t=>t.isPlaceholder||o[t.column.id]===!1||t.column.columnDef.header===void 0?null:(0,n.jsx)(e.TableHead,{children:(0,i.flexRender)(t.column.columnDef.header,t.getContext())},t.id))},t.id))}),(0,n.jsx)(e.TableBody,{children:(0,r.isEmpty)(d)?(0,n.jsx)(e.TableRow,{children:(0,n.jsx)(e.TableCell,{colSpan:u,className:`h-24 text-center`,children:l.render()})}):(0,r.map)(d,a=>(0,n.jsxs)(t.Fragment,{children:[(0,n.jsx)(e.TableRow,{"data-state":a.getIsSelected()?`selected`:void 0,children:(0,r.map)(a.getVisibleCells(),t=>(0,n.jsx)(e.TableCell,{children:(0,i.flexRender)(t.column.columnDef.cell,t.getContext())},t.id))}),c.enabled&&a.getIsExpanded()?(0,n.jsx)(e.TableRow,{children:(0,n.jsx)(e.TableCell,{colSpan:u,className:`p-0`,children:c.renderSubComponent(a)})}):null]},a.id))})]})};exports.DataTableTable=a;
1
+ const e=require("./index2.cjs"),t=require("./index4.cjs");let n=require("lucide-react"),r=require("react");r=e.__toESM(r,1);let i=require("react/jsx-runtime"),a=require("@radix-ui/react-dialog");a=e.__toESM(a,1);function o({...e}){return(0,i.jsx)(a.Root,{"data-slot":`dialog`,...e})}function s({...e}){return(0,i.jsx)(a.Trigger,{"data-slot":`dialog-trigger`,...e})}function c({...e}){return(0,i.jsx)(a.Portal,{"data-slot":`dialog-portal`,...e})}function l({...e}){return(0,i.jsx)(a.Close,{"data-slot":`dialog-close`,...e})}function u({className:e,...n}){return(0,i.jsx)(a.Overlay,{"data-slot":`dialog-overlay`,className:t.cn(`data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50`,e),...n})}function d({className:e,children:r,showCloseButton:o=!0,...s}){return(0,i.jsxs)(c,{"data-slot":`dialog-portal`,children:[(0,i.jsx)(u,{}),(0,i.jsxs)(a.Content,{"data-slot":`dialog-content`,className:t.cn(`bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 outline-none sm:max-w-lg`,e),...s,children:[r,o&&(0,i.jsxs)(a.Close,{"data-slot":`dialog-close`,className:`ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,children:[(0,i.jsx)(n.XIcon,{}),(0,i.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function f({className:e,...n}){return(0,i.jsx)(`div`,{"data-slot":`dialog-header`,className:t.cn(`flex flex-col gap-2 text-center sm:text-left`,e),...n})}function p({className:e,...n}){return(0,i.jsx)(`div`,{"data-slot":`dialog-footer`,className:t.cn(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...n})}function m({className:e,...n}){return(0,i.jsx)(a.Title,{"data-slot":`dialog-title`,className:t.cn(`text-lg leading-none font-semibold`,e),...n})}function h({className:e,...n}){return(0,i.jsx)(a.Description,{"data-slot":`dialog-description`,className:t.cn(`text-muted-foreground text-sm`,e),...n})}exports.Dialog=o,exports.DialogClose=l,exports.DialogContent=d,exports.DialogDescription=h,exports.DialogFooter=p,exports.DialogHeader=f,exports.DialogOverlay=u,exports.DialogPortal=c,exports.DialogTitle=m,exports.DialogTrigger=s;