@codefast/ui 0.0.7 → 0.0.9

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 (385) hide show
  1. package/dist/accordion.d.mts +5 -1
  2. package/dist/accordion.d.ts +5 -1
  3. package/dist/accordion.js.map +1 -1
  4. package/dist/accordion.mjs.map +1 -1
  5. package/dist/alert-dialog.d.mts +12 -3
  6. package/dist/alert-dialog.d.ts +12 -3
  7. package/dist/alert-dialog.js +3 -3
  8. package/dist/alert-dialog.js.map +1 -1
  9. package/dist/alert-dialog.mjs +1 -1
  10. package/dist/alert-dialog.mjs.map +1 -1
  11. package/dist/alert.d.mts +10 -5
  12. package/dist/alert.d.ts +10 -5
  13. package/dist/alert.js +22 -18
  14. package/dist/alert.js.map +1 -1
  15. package/dist/alert.mjs +22 -18
  16. package/dist/alert.mjs.map +1 -1
  17. package/dist/aspect-ratio.d.mts +2 -1
  18. package/dist/aspect-ratio.d.ts +2 -1
  19. package/dist/aspect-ratio.js.map +1 -1
  20. package/dist/aspect-ratio.mjs.map +1 -1
  21. package/dist/avatar.d.mts +4 -1
  22. package/dist/avatar.d.ts +4 -1
  23. package/dist/avatar.js.map +1 -1
  24. package/dist/avatar.mjs.map +1 -1
  25. package/dist/badge.d.mts +5 -2
  26. package/dist/badge.d.ts +5 -2
  27. package/dist/badge.js +4 -4
  28. package/dist/badge.js.map +1 -1
  29. package/dist/badge.mjs +4 -4
  30. package/dist/badge.mjs.map +1 -1
  31. package/dist/blockquote.d.mts +8 -0
  32. package/dist/blockquote.d.ts +8 -0
  33. package/dist/blockquote.js +15 -0
  34. package/dist/blockquote.js.map +1 -0
  35. package/dist/blockquote.mjs +15 -0
  36. package/dist/blockquote.mjs.map +1 -0
  37. package/dist/box.d.mts +14 -0
  38. package/dist/box.d.ts +14 -0
  39. package/dist/box.js +15 -0
  40. package/dist/box.js.map +1 -0
  41. package/dist/box.mjs +15 -0
  42. package/dist/box.mjs.map +1 -0
  43. package/dist/breadcrumb.d.mts +18 -11
  44. package/dist/breadcrumb.d.ts +18 -11
  45. package/dist/breadcrumb.js +49 -39
  46. package/dist/breadcrumb.js.map +1 -1
  47. package/dist/breadcrumb.mjs +49 -39
  48. package/dist/breadcrumb.mjs.map +1 -1
  49. package/dist/button.d.mts +4 -3
  50. package/dist/button.d.ts +4 -3
  51. package/dist/button.js +2 -2
  52. package/dist/button.mjs +1 -1
  53. package/dist/calendar.d.mts +3 -2
  54. package/dist/calendar.d.ts +3 -2
  55. package/dist/calendar.js +3 -3
  56. package/dist/calendar.js.map +1 -1
  57. package/dist/calendar.mjs +1 -1
  58. package/dist/calendar.mjs.map +1 -1
  59. package/dist/card.d.mts +13 -7
  60. package/dist/card.d.ts +13 -7
  61. package/dist/card.js +47 -37
  62. package/dist/card.js.map +1 -1
  63. package/dist/card.mjs +47 -37
  64. package/dist/card.mjs.map +1 -1
  65. package/dist/carousel.d.mts +13 -8
  66. package/dist/carousel.d.ts +13 -8
  67. package/dist/carousel.js +63 -57
  68. package/dist/carousel.js.map +1 -1
  69. package/dist/carousel.mjs +62 -56
  70. package/dist/carousel.mjs.map +1 -1
  71. package/dist/checkbox.d.mts +2 -1
  72. package/dist/checkbox.d.ts +2 -1
  73. package/dist/checkbox.js.map +1 -1
  74. package/dist/checkbox.mjs.map +1 -1
  75. package/dist/{chunk-OCLLX7EY.js → chunk-3BDLWZ3W.js} +1 -1
  76. package/dist/chunk-3BDLWZ3W.js.map +1 -0
  77. package/dist/{chunk-2D7SRYKN.js → chunk-43YGVOCO.js} +1 -1
  78. package/dist/chunk-43YGVOCO.js.map +1 -0
  79. package/dist/{chunk-EIHWTXQ4.mjs → chunk-AJLEALVP.mjs} +1 -1
  80. package/dist/chunk-AJLEALVP.mjs.map +1 -0
  81. package/dist/{chunk-LDYBRDAY.js → chunk-D6NQEMTJ.js} +1 -1
  82. package/dist/chunk-D6NQEMTJ.js.map +1 -0
  83. package/dist/{chunk-KW5FJ62U.mjs → chunk-FATZHRHR.mjs} +1 -1
  84. package/dist/chunk-FATZHRHR.mjs.map +1 -0
  85. package/dist/{chunk-RTKEO347.js → chunk-GRKABVK4.js} +1 -1
  86. package/dist/chunk-GRKABVK4.js.map +1 -0
  87. package/dist/{chunk-U2WDUCW3.js → chunk-JOJW7BBY.js} +1 -1
  88. package/dist/{chunk-U2WDUCW3.js.map → chunk-JOJW7BBY.js.map} +1 -1
  89. package/dist/{chunk-ESWGFN3R.mjs → chunk-KV4VL2ZF.mjs} +1 -1
  90. package/dist/chunk-KV4VL2ZF.mjs.map +1 -0
  91. package/dist/{chunk-T52N6ZBP.mjs → chunk-MJDKD2K4.mjs} +1 -1
  92. package/dist/{chunk-T52N6ZBP.mjs.map → chunk-MJDKD2K4.mjs.map} +1 -1
  93. package/dist/{chunk-EDVCMWDT.mjs → chunk-NCEN3XBK.mjs} +1 -1
  94. package/dist/chunk-NCEN3XBK.mjs.map +1 -0
  95. package/dist/{chunk-PTD4AMHI.mjs → chunk-PIU627A3.mjs} +1 -1
  96. package/dist/chunk-PIU627A3.mjs.map +1 -0
  97. package/dist/{chunk-5GHZ6EXI.js → chunk-PKB2G726.js} +1 -1
  98. package/dist/{chunk-5GHZ6EXI.js.map → chunk-PKB2G726.js.map} +1 -1
  99. package/dist/code.d.mts +8 -0
  100. package/dist/code.d.ts +8 -0
  101. package/dist/code.js +15 -0
  102. package/dist/code.js.map +1 -0
  103. package/dist/code.mjs +15 -0
  104. package/dist/code.mjs.map +1 -0
  105. package/dist/collapsible.d.mts +4 -1
  106. package/dist/collapsible.d.ts +4 -1
  107. package/dist/collapsible.js.map +1 -1
  108. package/dist/collapsible.mjs.map +1 -1
  109. package/dist/command.d.mts +29 -18
  110. package/dist/command.d.ts +29 -18
  111. package/dist/command.js +6 -3
  112. package/dist/command.js.map +1 -1
  113. package/dist/command.mjs +5 -2
  114. package/dist/command.mjs.map +1 -1
  115. package/dist/container.d.mts +8 -0
  116. package/dist/container.d.ts +8 -0
  117. package/dist/container.js +19 -0
  118. package/dist/container.js.map +1 -0
  119. package/dist/container.mjs +19 -0
  120. package/dist/container.mjs.map +1 -0
  121. package/dist/context-menu.d.mts +26 -11
  122. package/dist/context-menu.d.ts +26 -11
  123. package/dist/context-menu.js.map +1 -1
  124. package/dist/context-menu.mjs.map +1 -1
  125. package/dist/data-table.d.mts +10 -7
  126. package/dist/data-table.d.ts +10 -7
  127. package/dist/data-table.js +25 -25
  128. package/dist/data-table.js.map +1 -1
  129. package/dist/data-table.mjs +3 -3
  130. package/dist/data-table.mjs.map +1 -1
  131. package/dist/dialog.d.mts +11 -3
  132. package/dist/dialog.d.ts +11 -3
  133. package/dist/dialog.js +2 -2
  134. package/dist/dialog.mjs +1 -1
  135. package/dist/drawer.d.mts +12 -4
  136. package/dist/drawer.d.ts +12 -4
  137. package/dist/drawer.js.map +1 -1
  138. package/dist/drawer.mjs.map +1 -1
  139. package/dist/dropdown-menu.d.mts +25 -11
  140. package/dist/dropdown-menu.d.ts +25 -11
  141. package/dist/dropdown-menu.js +2 -2
  142. package/dist/dropdown-menu.mjs +1 -1
  143. package/dist/em.d.mts +8 -0
  144. package/dist/em.d.ts +8 -0
  145. package/dist/em.js +15 -0
  146. package/dist/em.js.map +1 -0
  147. package/dist/em.mjs +15 -0
  148. package/dist/em.mjs.map +1 -0
  149. package/dist/form.d.mts +14 -6
  150. package/dist/form.d.ts +14 -6
  151. package/dist/form.js +26 -22
  152. package/dist/form.js.map +1 -1
  153. package/dist/form.mjs +25 -21
  154. package/dist/form.mjs.map +1 -1
  155. package/dist/heading.d.mts +9 -0
  156. package/dist/heading.d.ts +9 -0
  157. package/dist/heading.js +15 -0
  158. package/dist/heading.js.map +1 -0
  159. package/dist/heading.mjs +15 -0
  160. package/dist/heading.mjs.map +1 -0
  161. package/dist/hover-card.d.mts +4 -1
  162. package/dist/hover-card.d.ts +4 -1
  163. package/dist/hover-card.js.map +1 -1
  164. package/dist/hover-card.mjs.map +1 -1
  165. package/dist/input-otp.d.mts +12 -32
  166. package/dist/input-otp.d.ts +12 -32
  167. package/dist/input-otp.js +30 -22
  168. package/dist/input-otp.js.map +1 -1
  169. package/dist/input-otp.mjs +29 -21
  170. package/dist/input-otp.mjs.map +1 -1
  171. package/dist/input.d.mts +6 -3
  172. package/dist/input.d.ts +6 -3
  173. package/dist/input.js +13 -11
  174. package/dist/input.js.map +1 -1
  175. package/dist/input.mjs +13 -11
  176. package/dist/input.mjs.map +1 -1
  177. package/dist/kbd.d.mts +8 -0
  178. package/dist/kbd.d.ts +8 -0
  179. package/dist/kbd.js +29 -0
  180. package/dist/kbd.js.map +1 -0
  181. package/dist/kbd.mjs +29 -0
  182. package/dist/kbd.mjs.map +1 -0
  183. package/dist/label.d.mts +2 -1
  184. package/dist/label.d.ts +2 -1
  185. package/dist/label.js +2 -2
  186. package/dist/label.mjs +1 -1
  187. package/dist/menubar.d.mts +27 -12
  188. package/dist/menubar.d.ts +27 -12
  189. package/dist/menubar.js.map +1 -1
  190. package/dist/menubar.mjs.map +1 -1
  191. package/dist/navigation-menu.d.mts +9 -1
  192. package/dist/navigation-menu.d.ts +9 -1
  193. package/dist/navigation-menu.js.map +1 -1
  194. package/dist/navigation-menu.mjs.map +1 -1
  195. package/dist/pagination.d.mts +13 -7
  196. package/dist/pagination.d.ts +13 -7
  197. package/dist/pagination.js +5 -3
  198. package/dist/pagination.js.map +1 -1
  199. package/dist/pagination.mjs +4 -2
  200. package/dist/pagination.mjs.map +1 -1
  201. package/dist/popover.d.mts +6 -1
  202. package/dist/popover.d.ts +6 -1
  203. package/dist/popover.js.map +1 -1
  204. package/dist/popover.mjs.map +1 -1
  205. package/dist/pre.d.mts +8 -0
  206. package/dist/pre.d.ts +8 -0
  207. package/dist/pre.js +15 -0
  208. package/dist/pre.js.map +1 -0
  209. package/dist/pre.mjs +15 -0
  210. package/dist/pre.mjs.map +1 -0
  211. package/dist/progress.d.mts +2 -1
  212. package/dist/progress.d.ts +2 -1
  213. package/dist/progress.js +1 -1
  214. package/dist/progress.js.map +1 -1
  215. package/dist/progress.mjs +1 -1
  216. package/dist/progress.mjs.map +1 -1
  217. package/dist/quote.d.mts +8 -0
  218. package/dist/quote.d.ts +8 -0
  219. package/dist/quote.js +15 -0
  220. package/dist/quote.js.map +1 -0
  221. package/dist/quote.mjs +15 -0
  222. package/dist/quote.mjs.map +1 -0
  223. package/dist/radio-group.d.mts +3 -1
  224. package/dist/radio-group.d.ts +3 -1
  225. package/dist/radio-group.js.map +1 -1
  226. package/dist/radio-group.mjs.map +1 -1
  227. package/dist/resizable.d.mts +4 -4
  228. package/dist/resizable.d.ts +4 -4
  229. package/dist/resizable.js +1 -1
  230. package/dist/resizable.js.map +1 -1
  231. package/dist/resizable.mjs +1 -1
  232. package/dist/resizable.mjs.map +1 -1
  233. package/dist/scroll-area.d.mts +4 -2
  234. package/dist/scroll-area.d.ts +4 -2
  235. package/dist/scroll-area.js +6 -6
  236. package/dist/scroll-area.js.map +1 -1
  237. package/dist/scroll-area.mjs +6 -6
  238. package/dist/scroll-area.mjs.map +1 -1
  239. package/dist/section.d.mts +8 -0
  240. package/dist/section.d.ts +8 -0
  241. package/dist/section.js +15 -0
  242. package/dist/section.js.map +1 -0
  243. package/dist/section.mjs +15 -0
  244. package/dist/section.mjs.map +1 -0
  245. package/dist/select.d.mts +11 -1
  246. package/dist/select.d.ts +11 -1
  247. package/dist/select.js +2 -2
  248. package/dist/select.mjs +1 -1
  249. package/dist/separator.d.mts +2 -1
  250. package/dist/separator.d.ts +2 -1
  251. package/dist/separator.js.map +1 -1
  252. package/dist/separator.mjs.map +1 -1
  253. package/dist/sheet.d.mts +18 -8
  254. package/dist/sheet.d.ts +18 -8
  255. package/dist/sheet.js.map +1 -1
  256. package/dist/sheet.mjs.map +1 -1
  257. package/dist/skeleton.d.mts +3 -2
  258. package/dist/skeleton.d.ts +3 -2
  259. package/dist/skeleton.js +1 -4
  260. package/dist/skeleton.js.map +1 -1
  261. package/dist/skeleton.mjs +1 -4
  262. package/dist/skeleton.mjs.map +1 -1
  263. package/dist/slider.d.mts +2 -1
  264. package/dist/slider.d.ts +2 -1
  265. package/dist/slider.js.map +1 -1
  266. package/dist/slider.mjs.map +1 -1
  267. package/dist/sonner.d.mts +1 -1
  268. package/dist/sonner.d.ts +1 -1
  269. package/dist/sonner.js.map +1 -1
  270. package/dist/sonner.mjs.map +1 -1
  271. package/dist/strong.d.mts +8 -0
  272. package/dist/strong.d.ts +8 -0
  273. package/dist/strong.js +15 -0
  274. package/dist/strong.js.map +1 -0
  275. package/dist/strong.mjs +15 -0
  276. package/dist/strong.mjs.map +1 -0
  277. package/dist/styles.css +1 -1
  278. package/dist/styles.css.map +1 -1
  279. package/dist/switch.d.mts +2 -1
  280. package/dist/switch.d.ts +2 -1
  281. package/dist/switch.js.map +1 -1
  282. package/dist/switch.mjs.map +1 -1
  283. package/dist/table.d.mts +17 -9
  284. package/dist/table.d.ts +17 -9
  285. package/dist/table.js +75 -58
  286. package/dist/table.js.map +1 -1
  287. package/dist/table.mjs +75 -58
  288. package/dist/table.mjs.map +1 -1
  289. package/dist/tabs.d.mts +5 -1
  290. package/dist/tabs.d.ts +5 -1
  291. package/dist/tabs.js.map +1 -1
  292. package/dist/tabs.mjs.map +1 -1
  293. package/dist/text.d.mts +14 -0
  294. package/dist/text.d.ts +14 -0
  295. package/dist/text.js +15 -0
  296. package/dist/text.js.map +1 -0
  297. package/dist/text.mjs +15 -0
  298. package/dist/text.mjs.map +1 -0
  299. package/dist/textarea.d.mts +3 -2
  300. package/dist/textarea.d.ts +3 -2
  301. package/dist/textarea.js +15 -13
  302. package/dist/textarea.js.map +1 -1
  303. package/dist/textarea.mjs +15 -13
  304. package/dist/textarea.mjs.map +1 -1
  305. package/dist/toggle-group.d.mts +4 -2
  306. package/dist/toggle-group.d.ts +4 -2
  307. package/dist/toggle-group.js +2 -2
  308. package/dist/toggle-group.js.map +1 -1
  309. package/dist/toggle-group.mjs +1 -1
  310. package/dist/toggle-group.mjs.map +1 -1
  311. package/dist/toggle.d.mts +2 -1
  312. package/dist/toggle.d.ts +2 -1
  313. package/dist/toggle.js +2 -2
  314. package/dist/toggle.mjs +1 -1
  315. package/dist/tooltip.d.mts +6 -1
  316. package/dist/tooltip.d.ts +6 -1
  317. package/dist/tooltip.js.map +1 -1
  318. package/dist/tooltip.mjs.map +1 -1
  319. package/package.json +67 -7
  320. package/src/accordion.tsx +17 -4
  321. package/src/alert-dialog.tsx +26 -7
  322. package/src/alert.tsx +35 -25
  323. package/src/aspect-ratio.tsx +2 -1
  324. package/src/avatar.tsx +13 -3
  325. package/src/badge.tsx +10 -9
  326. package/src/blockquote.tsx +25 -0
  327. package/src/box.tsx +33 -0
  328. package/src/breadcrumb.tsx +70 -60
  329. package/src/button.tsx +4 -2
  330. package/src/calendar.tsx +3 -2
  331. package/src/card.tsx +59 -52
  332. package/src/carousel.tsx +76 -72
  333. package/src/checkbox.tsx +3 -2
  334. package/src/code.tsx +24 -0
  335. package/src/collapsible.tsx +11 -1
  336. package/src/command.tsx +47 -10
  337. package/src/container.tsx +25 -0
  338. package/src/context-menu.tsx +52 -16
  339. package/src/data-table.tsx +23 -11
  340. package/src/dialog.tsx +21 -5
  341. package/src/drawer.tsx +28 -6
  342. package/src/dropdown-menu.tsx +51 -15
  343. package/src/em.tsx +24 -0
  344. package/src/form.tsx +55 -38
  345. package/src/heading.tsx +25 -0
  346. package/src/hover-card.tsx +12 -2
  347. package/src/input-otp.tsx +45 -33
  348. package/src/input.tsx +17 -15
  349. package/src/kbd.tsx +34 -0
  350. package/src/label.tsx +3 -2
  351. package/src/menubar.tsx +48 -17
  352. package/src/navigation-menu.tsx +25 -5
  353. package/src/pagination.tsx +21 -9
  354. package/src/popover.tsx +18 -2
  355. package/src/pre.tsx +24 -0
  356. package/src/progress.tsx +4 -3
  357. package/src/quote.tsx +24 -0
  358. package/src/radio-group.tsx +10 -3
  359. package/src/resizable.tsx +2 -1
  360. package/src/scroll-area.tsx +18 -11
  361. package/src/section.tsx +24 -0
  362. package/src/select.tsx +27 -7
  363. package/src/separator.tsx +3 -2
  364. package/src/sheet.tsx +23 -5
  365. package/src/skeleton.tsx +3 -5
  366. package/src/slider.tsx +3 -2
  367. package/src/sonner.tsx +1 -1
  368. package/src/strong.tsx +24 -0
  369. package/src/switch.tsx +3 -2
  370. package/src/table.tsx +90 -78
  371. package/src/tabs.tsx +17 -4
  372. package/src/text.tsx +34 -0
  373. package/src/textarea.tsx +16 -16
  374. package/src/toggle-group.tsx +14 -4
  375. package/src/toggle.tsx +3 -2
  376. package/src/tooltip.tsx +12 -2
  377. package/dist/chunk-2D7SRYKN.js.map +0 -1
  378. package/dist/chunk-EDVCMWDT.mjs.map +0 -1
  379. package/dist/chunk-EIHWTXQ4.mjs.map +0 -1
  380. package/dist/chunk-ESWGFN3R.mjs.map +0 -1
  381. package/dist/chunk-KW5FJ62U.mjs.map +0 -1
  382. package/dist/chunk-LDYBRDAY.js.map +0 -1
  383. package/dist/chunk-OCLLX7EY.js.map +0 -1
  384. package/dist/chunk-PTD4AMHI.mjs.map +0 -1
  385. package/dist/chunk-RTKEO347.js.map +0 -1
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var _chunk2D7SRYKNjs = require('./chunk-2D7SRYKN.js');
8
+ var _chunk43YGVOCOjs = require('./chunk-43YGVOCO.js');
9
9
 
10
10
 
11
11
 
@@ -14,10 +14,10 @@ var _chunk2D7SRYKNjs = require('./chunk-2D7SRYKN.js');
14
14
 
15
15
 
16
16
 
17
- var _chunkOCLLX7EYjs = require('./chunk-OCLLX7EY.js');
17
+ var _chunk3BDLWZ3Wjs = require('./chunk-3BDLWZ3W.js');
18
18
 
19
19
 
20
- var _chunkU2WDUCW3js = require('./chunk-U2WDUCW3.js');
20
+ var _chunkJOJW7BBYjs = require('./chunk-JOJW7BBY.js');
21
21
 
22
22
 
23
23
  var _chunkG3NP7M2Njs = require('./chunk-G3NP7M2N.js');
@@ -39,9 +39,9 @@ var _jsxruntime = require('react/jsx-runtime');
39
39
  function DataTableViewOptions({
40
40
  table
41
41
  }) {
42
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkOCLLX7EYjs.DropdownMenu, { children: [
43
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkOCLLX7EYjs.DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
44
- _chunkU2WDUCW3js.Button,
42
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk3BDLWZ3Wjs.DropdownMenu, { children: [
43
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk3BDLWZ3Wjs.DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
44
+ _chunkJOJW7BBYjs.Button,
45
45
  {
46
46
  variant: "outline",
47
47
  size: "sm",
@@ -52,14 +52,14 @@ function DataTableViewOptions({
52
52
  ]
53
53
  }
54
54
  ) }),
55
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkOCLLX7EYjs.DropdownMenuContent, { align: "end", className: "w-[150px]", children: [
56
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkOCLLX7EYjs.DropdownMenuLabel, { children: "Toggle columns" }),
57
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkOCLLX7EYjs.DropdownMenuSeparator, {}),
55
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk3BDLWZ3Wjs.DropdownMenuContent, { align: "end", className: "w-[150px]", children: [
56
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk3BDLWZ3Wjs.DropdownMenuLabel, { children: "Toggle columns" }),
57
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk3BDLWZ3Wjs.DropdownMenuSeparator, {}),
58
58
  table.getAllColumns().filter(
59
59
  (column) => typeof column.accessorFn !== "undefined" && column.getCanHide()
60
60
  ).map((column) => {
61
61
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
62
- _chunkOCLLX7EYjs.DropdownMenuCheckboxItem,
62
+ _chunk3BDLWZ3Wjs.DropdownMenuCheckboxItem,
63
63
  {
64
64
  className: "capitalize",
65
65
  checked: column.getIsVisible(),
@@ -96,15 +96,15 @@ function DataTablePagination({
96
96
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center space-x-2", children: [
97
97
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm font-medium", children: "Rows per page" }),
98
98
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
99
- _chunk2D7SRYKNjs.Select,
99
+ _chunk43YGVOCOjs.Select,
100
100
  {
101
101
  value: `${table.getState().pagination.pageSize}`,
102
102
  onValueChange: (value) => {
103
103
  table.setPageSize(Number(value));
104
104
  },
105
105
  children: [
106
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2D7SRYKNjs.SelectTrigger, { className: "h-8 w-[70px]", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2D7SRYKNjs.SelectValue, { placeholder: table.getState().pagination.pageSize }) }),
107
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2D7SRYKNjs.SelectContent, { side: "top", children: [10, 20, 30, 40, 50].map((pageSize) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2D7SRYKNjs.SelectItem, { value: `${pageSize}`, children: pageSize }, pageSize)) })
106
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk43YGVOCOjs.SelectTrigger, { className: "h-8 w-[70px]", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk43YGVOCOjs.SelectValue, { placeholder: table.getState().pagination.pageSize }) }),
107
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk43YGVOCOjs.SelectContent, { side: "top", children: [10, 20, 30, 40, 50].map((pageSize) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk43YGVOCOjs.SelectItem, { value: `${pageSize}`, children: pageSize }, pageSize)) })
108
108
  ]
109
109
  }
110
110
  )
@@ -118,7 +118,7 @@ function DataTablePagination({
118
118
  ] }),
119
119
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center space-x-2", children: [
120
120
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
121
- _chunkU2WDUCW3js.Button,
121
+ _chunkJOJW7BBYjs.Button,
122
122
  {
123
123
  variant: "outline",
124
124
  size: "icon-xs",
@@ -134,7 +134,7 @@ function DataTablePagination({
134
134
  }
135
135
  ),
136
136
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
137
- _chunkU2WDUCW3js.Button,
137
+ _chunkJOJW7BBYjs.Button,
138
138
  {
139
139
  variant: "outline",
140
140
  size: "icon-xs",
@@ -149,7 +149,7 @@ function DataTablePagination({
149
149
  }
150
150
  ),
151
151
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
152
- _chunkU2WDUCW3js.Button,
152
+ _chunkJOJW7BBYjs.Button,
153
153
  {
154
154
  variant: "outline",
155
155
  size: "icon-xs",
@@ -164,7 +164,7 @@ function DataTablePagination({
164
164
  }
165
165
  ),
166
166
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
167
- _chunkU2WDUCW3js.Button,
167
+ _chunkJOJW7BBYjs.Button,
168
168
  {
169
169
  variant: "outline",
170
170
  size: "icon-xs",
@@ -193,9 +193,9 @@ function DataTableColumnHeader({
193
193
  if (!column.getCanSort()) {
194
194
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _chunkG3NP7M2Njs.cn.call(void 0, className), children: title });
195
195
  }
196
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _chunkG3NP7M2Njs.cn.call(void 0, "flex items-center space-x-2", className), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkOCLLX7EYjs.DropdownMenu, { children: [
197
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkOCLLX7EYjs.DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
198
- _chunkU2WDUCW3js.Button,
196
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _chunkG3NP7M2Njs.cn.call(void 0, "flex items-center space-x-2", className), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk3BDLWZ3Wjs.DropdownMenu, { children: [
197
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk3BDLWZ3Wjs.DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
198
+ _chunkJOJW7BBYjs.Button,
199
199
  {
200
200
  variant: "ghost",
201
201
  size: "xs",
@@ -206,9 +206,9 @@ function DataTableColumnHeader({
206
206
  ]
207
207
  }
208
208
  ) }),
209
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkOCLLX7EYjs.DropdownMenuContent, { align: "start", children: [
209
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk3BDLWZ3Wjs.DropdownMenuContent, { align: "start", children: [
210
210
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
211
- _chunkOCLLX7EYjs.DropdownMenuItem,
211
+ _chunk3BDLWZ3Wjs.DropdownMenuItem,
212
212
  {
213
213
  onClick: () => {
214
214
  column.toggleSorting(false);
@@ -220,7 +220,7 @@ function DataTableColumnHeader({
220
220
  }
221
221
  ),
222
222
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
223
- _chunkOCLLX7EYjs.DropdownMenuItem,
223
+ _chunk3BDLWZ3Wjs.DropdownMenuItem,
224
224
  {
225
225
  onClick: () => {
226
226
  column.toggleSorting(true);
@@ -231,9 +231,9 @@ function DataTableColumnHeader({
231
231
  ]
232
232
  }
233
233
  ),
234
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkOCLLX7EYjs.DropdownMenuSeparator, {}),
234
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk3BDLWZ3Wjs.DropdownMenuSeparator, {}),
235
235
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
236
- _chunkOCLLX7EYjs.DropdownMenuItem,
236
+ _chunk3BDLWZ3Wjs.DropdownMenuItem,
237
237
  {
238
238
  onClick: () => {
239
239
  column.toggleVisibility(false);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/data-table.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAIA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAgPP,cAAc;AAhNN,SAKE,KALF;AARR,SAAS,qBAA4B;AAAA,EACnC;AACF,GAEsB;AACpB,SACE,qBAAC,gBACC;AAAA,wBAAC,uBAAoB,SAAO,MAC1B;AAAA,MAAC;AAAA;AAAA,QACC,SAAQ;AAAA,QACR,MAAK;AAAA,QACL,WAAU;AAAA,QAEV;AAAA,8BAAC,uBAAoB,WAAU,eAAc;AAAA,UAAE;AAAA;AAAA;AAAA,IAEjD,GACF;AAAA,IACA,qBAAC,uBAAoB,OAAM,OAAM,WAAU,aACzC;AAAA,0BAAC,qBAAkB,4BAAc;AAAA,MACjC,oBAAC,yBAAsB;AAAA,MACtB,MACE,cAAc,EACd;AAAA,QACC,CAAC,WACC,OAAO,OAAO,eAAe,eAAe,OAAO,WAAW;AAAA,MAClE,EACC,IAAI,CAAC,WAAW;AACf,eACE;AAAA,UAAC;AAAA;AAAA,YAEC,WAAU;AAAA,YACV,SAAS,OAAO,aAAa;AAAA,YAC7B,iBAAiB,CAAC,UAAU;AAC1B,qBAAO,iBAAiB,QAAQ,KAAK,CAAC;AAAA,YACxC;AAAA,YAEC,iBAAO;AAAA;AAAA,UAPH,OAAO;AAAA,QAQd;AAAA,MAEJ,CAAC;AAAA,OACL;AAAA,KACF;AAEJ;AAMA,SAAS,oBAA2B;AAAA,EAClC;AAAA,EACA;AAAA,EAC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AG,+BAA+B,SAAS,GACzD,+BAAC,gBACC;AAAA,wBAAC,uBAAoB,SAAO,MAC1B;AAAA,MAAC;AAAA;AAAA,QACC,SAAQ;AAAA,QACR,MAAK;AAAA,QACL,WAAU;AAAA,QAEV;AAAA,8BAAC,UAAM,iBAAM;AAAA,UACZ,OAAO,YAAY,MAAM,SACxB,oBAAC,iBAAc,WAAU,eAAc,IACrC,OAAO,YAAY,MAAM,QAC3B,oBAAC,eAAY,WAAU,eAAc,IAErC,oBAAC,iBAAc,WAAU,eAAc;AAAA;AAAA;AAAA,IAE3C,GACF;AAAA,IACA,qBAAC,uBAAoB,OAAM,SACzB;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,SAAS,MAAM;AACb,mBAAO,cAAc,KAAK;AAAA,UAC5B;AAAA,UAEA;AAAA,gCAAC,eAAY,WAAU,0CAAyC;AAAA,YAAE;AAAA;AAAA;AAAA,MAEpE;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,SAAS,MAAM;AACb,mBAAO,cAAc,IAAI;AAAA,UAC3B;AAAA,UAEA;AAAA,gCAAC,iBAAc,WAAU,0CAAyC;AAAA,YAAE;AAAA;AAAA;AAAA,MAEtE;AAAA,MACA,oBAAC,yBAAsB;AAAA,MACvB;AAAA,QAAC;AAAA;AAAA,UACC,SAAS,MAAM;AACb,mBAAO,iBAAiB,KAAK;AAAA,UAC/B;AAAA,UAEA;AAAA,gCAAC,eAAY,WAAU,0CAAyC;AAAA,YAAE;AAAA;AAAA;AAAA,MAEpE;AAAA,OACF;AAAA,KACF,GACF;AAEJ","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport type * as ReactTable from \"@tanstack/react-table\";\nimport {\n ArrowDownIcon,\n ArrowUpIcon,\n CaretSortIcon,\n ChevronLeftIcon,\n ChevronRightIcon,\n DoubleArrowLeftIcon,\n DoubleArrowRightIcon,\n EyeNoneIcon,\n MixerHorizontalIcon,\n} from \"@radix-ui/react-icons\";\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"./dropdown-menu\";\nimport { Button } from \"./button\";\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"./select\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: DataTableViewOptions\n * -------------------------------------------------------------------------- */\n\nfunction DataTableViewOptions<TData>({\n table,\n}: {\n table: ReactTable.Table<TData>;\n}): React.JSX.Element {\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button\n variant=\"outline\"\n size=\"sm\"\n className=\"ml-auto hidden h-8 lg:flex\"\n >\n <MixerHorizontalIcon className=\"mr-2 size-4\" />\n View\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" className=\"w-[150px]\">\n <DropdownMenuLabel>Toggle columns</DropdownMenuLabel>\n <DropdownMenuSeparator />\n {table\n .getAllColumns()\n .filter(\n (column) =>\n typeof column.accessorFn !== \"undefined\" && column.getCanHide(),\n )\n .map((column) => {\n return (\n <DropdownMenuCheckboxItem\n key={column.id}\n className=\"capitalize\"\n checked={column.getIsVisible()}\n onCheckedChange={(value) => {\n column.toggleVisibility(Boolean(value));\n }}\n >\n {column.id}\n </DropdownMenuCheckboxItem>\n );\n })}\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DataTablePagination\n * -------------------------------------------------------------------------- */\n\nfunction DataTablePagination<TData>({\n table,\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement> & {\n table: ReactTable.Table<TData>;\n}): React.JSX.Element {\n return (\n <div\n className={cn(\"flex items-center justify-between px-2\", className)}\n {...props}\n >\n <div className=\"text-muted-foreground flex-1 text-sm\">\n {table.getFilteredSelectedRowModel().rows.length} of{\" \"}\n {table.getFilteredRowModel().rows.length} row(s) selected.\n </div>\n <div className=\"flex items-center space-x-6 lg:space-x-8\">\n <div className=\"flex items-center space-x-2\">\n <p className=\"text-sm font-medium\">Rows per page</p>\n <Select\n value={`${table.getState().pagination.pageSize}`}\n onValueChange={(value) => {\n table.setPageSize(Number(value));\n }}\n >\n <SelectTrigger className=\"h-8 w-[70px]\">\n <SelectValue placeholder={table.getState().pagination.pageSize} />\n </SelectTrigger>\n <SelectContent side=\"top\">\n {[10, 20, 30, 40, 50].map((pageSize) => (\n <SelectItem key={pageSize} value={`${pageSize}`}>\n {pageSize}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </div>\n <div className=\"flex w-[100px] items-center justify-center text-sm font-medium\">\n Page {table.getState().pagination.pageIndex + 1} of{\" \"}\n {table.getPageCount()}\n </div>\n <div className=\"flex items-center space-x-2\">\n <Button\n variant=\"outline\"\n size=\"icon-xs\"\n className=\"hidden lg:flex\"\n onClick={() => {\n table.setPageIndex(0);\n }}\n disabled={!table.getCanPreviousPage()}\n >\n <span className=\"sr-only\">Go to first page</span>\n <DoubleArrowLeftIcon className=\"size-4\" />\n </Button>\n <Button\n variant=\"outline\"\n size=\"icon-xs\"\n onClick={() => {\n table.previousPage();\n }}\n disabled={!table.getCanPreviousPage()}\n >\n <span className=\"sr-only\">Go to previous page</span>\n <ChevronLeftIcon className=\"size-4\" />\n </Button>\n <Button\n variant=\"outline\"\n size=\"icon-xs\"\n onClick={() => {\n table.nextPage();\n }}\n disabled={!table.getCanNextPage()}\n >\n <span className=\"sr-only\">Go to next page</span>\n <ChevronRightIcon className=\"size-4\" />\n </Button>\n <Button\n variant=\"outline\"\n size=\"icon-xs\"\n className=\"hidden lg:flex\"\n onClick={() => {\n table.setPageIndex(table.getPageCount() - 1);\n }}\n disabled={!table.getCanNextPage()}\n >\n <span className=\"sr-only\">Go to last page</span>\n <DoubleArrowRightIcon className=\"size-4\" />\n </Button>\n </div>\n </div>\n </div>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DataTableColumnHeader\n * -------------------------------------------------------------------------- */\n\nfunction DataTableColumnHeader<TData, TValue>({\n column,\n title,\n className,\n}: React.HTMLAttributes<HTMLDivElement> & {\n column: ReactTable.Column<TData, TValue>;\n title: string;\n}): React.JSX.Element {\n if (!column.getCanSort()) {\n return <div className={cn(className)}>{title}</div>;\n }\n\n return (\n <div className={cn(\"flex items-center space-x-2\", className)}>\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button\n variant=\"ghost\"\n size=\"xs\"\n className=\"data-[state=open]:bg-accent -ml-3\"\n >\n <span>{title}</span>\n {column.getIsSorted() === \"desc\" ? (\n <ArrowDownIcon className=\"ml-2 size-4\" />\n ) : column.getIsSorted() === \"asc\" ? (\n <ArrowUpIcon className=\"ml-2 size-4\" />\n ) : (\n <CaretSortIcon className=\"ml-2 size-4\" />\n )}\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"start\">\n <DropdownMenuItem\n onClick={() => {\n column.toggleSorting(false);\n }}\n >\n <ArrowUpIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Asc\n </DropdownMenuItem>\n <DropdownMenuItem\n onClick={() => {\n column.toggleSorting(true);\n }}\n >\n <ArrowDownIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Desc\n </DropdownMenuItem>\n <DropdownMenuSeparator />\n <DropdownMenuItem\n onClick={() => {\n column.toggleVisibility(false);\n }}\n >\n <EyeNoneIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Hide\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n </div>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { DataTableViewOptions, DataTablePagination, DataTableColumnHeader };\n\nexport * from \"@tanstack/react-table\";\n"]}
1
+ {"version":3,"sources":["../src/data-table.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAIA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA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AAA,IAE3C,GACF;AAAA,IACA,qBAAC,uBAAoB,OAAM,SACzB;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,SAAS,MAAM;AACb,mBAAO,cAAc,KAAK;AAAA,UAC5B;AAAA,UAEA;AAAA,gCAAC,eAAY,WAAU,0CAAyC;AAAA,YAAE;AAAA;AAAA;AAAA,MAEpE;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,SAAS,MAAM;AACb,mBAAO,cAAc,IAAI;AAAA,UAC3B;AAAA,UAEA;AAAA,gCAAC,iBAAc,WAAU,0CAAyC;AAAA,YAAE;AAAA;AAAA;AAAA,MAEtE;AAAA,MACA,oBAAC,yBAAsB;AAAA,MACvB;AAAA,QAAC;AAAA;AAAA,UACC,SAAS,MAAM;AACb,mBAAO,iBAAiB,KAAK;AAAA,UAC/B;AAAA,UAEA;AAAA,gCAAC,eAAY,WAAU,0CAAyC;AAAA,YAAE;AAAA;AAAA;AAAA,MAEpE;AAAA,OACF;AAAA,KACF,GACF;AAEJ","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport type * as ReactTable from \"@tanstack/react-table\";\nimport {\n ArrowDownIcon,\n ArrowUpIcon,\n CaretSortIcon,\n ChevronLeftIcon,\n ChevronRightIcon,\n DoubleArrowLeftIcon,\n DoubleArrowRightIcon,\n EyeNoneIcon,\n MixerHorizontalIcon,\n} from \"@radix-ui/react-icons\";\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"./dropdown-menu\";\nimport { Button } from \"./button\";\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"./select\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: DataTableViewOptions\n * -------------------------------------------------------------------------- */\n\ninterface DataTableViewOptionsProps<TData> {\n table: ReactTable.Table<TData>;\n}\nfunction DataTableViewOptions<TData>({\n table,\n}: DataTableViewOptionsProps<TData>): React.JSX.Element {\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button\n variant=\"outline\"\n size=\"sm\"\n className=\"ml-auto hidden h-8 lg:flex\"\n >\n <MixerHorizontalIcon className=\"mr-2 size-4\" />\n View\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" className=\"w-[150px]\">\n <DropdownMenuLabel>Toggle columns</DropdownMenuLabel>\n <DropdownMenuSeparator />\n {table\n .getAllColumns()\n .filter(\n (column) =>\n typeof column.accessorFn !== \"undefined\" && column.getCanHide(),\n )\n .map((column) => {\n return (\n <DropdownMenuCheckboxItem\n key={column.id}\n className=\"capitalize\"\n checked={column.getIsVisible()}\n onCheckedChange={(value) => {\n column.toggleVisibility(Boolean(value));\n }}\n >\n {column.id}\n </DropdownMenuCheckboxItem>\n );\n })}\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DataTablePagination\n * -------------------------------------------------------------------------- */\n\ninterface DataTablePaginationProps<TData>\n extends React.HTMLAttributes<HTMLDivElement> {\n table: ReactTable.Table<TData>;\n}\nfunction DataTablePagination<TData>({\n table,\n className,\n ...props\n}: DataTablePaginationProps<TData>): React.JSX.Element {\n return (\n <div\n className={cn(\"flex items-center justify-between px-2\", className)}\n {...props}\n >\n <div className=\"text-muted-foreground flex-1 text-sm\">\n {table.getFilteredSelectedRowModel().rows.length} of{\" \"}\n {table.getFilteredRowModel().rows.length} row(s) selected.\n </div>\n <div className=\"flex items-center space-x-6 lg:space-x-8\">\n <div className=\"flex items-center space-x-2\">\n <p className=\"text-sm font-medium\">Rows per page</p>\n <Select\n value={`${table.getState().pagination.pageSize}`}\n onValueChange={(value) => {\n table.setPageSize(Number(value));\n }}\n >\n <SelectTrigger className=\"h-8 w-[70px]\">\n <SelectValue placeholder={table.getState().pagination.pageSize} />\n </SelectTrigger>\n <SelectContent side=\"top\">\n {[10, 20, 30, 40, 50].map((pageSize) => (\n <SelectItem key={pageSize} value={`${pageSize}`}>\n {pageSize}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </div>\n <div className=\"flex w-[100px] items-center justify-center text-sm font-medium\">\n Page {table.getState().pagination.pageIndex + 1} of{\" \"}\n {table.getPageCount()}\n </div>\n <div className=\"flex items-center space-x-2\">\n <Button\n variant=\"outline\"\n size=\"icon-xs\"\n className=\"hidden lg:flex\"\n onClick={() => {\n table.setPageIndex(0);\n }}\n disabled={!table.getCanPreviousPage()}\n >\n <span className=\"sr-only\">Go to first page</span>\n <DoubleArrowLeftIcon className=\"size-4\" />\n </Button>\n <Button\n variant=\"outline\"\n size=\"icon-xs\"\n onClick={() => {\n table.previousPage();\n }}\n disabled={!table.getCanPreviousPage()}\n >\n <span className=\"sr-only\">Go to previous page</span>\n <ChevronLeftIcon className=\"size-4\" />\n </Button>\n <Button\n variant=\"outline\"\n size=\"icon-xs\"\n onClick={() => {\n table.nextPage();\n }}\n disabled={!table.getCanNextPage()}\n >\n <span className=\"sr-only\">Go to next page</span>\n <ChevronRightIcon className=\"size-4\" />\n </Button>\n <Button\n variant=\"outline\"\n size=\"icon-xs\"\n className=\"hidden lg:flex\"\n onClick={() => {\n table.setPageIndex(table.getPageCount() - 1);\n }}\n disabled={!table.getCanNextPage()}\n >\n <span className=\"sr-only\">Go to last page</span>\n <DoubleArrowRightIcon className=\"size-4\" />\n </Button>\n </div>\n </div>\n </div>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DataTableColumnHeader\n * -------------------------------------------------------------------------- */\n\ninterface DataTableColumnHeaderProps<TData, TValue>\n extends React.HTMLAttributes<HTMLDivElement> {\n column: ReactTable.Column<TData, TValue>;\n title: string;\n}\nfunction DataTableColumnHeader<TData, TValue>({\n column,\n title,\n className,\n}: DataTableColumnHeaderProps<TData, TValue>): React.JSX.Element {\n if (!column.getCanSort()) {\n return <div className={cn(className)}>{title}</div>;\n }\n\n return (\n <div className={cn(\"flex items-center space-x-2\", className)}>\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button\n variant=\"ghost\"\n size=\"xs\"\n className=\"data-[state=open]:bg-accent -ml-3\"\n >\n <span>{title}</span>\n {column.getIsSorted() === \"desc\" ? (\n <ArrowDownIcon className=\"ml-2 size-4\" />\n ) : column.getIsSorted() === \"asc\" ? (\n <ArrowUpIcon className=\"ml-2 size-4\" />\n ) : (\n <CaretSortIcon className=\"ml-2 size-4\" />\n )}\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"start\">\n <DropdownMenuItem\n onClick={() => {\n column.toggleSorting(false);\n }}\n >\n <ArrowUpIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Asc\n </DropdownMenuItem>\n <DropdownMenuItem\n onClick={() => {\n column.toggleSorting(true);\n }}\n >\n <ArrowDownIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Desc\n </DropdownMenuItem>\n <DropdownMenuSeparator />\n <DropdownMenuItem\n onClick={() => {\n column.toggleVisibility(false);\n }}\n >\n <EyeNoneIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Hide\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n </div>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n DataTableViewOptions,\n DataTablePagination,\n DataTableColumnHeader,\n type DataTableViewOptionsProps,\n type DataTablePaginationProps,\n type DataTableColumnHeaderProps,\n};\n\nexport * from \"@tanstack/react-table\";\n"]}
@@ -5,7 +5,7 @@ import {
5
5
  SelectItem,
6
6
  SelectTrigger,
7
7
  SelectValue
8
- } from "./chunk-ESWGFN3R.mjs";
8
+ } from "./chunk-KV4VL2ZF.mjs";
9
9
  import {
10
10
  DropdownMenu,
11
11
  DropdownMenuCheckboxItem,
@@ -14,10 +14,10 @@ import {
14
14
  DropdownMenuLabel,
15
15
  DropdownMenuSeparator,
16
16
  DropdownMenuTrigger
17
- } from "./chunk-EDVCMWDT.mjs";
17
+ } from "./chunk-NCEN3XBK.mjs";
18
18
  import {
19
19
  Button
20
- } from "./chunk-KW5FJ62U.mjs";
20
+ } from "./chunk-FATZHRHR.mjs";
21
21
  import {
22
22
  cn
23
23
  } from "./chunk-UG3URV2Z.mjs";
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/data-table.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport type * as ReactTable from \"@tanstack/react-table\";\nimport {\n ArrowDownIcon,\n ArrowUpIcon,\n CaretSortIcon,\n ChevronLeftIcon,\n ChevronRightIcon,\n DoubleArrowLeftIcon,\n DoubleArrowRightIcon,\n EyeNoneIcon,\n MixerHorizontalIcon,\n} from \"@radix-ui/react-icons\";\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"./dropdown-menu\";\nimport { Button } from \"./button\";\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"./select\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: DataTableViewOptions\n * -------------------------------------------------------------------------- */\n\nfunction DataTableViewOptions<TData>({\n table,\n}: {\n table: ReactTable.Table<TData>;\n}): React.JSX.Element {\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button\n variant=\"outline\"\n size=\"sm\"\n className=\"ml-auto hidden h-8 lg:flex\"\n >\n <MixerHorizontalIcon className=\"mr-2 size-4\" />\n View\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" className=\"w-[150px]\">\n <DropdownMenuLabel>Toggle columns</DropdownMenuLabel>\n <DropdownMenuSeparator />\n {table\n .getAllColumns()\n .filter(\n (column) =>\n typeof column.accessorFn !== \"undefined\" && column.getCanHide(),\n )\n .map((column) => {\n return (\n <DropdownMenuCheckboxItem\n key={column.id}\n className=\"capitalize\"\n checked={column.getIsVisible()}\n onCheckedChange={(value) => {\n column.toggleVisibility(Boolean(value));\n }}\n >\n {column.id}\n </DropdownMenuCheckboxItem>\n );\n })}\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DataTablePagination\n * -------------------------------------------------------------------------- */\n\nfunction DataTablePagination<TData>({\n table,\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement> & {\n table: ReactTable.Table<TData>;\n}): React.JSX.Element {\n return (\n <div\n className={cn(\"flex items-center justify-between px-2\", className)}\n {...props}\n >\n <div className=\"text-muted-foreground flex-1 text-sm\">\n {table.getFilteredSelectedRowModel().rows.length} of{\" \"}\n {table.getFilteredRowModel().rows.length} row(s) selected.\n </div>\n <div className=\"flex items-center space-x-6 lg:space-x-8\">\n <div className=\"flex items-center space-x-2\">\n <p className=\"text-sm font-medium\">Rows per page</p>\n <Select\n value={`${table.getState().pagination.pageSize}`}\n onValueChange={(value) => {\n table.setPageSize(Number(value));\n }}\n >\n <SelectTrigger className=\"h-8 w-[70px]\">\n <SelectValue placeholder={table.getState().pagination.pageSize} />\n </SelectTrigger>\n <SelectContent side=\"top\">\n {[10, 20, 30, 40, 50].map((pageSize) => (\n <SelectItem key={pageSize} value={`${pageSize}`}>\n {pageSize}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </div>\n <div className=\"flex w-[100px] items-center justify-center text-sm font-medium\">\n Page {table.getState().pagination.pageIndex + 1} of{\" \"}\n {table.getPageCount()}\n </div>\n <div className=\"flex items-center space-x-2\">\n <Button\n variant=\"outline\"\n size=\"icon-xs\"\n className=\"hidden lg:flex\"\n onClick={() => {\n table.setPageIndex(0);\n }}\n disabled={!table.getCanPreviousPage()}\n >\n <span className=\"sr-only\">Go to first page</span>\n <DoubleArrowLeftIcon className=\"size-4\" />\n </Button>\n <Button\n variant=\"outline\"\n size=\"icon-xs\"\n onClick={() => {\n table.previousPage();\n }}\n disabled={!table.getCanPreviousPage()}\n >\n <span className=\"sr-only\">Go to previous page</span>\n <ChevronLeftIcon className=\"size-4\" />\n </Button>\n <Button\n variant=\"outline\"\n size=\"icon-xs\"\n onClick={() => {\n table.nextPage();\n }}\n disabled={!table.getCanNextPage()}\n >\n <span className=\"sr-only\">Go to next page</span>\n <ChevronRightIcon className=\"size-4\" />\n </Button>\n <Button\n variant=\"outline\"\n size=\"icon-xs\"\n className=\"hidden lg:flex\"\n onClick={() => {\n table.setPageIndex(table.getPageCount() - 1);\n }}\n disabled={!table.getCanNextPage()}\n >\n <span className=\"sr-only\">Go to last page</span>\n <DoubleArrowRightIcon className=\"size-4\" />\n </Button>\n </div>\n </div>\n </div>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DataTableColumnHeader\n * -------------------------------------------------------------------------- */\n\nfunction DataTableColumnHeader<TData, TValue>({\n column,\n title,\n className,\n}: React.HTMLAttributes<HTMLDivElement> & {\n column: ReactTable.Column<TData, TValue>;\n title: string;\n}): React.JSX.Element {\n if (!column.getCanSort()) {\n return <div className={cn(className)}>{title}</div>;\n }\n\n return (\n <div className={cn(\"flex items-center space-x-2\", className)}>\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button\n variant=\"ghost\"\n size=\"xs\"\n className=\"data-[state=open]:bg-accent -ml-3\"\n >\n <span>{title}</span>\n {column.getIsSorted() === \"desc\" ? (\n <ArrowDownIcon className=\"ml-2 size-4\" />\n ) : column.getIsSorted() === \"asc\" ? (\n <ArrowUpIcon className=\"ml-2 size-4\" />\n ) : (\n <CaretSortIcon className=\"ml-2 size-4\" />\n )}\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"start\">\n <DropdownMenuItem\n onClick={() => {\n column.toggleSorting(false);\n }}\n >\n <ArrowUpIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Asc\n </DropdownMenuItem>\n <DropdownMenuItem\n onClick={() => {\n column.toggleSorting(true);\n }}\n >\n <ArrowDownIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Desc\n </DropdownMenuItem>\n <DropdownMenuSeparator />\n <DropdownMenuItem\n onClick={() => {\n column.toggleVisibility(false);\n }}\n >\n <EyeNoneIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Hide\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n </div>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { DataTableViewOptions, DataTablePagination, DataTableColumnHeader };\n\nexport * from \"@tanstack/react-table\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAIA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAgPP,cAAc;AAhNN,SAKE,KALF;AARR,SAAS,qBAA4B;AAAA,EACnC;AACF,GAEsB;AACpB,SACE,qBAAC,gBACC;AAAA,wBAAC,uBAAoB,SAAO,MAC1B;AAAA,MAAC;AAAA;AAAA,QACC,SAAQ;AAAA,QACR,MAAK;AAAA,QACL,WAAU;AAAA,QAEV;AAAA,8BAAC,uBAAoB,WAAU,eAAc;AAAA,UAAE;AAAA;AAAA;AAAA,IAEjD,GACF;AAAA,IACA,qBAAC,uBAAoB,OAAM,OAAM,WAAU,aACzC;AAAA,0BAAC,qBAAkB,4BAAc;AAAA,MACjC,oBAAC,yBAAsB;AAAA,MACtB,MACE,cAAc,EACd;AAAA,QACC,CAAC,WACC,OAAO,OAAO,eAAe,eAAe,OAAO,WAAW;AAAA,MAClE,EACC,IAAI,CAAC,WAAW;AACf,eACE;AAAA,UAAC;AAAA;AAAA,YAEC,WAAU;AAAA,YACV,SAAS,OAAO,aAAa;AAAA,YAC7B,iBAAiB,CAAC,UAAU;AAC1B,qBAAO,iBAAiB,QAAQ,KAAK,CAAC;AAAA,YACxC;AAAA,YAEC,iBAAO;AAAA;AAAA,UAPH,OAAO;AAAA,Q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G;AACxB,WAAO,oBAAC,SAAI,WAAW,GAAG,SAAS,GAAI,iBAAM;AAAA,EAC/C;AAEA,SACE,oBAAC,SAAI,WAAW,GAAG,+BAA+B,SAAS,GACzD,+BAAC,gBACC;AAAA,wBAAC,uBAAoB,SAAO,MAC1B;AAAA,MAAC;AAAA;AAAA,QACC,SAAQ;AAAA,QACR,MAAK;AAAA,QACL,WAAU;AAAA,QAEV;AAAA,8BAAC,UAAM,iBAAM;AAAA,UACZ,OAAO,YAAY,MAAM,SACxB,oBAAC,iBAAc,WAAU,eAAc,IACrC,OAAO,YAAY,MAAM,QAC3B,oBAAC,eAAY,WAAU,eAAc,IAErC,oBAAC,iBAAc,WAAU,eAAc;AAAA;AAAA;AAAA,IAE3C,GACF;AAAA,IACA,qBAAC,uBAAoB,OAAM,SACzB;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,SAAS,MAAM;AACb,mBAAO,cAAc,KAAK;AAAA,UAC5B;AAAA,UAEA;AAAA,gCAAC,eAAY,WAAU,0CAAyC;AAAA,YAAE;AAAA;AAAA;AAAA,MAEpE;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,SAAS,MAAM;AACb,mBAAO,cAAc,IAAI;AAAA,UAC3B;AAAA,UAEA;AAAA,gCAAC,iBAAc,WAAU,0CAAyC;AAAA,YAAE;AAAA;AAAA;AAAA,MAEtE;AAAA,MACA,oBAAC,yBAAsB;AAAA,MACvB;AAAA,QAAC;AAAA;AAAA,UACC,SAAS,MAAM;AACb,mBAAO,iBAAiB,KAAK;AAAA,UAC/B;AAAA,UAEA;AAAA,gCAAC,eAAY,WAAU,0CAAyC;AAAA,YAAE;AAAA;AAAA;AAAA,MAEpE;AAAA,OACF;AAAA,KACF,GACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../src/data-table.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport type * as ReactTable from \"@tanstack/react-table\";\nimport {\n ArrowDownIcon,\n ArrowUpIcon,\n CaretSortIcon,\n ChevronLeftIcon,\n ChevronRightIcon,\n DoubleArrowLeftIcon,\n DoubleArrowRightIcon,\n EyeNoneIcon,\n MixerHorizontalIcon,\n} from \"@radix-ui/react-icons\";\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"./dropdown-menu\";\nimport { Button } from \"./button\";\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"./select\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: DataTableViewOptions\n * -------------------------------------------------------------------------- */\n\ninterface DataTableViewOptionsProps<TData> {\n table: ReactTable.Table<TData>;\n}\nfunction DataTableViewOptions<TData>({\n table,\n}: DataTableViewOptionsProps<TData>): React.JSX.Element {\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button\n variant=\"outline\"\n size=\"sm\"\n className=\"ml-auto hidden h-8 lg:flex\"\n >\n <MixerHorizontalIcon className=\"mr-2 size-4\" />\n View\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" className=\"w-[150px]\">\n <DropdownMenuLabel>Toggle columns</DropdownMenuLabel>\n <DropdownMenuSeparator />\n {table\n .getAllColumns()\n .filter(\n (column) =>\n typeof column.accessorFn !== \"undefined\" && column.getCanHide(),\n )\n .map((column) => {\n return (\n <DropdownMenuCheckboxItem\n key={column.id}\n className=\"capitalize\"\n checked={column.getIsVisible()}\n onCheckedChange={(value) => {\n column.toggleVisibility(Boolean(value));\n }}\n >\n {column.id}\n </DropdownMenuCheckboxItem>\n );\n })}\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DataTablePagination\n * -------------------------------------------------------------------------- */\n\ninterface DataTablePaginationProps<TData>\n extends React.HTMLAttributes<HTMLDivElement> {\n table: ReactTable.Table<TData>;\n}\nfunction DataTablePagination<TData>({\n table,\n className,\n ...props\n}: DataTablePaginationProps<TData>): React.JSX.Element {\n return (\n <div\n className={cn(\"flex items-center justify-between px-2\", className)}\n {...props}\n >\n <div className=\"text-muted-foreground flex-1 text-sm\">\n {table.getFilteredSelectedRowModel().rows.length} of{\" \"}\n {table.getFilteredRowModel().rows.length} row(s) selected.\n </div>\n <div className=\"flex items-center space-x-6 lg:space-x-8\">\n <div className=\"flex items-center space-x-2\">\n <p className=\"text-sm font-medium\">Rows per page</p>\n <Select\n value={`${table.getState().pagination.pageSize}`}\n onValueChange={(value) => {\n table.setPageSize(Number(value));\n }}\n >\n <SelectTrigger className=\"h-8 w-[70px]\">\n <SelectValue placeholder={table.getState().pagination.pageSize} />\n </SelectTrigger>\n <SelectContent side=\"top\">\n {[10, 20, 30, 40, 50].map((pageSize) => (\n <SelectItem key={pageSize} value={`${pageSize}`}>\n {pageSize}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </div>\n <div className=\"flex w-[100px] items-center justify-center text-sm font-medium\">\n Page {table.getState().pagination.pageIndex + 1} of{\" \"}\n {table.getPageCount()}\n </div>\n <div className=\"flex items-center space-x-2\">\n <Button\n variant=\"outline\"\n size=\"icon-xs\"\n className=\"hidden lg:flex\"\n onClick={() => {\n table.setPageIndex(0);\n }}\n disabled={!table.getCanPreviousPage()}\n >\n <span className=\"sr-only\">Go to first page</span>\n <DoubleArrowLeftIcon className=\"size-4\" />\n </Button>\n <Button\n variant=\"outline\"\n size=\"icon-xs\"\n onClick={() => {\n table.previousPage();\n }}\n disabled={!table.getCanPreviousPage()}\n >\n <span className=\"sr-only\">Go to previous page</span>\n <ChevronLeftIcon className=\"size-4\" />\n </Button>\n <Button\n variant=\"outline\"\n size=\"icon-xs\"\n onClick={() => {\n table.nextPage();\n }}\n disabled={!table.getCanNextPage()}\n >\n <span className=\"sr-only\">Go to next page</span>\n <ChevronRightIcon className=\"size-4\" />\n </Button>\n <Button\n variant=\"outline\"\n size=\"icon-xs\"\n className=\"hidden lg:flex\"\n onClick={() => {\n table.setPageIndex(table.getPageCount() - 1);\n }}\n disabled={!table.getCanNextPage()}\n >\n <span className=\"sr-only\">Go to last page</span>\n <DoubleArrowRightIcon className=\"size-4\" />\n </Button>\n </div>\n </div>\n </div>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DataTableColumnHeader\n * -------------------------------------------------------------------------- */\n\ninterface DataTableColumnHeaderProps<TData, TValue>\n extends React.HTMLAttributes<HTMLDivElement> {\n column: ReactTable.Column<TData, TValue>;\n title: string;\n}\nfunction DataTableColumnHeader<TData, TValue>({\n column,\n title,\n className,\n}: DataTableColumnHeaderProps<TData, TValue>): React.JSX.Element {\n if (!column.getCanSort()) {\n return <div className={cn(className)}>{title}</div>;\n }\n\n return (\n <div className={cn(\"flex items-center space-x-2\", className)}>\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button\n variant=\"ghost\"\n size=\"xs\"\n className=\"data-[state=open]:bg-accent -ml-3\"\n >\n <span>{title}</span>\n {column.getIsSorted() === \"desc\" ? (\n <ArrowDownIcon className=\"ml-2 size-4\" />\n ) : column.getIsSorted() === \"asc\" ? (\n <ArrowUpIcon className=\"ml-2 size-4\" />\n ) : (\n <CaretSortIcon className=\"ml-2 size-4\" />\n )}\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"start\">\n <DropdownMenuItem\n onClick={() => {\n column.toggleSorting(false);\n }}\n >\n <ArrowUpIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Asc\n </DropdownMenuItem>\n <DropdownMenuItem\n onClick={() => {\n column.toggleSorting(true);\n }}\n >\n <ArrowDownIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Desc\n </DropdownMenuItem>\n <DropdownMenuSeparator />\n <DropdownMenuItem\n onClick={() => {\n column.toggleVisibility(false);\n }}\n >\n <EyeNoneIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Hide\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n </div>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n DataTableViewOptions,\n DataTablePagination,\n DataTableColumnHeader,\n type DataTableViewOptionsProps,\n type DataTablePaginationProps,\n type DataTableColumnHeaderProps,\n};\n\nexport * from \"@tanstack/react-table\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAIA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AA4PP,cAAc;AA3NN,SAKE,KALF;AANR,SAAS,qBAA4B;AAAA,EACnC;AACF,GAAwD;AACtD,SACE,qBAAC,gBACC;AAAA,wBAAC,uBAAoB,SAAO,MAC1B;AAAA,MAAC;AAAA;AAAA,QACC,SAAQ;AAAA,QACR,MAAK;AAAA,QACL,WAAU;AAAA,QAEV;AAAA,8BAAC,uBAAoB,WAAU,eAAc;AAAA,UAAE;AAAA;AAAA;AAAA,IAEjD,GACF;AAAA,IACA,qBAAC,uBAAoB,OAAM,OAAM,WAAU,aACzC;AAAA,0BAAC,qBAAkB,4BAAc;AAAA,MACjC,oBAAC,yBAAsB;AAAA,MACtB,MACE,cAAc,EACd;AAAA,QACC,CAAC,WACC,OAAO,OAAO,eAAe,eAAe,OAAO,WAAW;AAAA,MAClE,EACC,IAAI,CAAC,WAAW;AACf,eACE;AAAA,UAAC;AAAA;AAAA,YAEC,WAAU;AAAA,YACV,SAAS,OAAO,aAAa;AAAA,YAC7B,iBAAiB,CAAC,UAAU;AAC1B,qBAAO,iBAAiB,QAAQ,KAAK,CAAC;AAAA,YACxC;AAAA,YAEC,iBAAO;AAAA;AAAA,UAPH,OAAO;AAAA,QAQd;AAAA,MAEJ,CAAC;AAAA,OACL;AAAA,KACF;AAEJ;AAUA,SAAS,oBAA2B;AAAA,EAClC;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAuD;AACrD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+BAAC,gBACC;AAAA,wBAAC,uBAAoB,SAAO,MAC1B;AAAA,MAAC;AAAA;AAAA,QACC,SAAQ;AAAA,QACR,MAAK;AAAA,QACL,WAAU;AAAA,QAEV;AAAA,8BAAC,UAAM,iBAAM;AAAA,UACZ,OAAO,YAAY,MAAM,SACxB,oBAAC,iBAAc,WAAU,eAAc,IACrC,OAAO,YAAY,MAAM,QAC3B,oBAAC,eAAY,WAAU,eAAc,IAErC,oBAAC,iBAAc,WAAU,eAAc;AAAA;AAAA;AAAA,IAE3C,GACF;AAAA,IACA,qBAAC,uBAAoB,OAAM,SACzB;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,SAAS,MAAM;AACb,mBAAO,cAAc,KAAK;AAAA,UAC5B;AAAA,UAEA;AAAA,gCAAC,eAAY,WAAU,0CAAyC;AAAA,YAAE;AAAA;AAAA;AAAA,MAEpE;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,SAAS,MAAM;AACb,mBAAO,cAAc,IAAI;AAAA,UAC3B;AAAA,UAEA;AAAA,gCAAC,iBAAc,WAAU,0CAAyC;AAAA,YAAE;AAAA;AAAA;AAAA,MAEtE;AAAA,MACA,oBAAC,yBAAsB;AAAA,MACvB;AAAA,QAAC;AAAA;AAAA,UACC,SAAS,MAAM;AACb,mBAAO,iBAAiB,KAAK;AAAA,UAC/B;AAAA,UAEA;AAAA,gCAAC,eAAY,WAAU,0CAAyC;AAAA,YAAE;AAAA;AAAA;AAAA,MAEpE;AAAA,OACF;AAAA,KACF,GACF;AAEJ;","names":[]}
package/dist/dialog.d.mts CHANGED
@@ -1,13 +1,21 @@
1
1
  import * as React from 'react';
2
2
  import * as DialogPrimitive from '@radix-ui/react-dialog';
3
3
 
4
+ type DialogProps = DialogPrimitive.DialogProps;
4
5
  declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
6
+ type DialogTriggerProps = DialogPrimitive.DialogTriggerProps;
5
7
  declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
8
+ type DialogCloseProps = DialogPrimitive.DialogCloseProps;
6
9
  declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
10
+ type DialogContentProps = DialogPrimitive.DialogContentProps;
7
11
  declare const DialogContent: React.ForwardRefExoticComponent<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>>;
8
- declare function DialogHeader({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
9
- declare function DialogFooter({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
12
+ type DialogHeaderProps = React.HTMLAttributes<HTMLDivElement>;
13
+ declare function DialogHeader({ className, ...props }: DialogHeaderProps): React.JSX.Element;
14
+ type DialogFooterProps = React.HTMLAttributes<HTMLDivElement>;
15
+ declare function DialogFooter({ className, ...props }: DialogFooterProps): React.JSX.Element;
16
+ type DialogTitleProps = DialogPrimitive.DialogTitleProps;
10
17
  declare const DialogTitle: React.ForwardRefExoticComponent<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>>;
18
+ type DialogDescriptionProps = DialogPrimitive.DialogDescriptionProps;
11
19
  declare const DialogDescription: React.ForwardRefExoticComponent<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
12
20
 
13
- export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger };
21
+ export { Dialog, DialogClose, type DialogCloseProps, DialogContent, type DialogContentProps, DialogDescription, type DialogDescriptionProps, DialogFooter, type DialogFooterProps, DialogHeader, type DialogHeaderProps, type DialogProps, DialogTitle, type DialogTitleProps, DialogTrigger, type DialogTriggerProps };
package/dist/dialog.d.ts CHANGED
@@ -1,13 +1,21 @@
1
1
  import * as React from 'react';
2
2
  import * as DialogPrimitive from '@radix-ui/react-dialog';
3
3
 
4
+ type DialogProps = DialogPrimitive.DialogProps;
4
5
  declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
6
+ type DialogTriggerProps = DialogPrimitive.DialogTriggerProps;
5
7
  declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
8
+ type DialogCloseProps = DialogPrimitive.DialogCloseProps;
6
9
  declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
10
+ type DialogContentProps = DialogPrimitive.DialogContentProps;
7
11
  declare const DialogContent: React.ForwardRefExoticComponent<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>>;
8
- declare function DialogHeader({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
9
- declare function DialogFooter({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
12
+ type DialogHeaderProps = React.HTMLAttributes<HTMLDivElement>;
13
+ declare function DialogHeader({ className, ...props }: DialogHeaderProps): React.JSX.Element;
14
+ type DialogFooterProps = React.HTMLAttributes<HTMLDivElement>;
15
+ declare function DialogFooter({ className, ...props }: DialogFooterProps): React.JSX.Element;
16
+ type DialogTitleProps = DialogPrimitive.DialogTitleProps;
10
17
  declare const DialogTitle: React.ForwardRefExoticComponent<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>>;
18
+ type DialogDescriptionProps = DialogPrimitive.DialogDescriptionProps;
11
19
  declare const DialogDescription: React.ForwardRefExoticComponent<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
12
20
 
13
- export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger };
21
+ export { Dialog, DialogClose, type DialogCloseProps, DialogContent, type DialogContentProps, DialogDescription, type DialogDescriptionProps, DialogFooter, type DialogFooterProps, DialogHeader, type DialogHeaderProps, type DialogProps, DialogTitle, type DialogTitleProps, DialogTrigger, type DialogTriggerProps };
package/dist/dialog.js CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
 
10
10
 
11
- var _chunkLDYBRDAYjs = require('./chunk-LDYBRDAY.js');
11
+ var _chunkD6NQEMTJjs = require('./chunk-D6NQEMTJ.js');
12
12
  require('./chunk-G3NP7M2N.js');
13
13
 
14
14
 
@@ -19,5 +19,5 @@ require('./chunk-G3NP7M2N.js');
19
19
 
20
20
 
21
21
 
22
- exports.Dialog = _chunkLDYBRDAYjs.Dialog; exports.DialogClose = _chunkLDYBRDAYjs.DialogClose; exports.DialogContent = _chunkLDYBRDAYjs.DialogContent; exports.DialogDescription = _chunkLDYBRDAYjs.DialogDescription; exports.DialogFooter = _chunkLDYBRDAYjs.DialogFooter; exports.DialogHeader = _chunkLDYBRDAYjs.DialogHeader; exports.DialogTitle = _chunkLDYBRDAYjs.DialogTitle; exports.DialogTrigger = _chunkLDYBRDAYjs.DialogTrigger;
22
+ exports.Dialog = _chunkD6NQEMTJjs.Dialog; exports.DialogClose = _chunkD6NQEMTJjs.DialogClose; exports.DialogContent = _chunkD6NQEMTJjs.DialogContent; exports.DialogDescription = _chunkD6NQEMTJjs.DialogDescription; exports.DialogFooter = _chunkD6NQEMTJjs.DialogFooter; exports.DialogHeader = _chunkD6NQEMTJjs.DialogHeader; exports.DialogTitle = _chunkD6NQEMTJjs.DialogTitle; exports.DialogTrigger = _chunkD6NQEMTJjs.DialogTrigger;
23
23
  //# sourceMappingURL=dialog.js.map
package/dist/dialog.mjs CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  DialogHeader,
9
9
  DialogTitle,
10
10
  DialogTrigger
11
- } from "./chunk-EIHWTXQ4.mjs";
11
+ } from "./chunk-AJLEALVP.mjs";
12
12
  import "./chunk-UG3URV2Z.mjs";
13
13
  export {
14
14
  Dialog,
package/dist/drawer.d.mts CHANGED
@@ -2,15 +2,23 @@ import * as DialogPrimitive from '@radix-ui/react-dialog';
2
2
  import * as React from 'react';
3
3
  import { Drawer as Drawer$1 } from 'vaul';
4
4
 
5
- declare function Drawer({ shouldScaleBackground, ...props }: React.ComponentProps<typeof Drawer$1.Root>): React.JSX.Element;
5
+ type DrawerProps = React.ComponentProps<typeof Drawer$1.Root>;
6
+ declare function Drawer({ shouldScaleBackground, ...props }: DrawerProps): React.JSX.Element;
7
+ type DrawerTriggerProps = React.ComponentProps<typeof Drawer$1.Trigger>;
6
8
  declare const DrawerTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
9
+ type DrawerCloseProps = React.ComponentProps<typeof Drawer$1.Close>;
7
10
  declare const DrawerClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
11
+ type DrawerContentProps = React.ComponentPropsWithoutRef<typeof Drawer$1.Content>;
8
12
  declare const DrawerContent: React.ForwardRefExoticComponent<Omit<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
9
13
  onAnimationEnd?: ((open: boolean) => void) | undefined;
10
14
  } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
11
- declare function DrawerHeader({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
12
- declare function DrawerFooter({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
15
+ type DrawerHeaderProps = React.HTMLAttributes<HTMLDivElement>;
16
+ declare function DrawerHeader({ className, ...props }: DrawerHeaderProps): React.JSX.Element;
17
+ type DrawerFooterProps = React.HTMLAttributes<HTMLDivElement>;
18
+ declare function DrawerFooter({ className, ...props }: DrawerFooterProps): React.JSX.Element;
19
+ type DrawerTitleProps = React.ComponentPropsWithoutRef<typeof Drawer$1.Title>;
13
20
  declare const DrawerTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
21
+ type DrawerDescriptionProps = React.ComponentPropsWithoutRef<typeof Drawer$1.Description>;
14
22
  declare const DrawerDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
15
23
 
16
- export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger };
24
+ export { Drawer, DrawerClose, type DrawerCloseProps, DrawerContent, type DrawerContentProps, DrawerDescription, type DrawerDescriptionProps, DrawerFooter, type DrawerFooterProps, DrawerHeader, type DrawerHeaderProps, type DrawerProps, DrawerTitle, type DrawerTitleProps, DrawerTrigger, type DrawerTriggerProps };
package/dist/drawer.d.ts CHANGED
@@ -2,15 +2,23 @@ import * as DialogPrimitive from '@radix-ui/react-dialog';
2
2
  import * as React from 'react';
3
3
  import { Drawer as Drawer$1 } from 'vaul';
4
4
 
5
- declare function Drawer({ shouldScaleBackground, ...props }: React.ComponentProps<typeof Drawer$1.Root>): React.JSX.Element;
5
+ type DrawerProps = React.ComponentProps<typeof Drawer$1.Root>;
6
+ declare function Drawer({ shouldScaleBackground, ...props }: DrawerProps): React.JSX.Element;
7
+ type DrawerTriggerProps = React.ComponentProps<typeof Drawer$1.Trigger>;
6
8
  declare const DrawerTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
9
+ type DrawerCloseProps = React.ComponentProps<typeof Drawer$1.Close>;
7
10
  declare const DrawerClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
11
+ type DrawerContentProps = React.ComponentPropsWithoutRef<typeof Drawer$1.Content>;
8
12
  declare const DrawerContent: React.ForwardRefExoticComponent<Omit<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
9
13
  onAnimationEnd?: ((open: boolean) => void) | undefined;
10
14
  } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
11
- declare function DrawerHeader({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
12
- declare function DrawerFooter({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
15
+ type DrawerHeaderProps = React.HTMLAttributes<HTMLDivElement>;
16
+ declare function DrawerHeader({ className, ...props }: DrawerHeaderProps): React.JSX.Element;
17
+ type DrawerFooterProps = React.HTMLAttributes<HTMLDivElement>;
18
+ declare function DrawerFooter({ className, ...props }: DrawerFooterProps): React.JSX.Element;
19
+ type DrawerTitleProps = React.ComponentPropsWithoutRef<typeof Drawer$1.Title>;
13
20
  declare const DrawerTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
21
+ type DrawerDescriptionProps = React.ComponentPropsWithoutRef<typeof Drawer$1.Description>;
14
22
  declare const DrawerDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
15
23
 
16
- export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger };
24
+ export { Drawer, DrawerClose, type DrawerCloseProps, DrawerContent, type DrawerContentProps, DrawerDescription, type DrawerDescriptionProps, DrawerFooter, type DrawerFooterProps, DrawerHeader, type DrawerHeaderProps, type DrawerProps, DrawerTitle, type DrawerTitleProps, DrawerTrigger, type DrawerTriggerProps };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/drawer.tsx"],"names":[],"mappings":";;;;;;AAEA,YAAY,WAAW;AACvB,SAAS,UAAU,uBAAuB;AAYtC,cA6BA,YA7BA;AALJ,SAAS,OAAO;AAAA,EACd,wBAAwB;AAAA,EACxB,GAAG;AACL,GAAyE;AACvE,SACE;AAAA,IAAC,gBAAgB;AAAA,IAAhB;AAA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GAAG;AAAA;AACN,CACD;AACD,kBAAkB,cAAc,gBAAgB,YAAY","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Drawer as DrawerPrimitive } from \"vaul\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: Drawer\n * -------------------------------------------------------------------------- */\n\nfunction Drawer({\n shouldScaleBackground = true,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Root>): React.JSX.Element {\n return (\n <DrawerPrimitive.Root\n shouldScaleBackground={shouldScaleBackground}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTrigger\n * -------------------------------------------------------------------------- */\n\nconst DrawerTrigger = DrawerPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerClose\n * -------------------------------------------------------------------------- */\n\nconst DrawerClose = DrawerPrimitive.Close;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerContent\n * -------------------------------------------------------------------------- */\n\nconst DrawerContent = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DrawerPrimitive.Portal>\n <DrawerPrimitive.Overlay className=\"fixed inset-0 z-50 bg-black/80\" />\n <DrawerPrimitive.Content\n ref={ref}\n className={cn(\n \"bg-background fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border\",\n className,\n )}\n {...props}\n >\n <div className=\"bg-muted mx-auto mt-4 h-2 w-[100px] rounded-full\" />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPrimitive.Portal>\n));\nDrawerContent.displayName = \"DrawerContent\";\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerHeader\n * -------------------------------------------------------------------------- */\n\nfunction DrawerHeader({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element {\n return (\n <div\n className={cn(\"grid gap-1.5 p-4 text-center sm:text-left\", className)}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerFooter\n * -------------------------------------------------------------------------- */\n\nfunction DrawerFooter({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element {\n return (\n <div\n className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTitle\n * -------------------------------------------------------------------------- */\n\nconst DrawerTitle = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Title\n ref={ref}\n className={cn(\n \"text-lg font-semibold leading-none tracking-tight\",\n className,\n )}\n {...props}\n />\n));\nDrawerTitle.displayName = DrawerPrimitive.Title.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerDescription\n * -------------------------------------------------------------------------- */\n\nconst DrawerDescription = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Description\n ref={ref}\n className={cn(\"text-muted-foreground text-sm\", className)}\n {...props}\n />\n));\nDrawerDescription.displayName = DrawerPrimitive.Description.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Drawer,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n};\n"]}
1
+ {"version":3,"sources":["../src/drawer.tsx"],"names":[],"mappings":";;;;;;AAEA,YAAY,WAAW;AACvB,SAAS,UAAU,uBAAuB;AAatC,cAkCA,YAlCA;AALJ,SAAS,OAAO;AAAA,EACd,wBAAwB;AAAA,EACxB,GAAG;AACL,GAAmC;AACjC,SACE;AAAA,IAAC,gBAAgB;AAAA,IAAhB;AAAA,MACC;AAAA,MACC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ACD,kBAAkB,cAAc,gBAAgB,YAAY","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Drawer as DrawerPrimitive } from \"vaul\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: Drawer\n * -------------------------------------------------------------------------- */\n\ntype DrawerProps = React.ComponentProps<typeof DrawerPrimitive.Root>;\nfunction Drawer({\n shouldScaleBackground = true,\n ...props\n}: DrawerProps): React.JSX.Element {\n return (\n <DrawerPrimitive.Root\n shouldScaleBackground={shouldScaleBackground}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTrigger\n * -------------------------------------------------------------------------- */\n\ntype DrawerTriggerProps = React.ComponentProps<typeof DrawerPrimitive.Trigger>;\nconst DrawerTrigger = DrawerPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerClose\n * -------------------------------------------------------------------------- */\n\ntype DrawerCloseProps = React.ComponentProps<typeof DrawerPrimitive.Close>;\nconst DrawerClose = DrawerPrimitive.Close;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerContent\n * -------------------------------------------------------------------------- */\n\ntype DrawerContentProps = React.ComponentPropsWithoutRef<\n typeof DrawerPrimitive.Content\n>;\nconst DrawerContent = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Content>,\n DrawerContentProps\n>(({ className, children, ...props }, ref) => (\n <DrawerPrimitive.Portal>\n <DrawerPrimitive.Overlay className=\"fixed inset-0 z-50 bg-black/80\" />\n <DrawerPrimitive.Content\n ref={ref}\n className={cn(\n \"bg-background fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border\",\n className,\n )}\n {...props}\n >\n <div className=\"bg-muted mx-auto mt-4 h-2 w-[100px] rounded-full\" />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPrimitive.Portal>\n));\nDrawerContent.displayName = \"DrawerContent\";\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerHeader\n * -------------------------------------------------------------------------- */\n\ntype DrawerHeaderProps = React.HTMLAttributes<HTMLDivElement>;\nfunction DrawerHeader({\n className,\n ...props\n}: DrawerHeaderProps): React.JSX.Element {\n return (\n <div\n className={cn(\"grid gap-1.5 p-4 text-center sm:text-left\", className)}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerFooter\n * -------------------------------------------------------------------------- */\n\ntype DrawerFooterProps = React.HTMLAttributes<HTMLDivElement>;\nfunction DrawerFooter({\n className,\n ...props\n}: DrawerFooterProps): React.JSX.Element {\n return (\n <div\n className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTitle\n * -------------------------------------------------------------------------- */\n\ntype DrawerTitleProps = React.ComponentPropsWithoutRef<\n typeof DrawerPrimitive.Title\n>;\nconst DrawerTitle = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Title>,\n DrawerTitleProps\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Title\n ref={ref}\n className={cn(\n \"text-lg font-semibold leading-none tracking-tight\",\n className,\n )}\n {...props}\n />\n));\nDrawerTitle.displayName = DrawerPrimitive.Title.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerDescription\n * -------------------------------------------------------------------------- */\n\ntype DrawerDescriptionProps = React.ComponentPropsWithoutRef<\n typeof DrawerPrimitive.Description\n>;\nconst DrawerDescription = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Description>,\n DrawerDescriptionProps\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Description\n ref={ref}\n className={cn(\"text-muted-foreground text-sm\", className)}\n {...props}\n />\n));\nDrawerDescription.displayName = DrawerPrimitive.Description.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Drawer,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n type DrawerProps,\n type DrawerTriggerProps,\n type DrawerCloseProps,\n type DrawerContentProps,\n type DrawerHeaderProps,\n type DrawerFooterProps,\n type DrawerTitleProps,\n type DrawerDescriptionProps,\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/drawer.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Drawer as DrawerPrimitive } from \"vaul\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: Drawer\n * -------------------------------------------------------------------------- */\n\nfunction Drawer({\n shouldScaleBackground = true,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Root>): React.JSX.Element {\n return (\n <DrawerPrimitive.Root\n shouldScaleBackground={shouldScaleBackground}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTrigger\n * -------------------------------------------------------------------------- */\n\nconst DrawerTrigger = DrawerPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerClose\n * -------------------------------------------------------------------------- */\n\nconst DrawerClose = DrawerPrimitive.Close;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerContent\n * -------------------------------------------------------------------------- */\n\nconst DrawerContent = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DrawerPrimitive.Portal>\n <DrawerPrimitive.Overlay className=\"fixed inset-0 z-50 bg-black/80\" />\n <DrawerPrimitive.Content\n ref={ref}\n className={cn(\n \"bg-background fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border\",\n className,\n )}\n {...props}\n >\n <div className=\"bg-muted mx-auto mt-4 h-2 w-[100px] rounded-full\" />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPrimitive.Portal>\n));\nDrawerContent.displayName = \"DrawerContent\";\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerHeader\n * -------------------------------------------------------------------------- */\n\nfunction DrawerHeader({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element {\n return (\n <div\n className={cn(\"grid gap-1.5 p-4 text-center sm:text-left\", className)}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerFooter\n * -------------------------------------------------------------------------- */\n\nfunction DrawerFooter({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element {\n return (\n <div\n className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTitle\n * -------------------------------------------------------------------------- */\n\nconst DrawerTitle = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Title\n ref={ref}\n className={cn(\n \"text-lg font-semibold leading-none tracking-tight\",\n className,\n )}\n {...props}\n />\n));\nDrawerTitle.displayName = DrawerPrimitive.Title.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerDescription\n * -------------------------------------------------------------------------- */\n\nconst DrawerDescription = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Description\n ref={ref}\n className={cn(\"text-muted-foreground text-sm\", className)}\n {...props}\n />\n));\nDrawerDescription.displayName = DrawerPrimitive.Description.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Drawer,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n};\n"],"mappings":";;;;;;AAEA,YAAY,WAAW;AACvB,SAAS,UAAU,uBAAuB;AAYtC,cA6BA,YA7BA;AALJ,SAAS,OAAO;AAAA,EACd,wBAAwB;AAAA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AAAA,EAAhB;AAAA,IACC;AAAA,IACA,WAAW,GAAG,iCAAiC,SAAS;AAAA,IACvD,GAAG;AAAA;AACN,CACD;AACD,kBAAkB,cAAc,gBAAgB,YAAY;","names":[]}
1
+ {"version":3,"sources":["../src/drawer.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Drawer as DrawerPrimitive } from \"vaul\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: Drawer\n * -------------------------------------------------------------------------- */\n\ntype DrawerProps = React.ComponentProps<typeof DrawerPrimitive.Root>;\nfunction Drawer({\n shouldScaleBackground = true,\n ...props\n}: DrawerProps): React.JSX.Element {\n return (\n <DrawerPrimitive.Root\n shouldScaleBackground={shouldScaleBackground}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTrigger\n * -------------------------------------------------------------------------- */\n\ntype DrawerTriggerProps = React.ComponentProps<typeof DrawerPrimitive.Trigger>;\nconst DrawerTrigger = DrawerPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerClose\n * -------------------------------------------------------------------------- */\n\ntype DrawerCloseProps = React.ComponentProps<typeof DrawerPrimitive.Close>;\nconst DrawerClose = DrawerPrimitive.Close;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerContent\n * -------------------------------------------------------------------------- */\n\ntype DrawerContentProps = React.ComponentPropsWithoutRef<\n typeof DrawerPrimitive.Content\n>;\nconst DrawerContent = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Content>,\n DrawerContentProps\n>(({ className, children, ...props }, ref) => (\n <DrawerPrimitive.Portal>\n <DrawerPrimitive.Overlay className=\"fixed inset-0 z-50 bg-black/80\" />\n <DrawerPrimitive.Content\n ref={ref}\n className={cn(\n \"bg-background fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border\",\n className,\n )}\n {...props}\n >\n <div className=\"bg-muted mx-auto mt-4 h-2 w-[100px] rounded-full\" />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPrimitive.Portal>\n));\nDrawerContent.displayName = \"DrawerContent\";\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerHeader\n * -------------------------------------------------------------------------- */\n\ntype DrawerHeaderProps = React.HTMLAttributes<HTMLDivElement>;\nfunction DrawerHeader({\n className,\n ...props\n}: DrawerHeaderProps): React.JSX.Element {\n return (\n <div\n className={cn(\"grid gap-1.5 p-4 text-center sm:text-left\", className)}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerFooter\n * -------------------------------------------------------------------------- */\n\ntype DrawerFooterProps = React.HTMLAttributes<HTMLDivElement>;\nfunction DrawerFooter({\n className,\n ...props\n}: DrawerFooterProps): React.JSX.Element {\n return (\n <div\n className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTitle\n * -------------------------------------------------------------------------- */\n\ntype DrawerTitleProps = React.ComponentPropsWithoutRef<\n typeof DrawerPrimitive.Title\n>;\nconst DrawerTitle = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Title>,\n DrawerTitleProps\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Title\n ref={ref}\n className={cn(\n \"text-lg font-semibold leading-none tracking-tight\",\n className,\n )}\n {...props}\n />\n));\nDrawerTitle.displayName = DrawerPrimitive.Title.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerDescription\n * -------------------------------------------------------------------------- */\n\ntype DrawerDescriptionProps = React.ComponentPropsWithoutRef<\n typeof DrawerPrimitive.Description\n>;\nconst DrawerDescription = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Description>,\n DrawerDescriptionProps\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Description\n ref={ref}\n className={cn(\"text-muted-foreground text-sm\", className)}\n {...props}\n />\n));\nDrawerDescription.displayName = DrawerPrimitive.Description.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Drawer,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n type DrawerProps,\n type DrawerTriggerProps,\n type DrawerCloseProps,\n type DrawerContentProps,\n type DrawerHeaderProps,\n type DrawerFooterProps,\n type DrawerTitleProps,\n type DrawerDescriptionProps,\n};\n"],"mappings":";;;;;;AAEA,YAAY,WAAW;AACvB,SAAS,UAAU,uBAAuB;AAatC,cAkCA,YAlCA;AALJ,SAAS,OAAO;AAAA,EACd,wBAAwB;AAAA,EACxB,GAAG;AACL,GAAmC;AACjC,SACE;AAAA,IAAC,gBAAgB;AAAA,IAAhB;AAAA,MACC;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AAOA,IAAM,gBAAgB,gBAAgB;AAOtC,IAAM,cAAc,gBAAgB;AASpC,IAAM,gBAAsB,iBAG1B,CAAC,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,QACpC,qBAAC,gBAAgB,QAAhB,EACC;AAAA,sBAAC,gBAAgB,SAAhB,EAAwB,WAAU,kCAAiC;AAAA,EACpE;AAAA,IAAC,gBAAgB;AAAA,IAAhB;AAAA,MACC;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEJ;AAAA,4BAAC,SAAI,WAAU,oDAAmD;AAAA,QACjE;AAAA;AAAA;AAAA,EACH;AAAA,GACF,CACD;AACD,cAAc,cAAc;AAO5B,SAAS,aAAa;AAAA,EACpB;AAAA,EACA,GAAG;AACL,GAAyC;AACvC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,GAAG,6CAA6C,SAAS;AAAA,MACnE,GAAG;AAAA;AAAA,EACN;AAEJ;AAOA,SAAS,aAAa;AAAA,EACpB;AAAA,EACA,GAAG;AACL,GAAyC;AACvC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,GAAG,mCAAmC,SAAS;AAAA,MACzD,GAAG;AAAA;AAAA,EACN;AAEJ;AASA,IAAM,cAAoB,iBAGxB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAC,gBAAgB;AAAA,EAAhB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,YAAY,cAAc,gBAAgB,MAAM;AAShD,IAAM,oBAA0B,iBAG9B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAC,gBAAgB;AAAA,EAAhB;AAAA,IACC;AAAA,IACA,WAAW,GAAG,iCAAiC,SAAS;AAAA,IACvD,GAAG;AAAA;AACN,CACD;AACD,kBAAkB,cAAc,gBAAgB,YAAY;","names":[]}
@@ -1,25 +1,39 @@
1
1
  import * as React from 'react';
2
2
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
3
3
 
4
+ type DropdownMenuProps = DropdownMenuPrimitive.DropdownMenuProps;
4
5
  declare const DropdownMenu: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;
6
+ type DropdownMenuTriggerProps = DropdownMenuPrimitive.DropdownMenuTriggerProps;
5
7
  declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
8
+ type DropdownMenuGroupProps = DropdownMenuPrimitive.DropdownMenuGroupProps;
6
9
  declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
10
+ type DropdownMenuSubProps = DropdownMenuPrimitive.DropdownMenuSubProps;
7
11
  declare const DropdownMenuSub: React.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
12
+ type DropdownMenuRadioGroupProps = DropdownMenuPrimitive.DropdownMenuRadioGroupProps;
8
13
  declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
9
- declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & {
10
- inset?: boolean | undefined;
11
- } & React.RefAttributes<HTMLDivElement>>;
14
+ interface DropdownMenuSubTriggerProps extends DropdownMenuPrimitive.DropdownMenuSubTriggerProps {
15
+ inset?: boolean;
16
+ }
17
+ declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>>;
18
+ type DropdownMenuSubContentProps = DropdownMenuPrimitive.DropdownMenuSubContentProps;
12
19
  declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>>;
20
+ type DropdownMenuContentProps = DropdownMenuPrimitive.DropdownMenuContentProps;
13
21
  declare const DropdownMenuContent: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>>;
14
- declare const DropdownMenuItem: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuItemProps & {
15
- inset?: boolean | undefined;
16
- } & React.RefAttributes<HTMLDivElement>>;
22
+ interface DropdownMenuItemProps extends DropdownMenuPrimitive.DropdownMenuItemProps {
23
+ inset?: boolean;
24
+ }
25
+ declare const DropdownMenuItem: React.ForwardRefExoticComponent<DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>>;
26
+ type DropdownMenuCheckboxItemProps = DropdownMenuPrimitive.DropdownMenuCheckboxItemProps;
17
27
  declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>>;
28
+ type DropdownMenuRadioItemProps = DropdownMenuPrimitive.DropdownMenuRadioItemProps;
18
29
  declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React.RefAttributes<HTMLDivElement>>;
19
- declare const DropdownMenuLabel: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuLabelProps & {
20
- inset?: boolean | undefined;
21
- } & React.RefAttributes<HTMLDivElement>>;
30
+ interface DropdownMenuLabelProps extends DropdownMenuPrimitive.DropdownMenuLabelProps {
31
+ inset?: boolean;
32
+ }
33
+ declare const DropdownMenuLabel: React.ForwardRefExoticComponent<DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>>;
34
+ type DropdownMenuSeparatorProps = DropdownMenuPrimitive.DropdownMenuSeparatorProps;
22
35
  declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>>;
23
- declare function DropdownMenuShortcut({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): React.JSX.Element;
36
+ type DropdownMenuShortcutProps = React.HTMLAttributes<HTMLSpanElement>;
37
+ declare function DropdownMenuShortcut({ className, ...props }: DropdownMenuShortcutProps): React.JSX.Element;
24
38
 
25
- export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger };
39
+ export { DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, type DropdownMenuGroupProps, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, type DropdownMenuProps, DropdownMenuRadioGroup, type DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuShortcut, type DropdownMenuShortcutProps, DropdownMenuSub, DropdownMenuSubContent, type DropdownMenuSubContentProps, type DropdownMenuSubProps, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type DropdownMenuTriggerProps };