@stevederico/skateboard-ui 3.12.0 → 4.1.0

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 (339) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +37 -31
  3. package/dist/components/core/Command.js +33 -7
  4. package/dist/shadcn/ui/accordion.d.ts +1 -6
  5. package/dist/shadcn/ui/accordion.js +3 -17
  6. package/dist/shadcn/ui/alert-dialog.d.ts +1 -18
  7. package/dist/shadcn/ui/alert-dialog.js +3 -43
  8. package/dist/shadcn/ui/alert.d.ts +1 -13
  9. package/dist/shadcn/ui/alert.js +3 -28
  10. package/dist/shadcn/ui/aspect-ratio.d.ts +1 -4
  11. package/dist/shadcn/ui/aspect-ratio.js +3 -8
  12. package/dist/shadcn/ui/avatar.d.ts +1 -11
  13. package/dist/shadcn/ui/avatar.js +3 -24
  14. package/dist/shadcn/ui/badge.d.ts +1 -14
  15. package/dist/shadcn/ui/badge.js +3 -33
  16. package/dist/shadcn/ui/breadcrumb.d.ts +1 -10
  17. package/dist/shadcn/ui/breadcrumb.js +3 -37
  18. package/dist/shadcn/ui/button-group.d.ts +1 -13
  19. package/dist/shadcn/ui/button-group.js +3 -36
  20. package/dist/shadcn/ui/button.d.ts +1 -34
  21. package/dist/shadcn/ui/button.js +3 -53
  22. package/dist/shadcn/ui/calendar.d.ts +1 -13
  23. package/dist/shadcn/ui/calendar.js +3 -75
  24. package/dist/shadcn/ui/card.d.ts +1 -11
  25. package/dist/shadcn/ui/card.js +3 -25
  26. package/dist/shadcn/ui/checkbox.d.ts +1 -3
  27. package/dist/shadcn/ui/checkbox.js +3 -9
  28. package/dist/shadcn/ui/collapsible.d.ts +1 -5
  29. package/dist/shadcn/ui/collapsible.js +3 -13
  30. package/dist/shadcn/ui/command.d.ts +1 -19
  31. package/dist/shadcn/ui/command.js +3 -35
  32. package/dist/shadcn/ui/context-menu.d.ts +1 -29
  33. package/dist/shadcn/ui/context-menu.js +3 -52
  34. package/dist/shadcn/ui/dialog.d.ts +1 -17
  35. package/dist/shadcn/ui/dialog.js +3 -38
  36. package/dist/shadcn/ui/drawer.d.ts +1 -13
  37. package/dist/shadcn/ui/drawer.js +3 -196
  38. package/dist/shadcn/ui/dropdown-menu.d.ts +1 -29
  39. package/dist/shadcn/ui/dropdown-menu.js +3 -52
  40. package/dist/shadcn/ui/empty.d.ts +1 -14
  41. package/dist/shadcn/ui/empty.js +3 -33
  42. package/dist/shadcn/ui/field.d.ts +1 -28
  43. package/dist/shadcn/ui/field.js +3 -68
  44. package/dist/shadcn/ui/hover-card.d.ts +1 -5
  45. package/dist/shadcn/ui/hover-card.js +3 -14
  46. package/dist/shadcn/ui/input-group.d.ts +1 -28
  47. package/dist/shadcn/ui/input-group.js +3 -58
  48. package/dist/shadcn/ui/input.d.ts +1 -3
  49. package/dist/shadcn/ui/input.js +3 -8
  50. package/dist/shadcn/ui/item.d.ts +1 -34
  51. package/dist/shadcn/ui/item.js +3 -79
  52. package/dist/shadcn/ui/kbd.d.ts +1 -3
  53. package/dist/shadcn/ui/kbd.js +3 -9
  54. package/dist/shadcn/ui/label.d.ts +1 -3
  55. package/dist/shadcn/ui/label.js +3 -8
  56. package/dist/shadcn/ui/menubar.d.ts +1 -29
  57. package/dist/shadcn/ui/menubar.js +3 -57
  58. package/dist/shadcn/ui/navigation-menu.d.ts +1 -13
  59. package/dist/shadcn/ui/navigation-menu.js +3 -31
  60. package/dist/shadcn/ui/pagination.d.ts +1 -17
  61. package/dist/shadcn/ui/pagination.js +3 -27
  62. package/dist/shadcn/ui/popover.d.ts +1 -9
  63. package/dist/shadcn/ui/popover.js +3 -24
  64. package/dist/shadcn/ui/progress.d.ts +1 -7
  65. package/dist/shadcn/ui/progress.js +3 -20
  66. package/dist/shadcn/ui/radio-group.d.ts +1 -5
  67. package/dist/shadcn/ui/radio-group.js +3 -12
  68. package/dist/shadcn/ui/scroll-area.d.ts +1 -5
  69. package/dist/shadcn/ui/scroll-area.js +3 -12
  70. package/dist/shadcn/ui/select.d.ts +1 -15
  71. package/dist/shadcn/ui/select.js +3 -35
  72. package/dist/shadcn/ui/separator.d.ts +1 -3
  73. package/dist/shadcn/ui/separator.js +3 -8
  74. package/dist/shadcn/ui/sheet.d.ts +1 -14
  75. package/dist/shadcn/ui/sheet.js +3 -38
  76. package/dist/shadcn/ui/sidebar.d.ts +1 -70
  77. package/dist/shadcn/ui/sidebar.js +3 -256
  78. package/dist/shadcn/ui/skeleton.d.ts +1 -2
  79. package/dist/shadcn/ui/skeleton.js +3 -6
  80. package/dist/shadcn/ui/slider.d.ts +1 -3
  81. package/dist/shadcn/ui/slider.js +3 -12
  82. package/dist/shadcn/ui/spinner.d.ts +1 -2
  83. package/dist/shadcn/ui/spinner.js +3 -7
  84. package/dist/shadcn/ui/switch.d.ts +1 -5
  85. package/dist/shadcn/ui/switch.js +3 -8
  86. package/dist/shadcn/ui/table.d.ts +1 -10
  87. package/dist/shadcn/ui/table.js +3 -29
  88. package/dist/shadcn/ui/tabs.d.ts +1 -13
  89. package/dist/shadcn/ui/tabs.js +3 -29
  90. package/dist/shadcn/ui/textarea.d.ts +1 -3
  91. package/dist/shadcn/ui/textarea.js +3 -7
  92. package/dist/shadcn/ui/toggle-group.d.ts +1 -11
  93. package/dist/shadcn/ui/toggle-group.js +3 -25
  94. package/dist/shadcn/ui/toggle.d.ts +1 -15
  95. package/dist/shadcn/ui/toggle.js +3 -26
  96. package/dist/shadcn/ui/tooltip.d.ts +1 -6
  97. package/dist/shadcn/ui/tooltip.js +3 -17
  98. package/dist/ui/accordion.d.ts +21 -0
  99. package/dist/ui/accordion.js +67 -0
  100. package/dist/ui/alert-dialog.d.ts +32 -0
  101. package/dist/ui/alert-dialog.js +102 -0
  102. package/dist/ui/alert.d.ts +13 -0
  103. package/dist/ui/alert.js +28 -0
  104. package/dist/ui/aspect-ratio.d.ts +5 -0
  105. package/dist/ui/aspect-ratio.js +9 -0
  106. package/dist/ui/avatar.d.ts +14 -0
  107. package/dist/ui/avatar.js +49 -0
  108. package/dist/ui/badge.d.ts +22 -0
  109. package/dist/ui/badge.js +26 -0
  110. package/dist/ui/breadcrumb.d.ts +13 -0
  111. package/dist/ui/breadcrumb.js +29 -0
  112. package/dist/ui/button-group.d.ts +21 -0
  113. package/dist/ui/button-group.js +29 -0
  114. package/dist/ui/button.d.ts +38 -0
  115. package/dist/ui/button.js +49 -0
  116. package/dist/ui/calendar.d.ts +13 -0
  117. package/dist/ui/calendar.js +75 -0
  118. package/dist/ui/card.d.ts +11 -0
  119. package/dist/ui/card.js +25 -0
  120. package/dist/ui/checkbox.d.ts +17 -0
  121. package/dist/ui/checkbox.js +25 -0
  122. package/dist/ui/collapsible.d.ts +11 -0
  123. package/dist/ui/collapsible.js +40 -0
  124. package/dist/ui/command.d.ts +19 -0
  125. package/dist/ui/command.js +35 -0
  126. package/dist/ui/context-menu.d.ts +53 -0
  127. package/dist/ui/context-menu.js +372 -0
  128. package/dist/ui/dialog.d.ts +40 -0
  129. package/dist/ui/dialog.js +109 -0
  130. package/dist/ui/drawer.d.ts +36 -0
  131. package/dist/ui/drawer.js +243 -0
  132. package/dist/ui/dropdown-menu.d.ts +61 -0
  133. package/dist/ui/dropdown-menu.js +347 -0
  134. package/dist/ui/empty.d.ts +14 -0
  135. package/dist/ui/empty.js +33 -0
  136. package/dist/ui/field.d.ts +28 -0
  137. package/dist/ui/field.js +68 -0
  138. package/dist/ui/hover-card.d.ts +32 -0
  139. package/dist/ui/hover-card.js +119 -0
  140. package/dist/ui/input-group.d.ts +28 -0
  141. package/dist/ui/input-group.js +58 -0
  142. package/dist/ui/input.d.ts +3 -0
  143. package/dist/ui/input.js +7 -0
  144. package/dist/ui/item.d.ts +41 -0
  145. package/dist/ui/item.js +69 -0
  146. package/dist/ui/kbd.d.ts +4 -0
  147. package/dist/ui/kbd.js +10 -0
  148. package/dist/ui/label.d.ts +3 -0
  149. package/dist/ui/label.js +8 -0
  150. package/dist/ui/menubar.d.ts +59 -0
  151. package/dist/ui/menubar.js +397 -0
  152. package/dist/ui/navigation-menu.d.ts +24 -0
  153. package/dist/ui/navigation-menu.js +203 -0
  154. package/dist/ui/pagination.d.ts +17 -0
  155. package/dist/ui/pagination.js +36 -0
  156. package/dist/ui/popover.d.ts +25 -0
  157. package/dist/ui/popover.js +126 -0
  158. package/dist/ui/portal.d.ts +7 -0
  159. package/dist/ui/portal.js +12 -0
  160. package/dist/ui/progress.d.ts +15 -0
  161. package/dist/ui/progress.js +36 -0
  162. package/dist/ui/radio-group.d.ts +17 -0
  163. package/dist/ui/radio-group.js +66 -0
  164. package/dist/ui/scroll-area.d.ts +9 -0
  165. package/dist/ui/scroll-area.js +72 -0
  166. package/dist/ui/select.d.ts +37 -0
  167. package/dist/ui/select.js +226 -0
  168. package/dist/ui/separator.d.ts +14 -0
  169. package/dist/ui/separator.js +13 -0
  170. package/dist/ui/sheet.d.ts +31 -0
  171. package/dist/ui/sheet.js +121 -0
  172. package/dist/ui/sidebar.d.ts +86 -0
  173. package/dist/ui/sidebar.js +211 -0
  174. package/dist/ui/skeleton.d.ts +3 -0
  175. package/dist/ui/skeleton.js +7 -0
  176. package/dist/ui/slider.d.ts +18 -0
  177. package/dist/ui/slider.js +94 -0
  178. package/dist/ui/slot.d.ts +27 -0
  179. package/dist/ui/slot.js +62 -0
  180. package/dist/ui/spinner.d.ts +3 -0
  181. package/dist/ui/spinner.js +8 -0
  182. package/dist/ui/switch.d.ts +17 -0
  183. package/dist/ui/switch.js +23 -0
  184. package/dist/ui/table.d.ts +10 -0
  185. package/dist/ui/table.js +29 -0
  186. package/dist/ui/tabs.d.ts +29 -0
  187. package/dist/ui/tabs.js +96 -0
  188. package/dist/ui/textarea.d.ts +3 -0
  189. package/dist/ui/textarea.js +7 -0
  190. package/dist/ui/toggle-group.d.ts +23 -0
  191. package/dist/ui/toggle-group.js +52 -0
  192. package/dist/ui/toggle.d.ts +25 -0
  193. package/dist/ui/toggle.js +41 -0
  194. package/dist/ui/tooltip.d.ts +25 -0
  195. package/dist/ui/tooltip.js +90 -0
  196. package/dist/ui/use-controllable-state.d.ts +10 -0
  197. package/dist/ui/use-controllable-state.js +17 -0
  198. package/dist/ui/use-dismiss.d.ts +10 -0
  199. package/dist/ui/use-dismiss.js +51 -0
  200. package/dist/ui/use-floating.d.ts +42 -0
  201. package/dist/ui/use-floating.js +136 -0
  202. package/dist/ui/use-presence.d.ts +8 -0
  203. package/dist/ui/use-presence.js +48 -0
  204. package/dist/ui/use-typeahead.d.ts +19 -0
  205. package/dist/ui/use-typeahead.js +64 -0
  206. package/package.json +6 -1
  207. package/dist/shadcn/lib/base-ui/LICENSE +0 -21
  208. package/dist/shadcn/lib/base-ui/_chunk-000kmre8.js +0 -150
  209. package/dist/shadcn/lib/base-ui/_chunk-1vw45v38.js +0 -64
  210. package/dist/shadcn/lib/base-ui/_chunk-23rx7haq.js +0 -81
  211. package/dist/shadcn/lib/base-ui/_chunk-242gh8ph.js +0 -230
  212. package/dist/shadcn/lib/base-ui/_chunk-26cc610z.js +0 -6
  213. package/dist/shadcn/lib/base-ui/_chunk-2z044bba.js +0 -5890
  214. package/dist/shadcn/lib/base-ui/_chunk-3cpd1vjz.js +0 -13
  215. package/dist/shadcn/lib/base-ui/_chunk-3enq1vat.js +0 -82
  216. package/dist/shadcn/lib/base-ui/_chunk-3xpke33f.js +0 -23
  217. package/dist/shadcn/lib/base-ui/_chunk-451nqgsa.js +0 -6
  218. package/dist/shadcn/lib/base-ui/_chunk-4maf6pas.js +0 -11
  219. package/dist/shadcn/lib/base-ui/_chunk-4zhfq4d3.js +0 -16
  220. package/dist/shadcn/lib/base-ui/_chunk-5gaqyne5.js +0 -21
  221. package/dist/shadcn/lib/base-ui/_chunk-5tt5hk59.js +0 -4
  222. package/dist/shadcn/lib/base-ui/_chunk-5tze5c8q.js +0 -13
  223. package/dist/shadcn/lib/base-ui/_chunk-5xmdvndx.js +0 -225
  224. package/dist/shadcn/lib/base-ui/_chunk-6adaer33.js +0 -435
  225. package/dist/shadcn/lib/base-ui/_chunk-6ejf1z1r.js +0 -9
  226. package/dist/shadcn/lib/base-ui/_chunk-6kqramh9.js +0 -27
  227. package/dist/shadcn/lib/base-ui/_chunk-7b9dc493.js +0 -14
  228. package/dist/shadcn/lib/base-ui/_chunk-8a9vv8am.js +0 -89
  229. package/dist/shadcn/lib/base-ui/_chunk-8ctgmf06.js +0 -129
  230. package/dist/shadcn/lib/base-ui/_chunk-8ganmsbg.js +0 -54
  231. package/dist/shadcn/lib/base-ui/_chunk-8xaqxgck.js +0 -15
  232. package/dist/shadcn/lib/base-ui/_chunk-95tf2rxq.js +0 -62
  233. package/dist/shadcn/lib/base-ui/_chunk-9x63vfqj.js +0 -70
  234. package/dist/shadcn/lib/base-ui/_chunk-ase0ydtt.js +0 -9
  235. package/dist/shadcn/lib/base-ui/_chunk-b0nc8wq7.js +0 -34
  236. package/dist/shadcn/lib/base-ui/_chunk-b5ya6xds.js +0 -10
  237. package/dist/shadcn/lib/base-ui/_chunk-b6dkjkbw.js +0 -43
  238. package/dist/shadcn/lib/base-ui/_chunk-c2bz952e.js +0 -19
  239. package/dist/shadcn/lib/base-ui/_chunk-cdgfsr3q.js +0 -15
  240. package/dist/shadcn/lib/base-ui/_chunk-cdj8cpx5.js +0 -347
  241. package/dist/shadcn/lib/base-ui/_chunk-cgptgywc.js +0 -104
  242. package/dist/shadcn/lib/base-ui/_chunk-cwvtvwc7.js +0 -35
  243. package/dist/shadcn/lib/base-ui/_chunk-dan0mva4.js +0 -23
  244. package/dist/shadcn/lib/base-ui/_chunk-dzvjwv25.js +0 -0
  245. package/dist/shadcn/lib/base-ui/_chunk-e13rsb6b.js +0 -184
  246. package/dist/shadcn/lib/base-ui/_chunk-e56mpvk1.js +0 -118
  247. package/dist/shadcn/lib/base-ui/_chunk-e6k2ecs7.js +0 -48
  248. package/dist/shadcn/lib/base-ui/_chunk-ebyxgtb4.js +0 -29
  249. package/dist/shadcn/lib/base-ui/_chunk-f2wttwrf.js +0 -39
  250. package/dist/shadcn/lib/base-ui/_chunk-fdzctasg.js +0 -38
  251. package/dist/shadcn/lib/base-ui/_chunk-ffpjy0ta.js +0 -39
  252. package/dist/shadcn/lib/base-ui/_chunk-fqry7pew.js +0 -603
  253. package/dist/shadcn/lib/base-ui/_chunk-ghn1tzt8.js +0 -84
  254. package/dist/shadcn/lib/base-ui/_chunk-gy0bpkmx.js +0 -12
  255. package/dist/shadcn/lib/base-ui/_chunk-hm5h9vsk.js +0 -16
  256. package/dist/shadcn/lib/base-ui/_chunk-htdj1jps.js +0 -833
  257. package/dist/shadcn/lib/base-ui/_chunk-j29xjete.js +0 -146
  258. package/dist/shadcn/lib/base-ui/_chunk-j3qkyd10.js +0 -50
  259. package/dist/shadcn/lib/base-ui/_chunk-ktvsd5k6.js +0 -2386
  260. package/dist/shadcn/lib/base-ui/_chunk-kw8nnq00.js +0 -546
  261. package/dist/shadcn/lib/base-ui/_chunk-m307wpdj.js +0 -18
  262. package/dist/shadcn/lib/base-ui/_chunk-mnd0j7v9.js +0 -15
  263. package/dist/shadcn/lib/base-ui/_chunk-n11h505c.js +0 -32
  264. package/dist/shadcn/lib/base-ui/_chunk-p0e2qacz.js +0 -26
  265. package/dist/shadcn/lib/base-ui/_chunk-pv7b791x.js +0 -106
  266. package/dist/shadcn/lib/base-ui/_chunk-q5cg71p7.js +0 -83
  267. package/dist/shadcn/lib/base-ui/_chunk-qbezxj1g.js +0 -385
  268. package/dist/shadcn/lib/base-ui/_chunk-qmsqz6nt.js +0 -15
  269. package/dist/shadcn/lib/base-ui/_chunk-rrh8rt4v.js +0 -65
  270. package/dist/shadcn/lib/base-ui/_chunk-s5pwkz8v.js +0 -25
  271. package/dist/shadcn/lib/base-ui/_chunk-svxv97ph.js +0 -218
  272. package/dist/shadcn/lib/base-ui/_chunk-t7ppm3t0.js +0 -68
  273. package/dist/shadcn/lib/base-ui/_chunk-vg16xxmb.js +0 -52
  274. package/dist/shadcn/lib/base-ui/_chunk-vgkfmtbe.js +0 -21
  275. package/dist/shadcn/lib/base-ui/_chunk-watha94s.js +0 -14
  276. package/dist/shadcn/lib/base-ui/_chunk-wdqynnjf.js +0 -35
  277. package/dist/shadcn/lib/base-ui/_chunk-wx2nxg0p.js +0 -15
  278. package/dist/shadcn/lib/base-ui/_chunk-x11e1k9r.js +0 -0
  279. package/dist/shadcn/lib/base-ui/_chunk-x8xehj6d.js +0 -302
  280. package/dist/shadcn/lib/base-ui/_chunk-xcqbtm2f.js +0 -28
  281. package/dist/shadcn/lib/base-ui/_chunk-ytnp24gq.js +0 -328
  282. package/dist/shadcn/lib/base-ui/_chunk-yzr7eg4b.js +0 -6
  283. package/dist/shadcn/lib/base-ui/_chunk-zk4mtm9m.js +0 -9
  284. package/dist/shadcn/lib/base-ui/accordion.d.ts +0 -447
  285. package/dist/shadcn/lib/base-ui/accordion.js +0 -630
  286. package/dist/shadcn/lib/base-ui/alert-dialog.d.ts +0 -1467
  287. package/dist/shadcn/lib/base-ui/alert-dialog.js +0 -98
  288. package/dist/shadcn/lib/base-ui/avatar.d.ts +0 -123
  289. package/dist/shadcn/lib/base-ui/avatar.js +0 -235
  290. package/dist/shadcn/lib/base-ui/button.d.ts +0 -84
  291. package/dist/shadcn/lib/base-ui/button.js +0 -51
  292. package/dist/shadcn/lib/base-ui/checkbox.d.ts +0 -341
  293. package/dist/shadcn/lib/base-ui/checkbox.js +0 -501
  294. package/dist/shadcn/lib/base-ui/collapsible.d.ts +0 -291
  295. package/dist/shadcn/lib/base-ui/collapsible.js +0 -264
  296. package/dist/shadcn/lib/base-ui/context-menu.d.ts +0 -2213
  297. package/dist/shadcn/lib/base-ui/context-menu.js +0 -323
  298. package/dist/shadcn/lib/base-ui/dialog.d.ts +0 -1448
  299. package/dist/shadcn/lib/base-ui/dialog.js +0 -79
  300. package/dist/shadcn/lib/base-ui/input.d.ts +0 -506
  301. package/dist/shadcn/lib/base-ui/input.js +0 -1027
  302. package/dist/shadcn/lib/base-ui/menu.d.ts +0 -2275
  303. package/dist/shadcn/lib/base-ui/menu.js +0 -60
  304. package/dist/shadcn/lib/base-ui/menubar.d.ts +0 -48
  305. package/dist/shadcn/lib/base-ui/menubar.js +0 -156
  306. package/dist/shadcn/lib/base-ui/merge-props.d.ts +0 -70
  307. package/dist/shadcn/lib/base-ui/merge-props.js +0 -15
  308. package/dist/shadcn/lib/base-ui/navigation-menu.d.ts +0 -825
  309. package/dist/shadcn/lib/base-ui/navigation-menu.js +0 -1849
  310. package/dist/shadcn/lib/base-ui/popover.d.ts +0 -1743
  311. package/dist/shadcn/lib/base-ui/popover.js +0 -1089
  312. package/dist/shadcn/lib/base-ui/preview-card.d.ts +0 -1608
  313. package/dist/shadcn/lib/base-ui/preview-card.js +0 -919
  314. package/dist/shadcn/lib/base-ui/progress.d.ts +0 -172
  315. package/dist/shadcn/lib/base-ui/progress.js +0 -272
  316. package/dist/shadcn/lib/base-ui/radio-group.d.ts +0 -260
  317. package/dist/shadcn/lib/base-ui/radio-group.js +0 -239
  318. package/dist/shadcn/lib/base-ui/radio.d.ts +0 -176
  319. package/dist/shadcn/lib/base-ui/radio.js +0 -387
  320. package/dist/shadcn/lib/base-ui/scroll-area.d.ts +0 -241
  321. package/dist/shadcn/lib/base-ui/scroll-area.js +0 -1055
  322. package/dist/shadcn/lib/base-ui/select.d.ts +0 -1266
  323. package/dist/shadcn/lib/base-ui/select.js +0 -2450
  324. package/dist/shadcn/lib/base-ui/separator.d.ts +0 -76
  325. package/dist/shadcn/lib/base-ui/separator.js +0 -11
  326. package/dist/shadcn/lib/base-ui/slider.d.ts +0 -551
  327. package/dist/shadcn/lib/base-ui/slider.js +0 -1583
  328. package/dist/shadcn/lib/base-ui/switch.d.ts +0 -313
  329. package/dist/shadcn/lib/base-ui/switch.js +0 -326
  330. package/dist/shadcn/lib/base-ui/tabs.d.ts +0 -406
  331. package/dist/shadcn/lib/base-ui/tabs.js +0 -915
  332. package/dist/shadcn/lib/base-ui/toggle-group.d.ts +0 -235
  333. package/dist/shadcn/lib/base-ui/toggle-group.js +0 -145
  334. package/dist/shadcn/lib/base-ui/toggle.d.ts +0 -224
  335. package/dist/shadcn/lib/base-ui/toggle.js +0 -127
  336. package/dist/shadcn/lib/base-ui/tooltip.d.ts +0 -1656
  337. package/dist/shadcn/lib/base-ui/tooltip.js +0 -920
  338. package/dist/shadcn/lib/base-ui/use-render.d.ts +0 -87
  339. package/dist/shadcn/lib/base-ui/use-render.js +0 -15
@@ -0,0 +1,36 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { cn } from "../shadcn/lib/utils.js";
4
+ import { Button } from "./button.js";
5
+ import { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon, } from "../icons/index.js";
6
+ function Pagination({ className, ...props }) {
7
+ return (_jsx("nav", { role: "navigation", "aria-label": "pagination", "data-slot": "pagination", className: cn("mx-auto flex w-full justify-center", className), ...props }));
8
+ }
9
+ function PaginationContent({ className, ...props }) {
10
+ return (_jsx("ul", { "data-slot": "pagination-content", className: cn("flex items-center gap-1", className), ...props }));
11
+ }
12
+ function PaginationItem({ ...props }) {
13
+ return _jsx("li", { "data-slot": "pagination-item", ...props });
14
+ }
15
+ function PaginationLink({ className, isActive, size = "icon", onKeyDown, ...props }) {
16
+ // An <a> without href is not focusable or Enter/Space-activatable, so for
17
+ // SPA usage (onClick, no href) add button semantics + keyboard activation.
18
+ const isRealLink = props.href != null;
19
+ return (_jsx(Button, { asChild: true, variant: isActive ? "outline" : "ghost", size: size, className: cn("cursor-pointer", className), children: _jsx("a", { "aria-current": isActive ? "page" : undefined, "data-slot": "pagination-link", "data-active": isActive, role: isRealLink ? undefined : "button", tabIndex: isRealLink ? undefined : 0, onKeyDown: (e) => {
20
+ onKeyDown?.(e);
21
+ if (!isRealLink && !e.defaultPrevented && (e.key === "Enter" || e.key === " ")) {
22
+ e.preventDefault();
23
+ e.currentTarget.click();
24
+ }
25
+ }, ...props }) }));
26
+ }
27
+ function PaginationPrevious({ className, text = "Previous", ...props }) {
28
+ return (_jsxs(PaginationLink, { "aria-label": "Go to previous page", size: "default", className: cn("pl-2!", className), ...props, children: [_jsx(ChevronLeftIcon, {}), _jsx("span", { className: "hidden sm:block", children: text })] }));
29
+ }
30
+ function PaginationNext({ className, text = "Next", ...props }) {
31
+ return (_jsxs(PaginationLink, { "aria-label": "Go to next page", size: "default", className: cn("pr-2!", className), ...props, children: [_jsx("span", { className: "hidden sm:block", children: text }), _jsx(ChevronRightIcon, {})] }));
32
+ }
33
+ function PaginationEllipsis({ className, ...props }) {
34
+ return (_jsxs("span", { "aria-hidden": true, "data-slot": "pagination-ellipsis", className: cn("flex size-9 items-center justify-center [&_svg:not([class*='size-'])]:size-4", className), ...props, children: [_jsx(MoreHorizontalIcon, {}), _jsx("span", { className: "sr-only", children: "More pages" })] }));
35
+ }
36
+ export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, };
@@ -0,0 +1,25 @@
1
+ import * as React from "react";
2
+ import { type Side, type Align } from "./use-floating.js";
3
+ export interface PopoverProps {
4
+ open?: boolean;
5
+ defaultOpen?: boolean;
6
+ onOpenChange?: (open: boolean) => void;
7
+ children?: React.ReactNode;
8
+ }
9
+ declare function Popover({ open, defaultOpen, onOpenChange, children }: PopoverProps): React.JSX.Element;
10
+ declare function PopoverTrigger({ asChild, render, nativeButton: _nativeButton, children, onClick, ...props }: React.ComponentProps<"button"> & {
11
+ asChild?: boolean;
12
+ render?: React.ReactElement;
13
+ nativeButton?: boolean;
14
+ }): React.JSX.Element;
15
+ export interface PopoverContentProps extends React.ComponentProps<"div"> {
16
+ side?: Side;
17
+ align?: Align;
18
+ sideOffset?: number;
19
+ alignOffset?: number;
20
+ }
21
+ declare function PopoverContent({ className, style, ref, align, alignOffset, side, sideOffset, onKeyDown, ...props }: PopoverContentProps): React.JSX.Element | null;
22
+ declare function PopoverHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
23
+ declare function PopoverTitle({ className, ...props }: React.ComponentProps<"h2">): React.JSX.Element;
24
+ declare function PopoverDescription({ className, ...props }: React.ComponentProps<"p">): React.JSX.Element;
25
+ export { Popover, PopoverTrigger, PopoverContent, PopoverHeader, PopoverTitle, PopoverDescription, };
@@ -0,0 +1,126 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { cn } from "../shadcn/lib/utils.js";
5
+ import { Slot, mergeRefs, resolveRender } from "./slot.js";
6
+ import { Portal } from "./portal.js";
7
+ import { useFloating } from "./use-floating.js";
8
+ import { useDismiss } from "./use-dismiss.js";
9
+ import { usePresence } from "./use-presence.js";
10
+ import { useControllableState } from "./use-controllable-state.js";
11
+ const PopoverContext = React.createContext(null);
12
+ function usePopover() {
13
+ const ctx = React.useContext(PopoverContext);
14
+ if (!ctx)
15
+ throw new Error("Popover parts must be used within <Popover>");
16
+ return ctx;
17
+ }
18
+ function Popover({ open, defaultOpen = false, onOpenChange, children }) {
19
+ const [isOpen, setOpen] = useControllableState({
20
+ value: open,
21
+ defaultValue: defaultOpen,
22
+ onChange: onOpenChange,
23
+ });
24
+ const triggerRef = React.useRef(null);
25
+ const contentId = React.useId();
26
+ return (_jsx(PopoverContext.Provider, { value: { open: isOpen, setOpen, triggerRef, contentId }, children: children }));
27
+ }
28
+ function PopoverTrigger({ asChild = false, render, nativeButton: _nativeButton, children, onClick, ...props }) {
29
+ const { open, setOpen, triggerRef, contentId } = usePopover();
30
+ const { useSlot, slotChild } = resolveRender(asChild, render, children);
31
+ const Comp = useSlot ? Slot : "button";
32
+ return (_jsx(Comp, { ref: triggerRef, type: useSlot ? undefined : "button", "data-slot": "popover-trigger", "aria-haspopup": "dialog", "aria-expanded": open, "aria-controls": open ? contentId : undefined, "data-state": open ? "open" : "closed", onClick: (e) => {
33
+ onClick?.(e);
34
+ if (!e.defaultPrevented)
35
+ setOpen(!open);
36
+ }, ...props, children: slotChild }));
37
+ }
38
+ // Tabbable descendants, in DOM order, for focus-in and the Tab trap.
39
+ const FOCUSABLE_SELECTOR = 'a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])';
40
+ function PopoverContent({ className, style, ref, align = "center", alignOffset = 0, side = "bottom", sideOffset = 4, onKeyDown, ...props }) {
41
+ const { open, setOpen, triggerRef, contentId } = usePopover();
42
+ const [mounted, presenceRef] = usePresence(open);
43
+ const { floatingRef, pos } = useFloating(triggerRef, mounted, {
44
+ side,
45
+ align,
46
+ sideOffset,
47
+ alignOffset,
48
+ });
49
+ const contentRef = React.useRef(null);
50
+ useDismiss(open, () => setOpen(false), [triggerRef, floatingRef]);
51
+ // Move focus into the popover when it opens and restore it to the trigger on
52
+ // close — a role="dialog" must manage focus (native <dialog> does this for
53
+ // free; this portaled div does not).
54
+ React.useEffect(() => {
55
+ if (!open)
56
+ return;
57
+ const trigger = triggerRef.current;
58
+ let raf = 0;
59
+ // Retry across frames until the content is mounted AND visible: presence
60
+ // mounts it a tick after `open` flips, and it stays visibility:hidden until
61
+ // useFloating positions it — focus() on a missing or hidden node is a silent
62
+ // no-op. The effect cleanup cancels this when the popover closes.
63
+ const focusIn = () => {
64
+ const node = contentRef.current;
65
+ if (!node || getComputedStyle(node).visibility === "hidden") {
66
+ raf = requestAnimationFrame(focusIn);
67
+ return;
68
+ }
69
+ const first = node.querySelector(FOCUSABLE_SELECTOR);
70
+ (first ?? node).focus();
71
+ };
72
+ raf = requestAnimationFrame(focusIn);
73
+ return () => {
74
+ cancelAnimationFrame(raf);
75
+ // Only reclaim focus if it is still inside the popover (an outside click
76
+ // already moved it elsewhere — don't yank it back).
77
+ const node = contentRef.current;
78
+ if (trigger && node && node.contains(document.activeElement))
79
+ trigger.focus();
80
+ };
81
+ }, [open, triggerRef]);
82
+ if (!mounted)
83
+ return null;
84
+ return (_jsx(Portal, { children: _jsx("div", { ref: mergeRefs(floatingRef, presenceRef, contentRef, ref), id: contentId, role: "dialog", tabIndex: -1, "data-slot": "popover-content", "data-state": open ? "open" : "closed", "data-open": open ? "" : undefined, "data-closed": open ? undefined : "", "data-side": pos?.side ?? side, onKeyDown: (e) => {
85
+ onKeyDown?.(e);
86
+ if (e.defaultPrevented || e.key !== "Tab")
87
+ return;
88
+ const node = contentRef.current;
89
+ if (!node)
90
+ return;
91
+ const focusables = Array.from(node.querySelectorAll(FOCUSABLE_SELECTOR)).filter((el) => el.offsetParent !== null || el === document.activeElement);
92
+ if (focusables.length === 0) {
93
+ e.preventDefault();
94
+ node.focus();
95
+ return;
96
+ }
97
+ const first = focusables[0];
98
+ const last = focusables[focusables.length - 1];
99
+ const activeEl = document.activeElement;
100
+ if (e.shiftKey && (activeEl === first || activeEl === node)) {
101
+ e.preventDefault();
102
+ last.focus();
103
+ }
104
+ else if (!e.shiftKey && activeEl === last) {
105
+ e.preventDefault();
106
+ first.focus();
107
+ }
108
+ }, style: {
109
+ ...style,
110
+ position: "fixed",
111
+ left: pos?.x ?? 0,
112
+ top: pos?.y ?? 0,
113
+ visibility: pos ? "visible" : "hidden",
114
+ ["--transform-origin"]: pos?.transformOrigin ?? "center",
115
+ }, className: cn("isolate z-50 flex w-72 origin-(--transform-origin) flex-col gap-4 rounded-md bg-popover p-4 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className), ...props }) }));
116
+ }
117
+ function PopoverHeader({ className, ...props }) {
118
+ return (_jsx("div", { "data-slot": "popover-header", className: cn("flex flex-col gap-1 text-sm", className), ...props }));
119
+ }
120
+ function PopoverTitle({ className, ...props }) {
121
+ return (_jsx("h2", { "data-slot": "popover-title", className: cn("font-medium", className), ...props }));
122
+ }
123
+ function PopoverDescription({ className, ...props }) {
124
+ return (_jsx("p", { "data-slot": "popover-description", className: cn("text-muted-foreground", className), ...props }));
125
+ }
126
+ export { Popover, PopoverTrigger, PopoverContent, PopoverHeader, PopoverTitle, PopoverDescription, };
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ /** Render children into `container` (defaults to document.body), SSR-safe. */
3
+ declare function Portal({ children, container, }: {
4
+ children: React.ReactNode;
5
+ container?: Element | null;
6
+ }): React.ReactPortal | null;
7
+ export { Portal };
@@ -0,0 +1,12 @@
1
+ "use client";
2
+ import * as React from "react";
3
+ import { createPortal } from "react-dom";
4
+ /** Render children into `container` (defaults to document.body), SSR-safe. */
5
+ function Portal({ children, container, }) {
6
+ const [mounted, setMounted] = React.useState(false);
7
+ React.useEffect(() => setMounted(true), []);
8
+ if (!mounted)
9
+ return null;
10
+ return createPortal(children, container ?? document.body);
11
+ }
12
+ export { Portal };
@@ -0,0 +1,15 @@
1
+ import * as React from "react";
2
+ export interface ProgressProps extends React.ComponentProps<"div"> {
3
+ value?: number | null;
4
+ max?: number;
5
+ }
6
+ /**
7
+ * Self-contained progress bar. Presentational only — exposes value/max via
8
+ * context so the indicator can size itself and the value label can format.
9
+ */
10
+ declare function Progress({ className, children, value, max, ...props }: ProgressProps): React.JSX.Element;
11
+ declare function ProgressTrack({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
12
+ declare function ProgressIndicator({ className, style, ...props }: React.ComponentProps<"div">): React.JSX.Element;
13
+ declare function ProgressLabel({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
14
+ declare function ProgressValue({ className, children, ...props }: React.ComponentProps<"span">): React.JSX.Element;
15
+ export { Progress, ProgressTrack, ProgressIndicator, ProgressLabel, ProgressValue, };
@@ -0,0 +1,36 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { cn } from "../shadcn/lib/utils.js";
5
+ const ProgressContext = React.createContext({
6
+ value: null,
7
+ max: 100,
8
+ });
9
+ function usePercent() {
10
+ const { value, max } = React.useContext(ProgressContext);
11
+ if (value == null)
12
+ return null;
13
+ return Math.min(100, Math.max(0, (value / max) * 100));
14
+ }
15
+ /**
16
+ * Self-contained progress bar. Presentational only — exposes value/max via
17
+ * context so the indicator can size itself and the value label can format.
18
+ */
19
+ function Progress({ className, children, value = null, max = 100, ...props }) {
20
+ return (_jsx(ProgressContext.Provider, { value: { value, max }, children: _jsxs("div", { role: "progressbar", "aria-valuemin": 0, "aria-valuemax": max, "aria-valuenow": value ?? undefined, "data-slot": "progress", className: cn("flex flex-wrap gap-3", className), ...props, children: [children, _jsx(ProgressTrack, { children: _jsx(ProgressIndicator, {}) })] }) }));
21
+ }
22
+ function ProgressTrack({ className, ...props }) {
23
+ return (_jsx("div", { "data-slot": "progress-track", className: cn("relative flex h-1.5 w-full items-center overflow-x-hidden rounded-full bg-muted", className), ...props }));
24
+ }
25
+ function ProgressIndicator({ className, style, ...props }) {
26
+ const percent = usePercent();
27
+ return (_jsx("div", { "data-slot": "progress-indicator", className: cn("h-full bg-primary transition-all", className), style: { width: `${percent ?? 0}%`, ...style }, ...props }));
28
+ }
29
+ function ProgressLabel({ className, ...props }) {
30
+ return (_jsx("span", { "data-slot": "progress-label", className: cn("text-sm font-medium", className), ...props }));
31
+ }
32
+ function ProgressValue({ className, children, ...props }) {
33
+ const percent = usePercent();
34
+ return (_jsx("span", { "data-slot": "progress-value", className: cn("ml-auto text-sm text-muted-foreground tabular-nums", className), ...props, children: children ?? (percent == null ? null : `${Math.round(percent)}%`) }));
35
+ }
36
+ export { Progress, ProgressTrack, ProgressIndicator, ProgressLabel, ProgressValue, };
@@ -0,0 +1,17 @@
1
+ import * as React from "react";
2
+ export interface RadioGroupProps extends Omit<React.ComponentProps<"div">, "onChange" | "defaultValue"> {
3
+ value?: string;
4
+ defaultValue?: string;
5
+ onValueChange?: (value: string) => void;
6
+ name?: string;
7
+ }
8
+ /**
9
+ * Self-contained radio group. Single-select with roving tab index and arrow-key
10
+ * navigation that moves focus and selection together (WAI-ARIA radiogroup).
11
+ */
12
+ declare function RadioGroup({ className, value, defaultValue, onValueChange, name, onKeyDown, ...props }: RadioGroupProps): React.JSX.Element;
13
+ export interface RadioGroupItemProps extends Omit<React.ComponentProps<"button">, "value"> {
14
+ value: string;
15
+ }
16
+ declare function RadioGroupItem({ className, value, onClick, disabled, ref, ...props }: RadioGroupItemProps): React.JSX.Element;
17
+ export { RadioGroup, RadioGroupItem };
@@ -0,0 +1,66 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { cn } from "../shadcn/lib/utils.js";
5
+ import { mergeRefs } from "./slot.js";
6
+ import { useControllableState } from "./use-controllable-state.js";
7
+ const RadioGroupContext = React.createContext(null);
8
+ function useRadioGroup() {
9
+ const ctx = React.useContext(RadioGroupContext);
10
+ if (!ctx)
11
+ throw new Error("RadioGroupItem must be used within <RadioGroup>");
12
+ return ctx;
13
+ }
14
+ /**
15
+ * Self-contained radio group. Single-select with roving tab index and arrow-key
16
+ * navigation that moves focus and selection together (WAI-ARIA radiogroup).
17
+ */
18
+ function RadioGroup({ className, value, defaultValue, onValueChange, name, onKeyDown, ...props }) {
19
+ const [selected, setSelected] = useControllableState({
20
+ value,
21
+ defaultValue,
22
+ onChange: onValueChange,
23
+ });
24
+ return (_jsxs(RadioGroupContext.Provider, { value: { value: selected, setValue: setSelected, name }, children: [_jsx("div", { role: "radiogroup", "data-slot": "radio-group", className: cn("grid w-full gap-3", className), onKeyDown: (e) => {
25
+ onKeyDown?.(e);
26
+ if (e.defaultPrevented)
27
+ return;
28
+ if (!["ArrowDown", "ArrowRight", "ArrowUp", "ArrowLeft"].includes(e.key))
29
+ return;
30
+ const radios = Array.from(e.currentTarget.querySelectorAll('[role="radio"]:not([disabled]):not([data-disabled])'));
31
+ const current = radios.indexOf(document.activeElement);
32
+ if (current < 0)
33
+ return;
34
+ e.preventDefault();
35
+ const forward = e.key === "ArrowDown" || e.key === "ArrowRight";
36
+ const next = forward
37
+ ? (current + 1) % radios.length
38
+ : (current - 1 + radios.length) % radios.length;
39
+ radios[next].focus();
40
+ radios[next].click();
41
+ }, ...props }), name ? (_jsx("input", { type: "hidden", name: name, value: selected ?? "" })) : null] }));
42
+ }
43
+ function RadioGroupItem({ className, value, onClick, disabled, ref, ...props }) {
44
+ const { value: selected, setValue } = useRadioGroup();
45
+ const checked = selected === value;
46
+ const btnRef = React.useRef(null);
47
+ // Roving tab index: the checked radio is the single tab stop. When nothing is
48
+ // checked, only the first enabled radio is tabbable — making every radio
49
+ // tabbable would put multiple stops in Tab order, breaking the radiogroup
50
+ // pattern.
51
+ const [isFirstEnabled, setIsFirstEnabled] = React.useState(false);
52
+ React.useLayoutEffect(() => {
53
+ if (selected !== undefined)
54
+ return;
55
+ const el = btnRef.current;
56
+ const first = el?.parentElement?.querySelector('[role="radio"]:not([disabled]):not([data-disabled])');
57
+ setIsFirstEnabled(first === el);
58
+ });
59
+ const tabbable = checked || (selected === undefined && isFirstEnabled);
60
+ return (_jsx("button", { ref: mergeRefs(btnRef, ref), type: "button", role: "radio", "aria-checked": checked, disabled: disabled, tabIndex: tabbable ? 0 : -1, "data-slot": "radio-group-item", "data-state": checked ? "checked" : "unchecked", "data-checked": checked ? "" : undefined, className: cn("cursor-pointer group/radio-group-item peer relative flex aspect-square size-4 shrink-0 items-center justify-center rounded-full border border-input outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary", className), onClick: (e) => {
61
+ onClick?.(e);
62
+ if (!e.defaultPrevented)
63
+ setValue(value);
64
+ }, ...props, children: checked ? (_jsx("span", { "data-slot": "radio-group-indicator", className: "size-2 rounded-full bg-primary-foreground" })) : null }));
65
+ }
66
+ export { RadioGroup, RadioGroupItem };
@@ -0,0 +1,9 @@
1
+ import * as React from "react";
2
+ /**
3
+ * Self-contained scroll area: a native-overflow viewport with the platform
4
+ * scrollbar hidden, plus a custom thumb synced to scroll position and draggable.
5
+ * Vertical and horizontal bars appear only when their axis overflows.
6
+ */
7
+ declare function ScrollArea({ className, children, ...props }: React.ComponentProps<"div">): React.JSX.Element;
8
+ declare function ScrollBar(_props: React.ComponentProps<"div">): null;
9
+ export { ScrollArea, ScrollBar };
@@ -0,0 +1,72 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { cn } from "../shadcn/lib/utils.js";
5
+ /**
6
+ * Self-contained scroll area: a native-overflow viewport with the platform
7
+ * scrollbar hidden, plus a custom thumb synced to scroll position and draggable.
8
+ * Vertical and horizontal bars appear only when their axis overflows.
9
+ */
10
+ function ScrollArea({ className, children, ...props }) {
11
+ const viewportRef = React.useRef(null);
12
+ const [thumb, setThumb] = React.useState({
13
+ vSize: 0,
14
+ vPos: 0,
15
+ hSize: 0,
16
+ hPos: 0,
17
+ });
18
+ const sync = React.useCallback(() => {
19
+ const vp = viewportRef.current;
20
+ if (!vp)
21
+ return;
22
+ const { scrollTop, scrollHeight, clientHeight, scrollLeft, scrollWidth, clientWidth } = vp;
23
+ setThumb({
24
+ vSize: scrollHeight > clientHeight ? (clientHeight / scrollHeight) * 100 : 0,
25
+ vPos: scrollHeight > clientHeight ? (scrollTop / scrollHeight) * 100 : 0,
26
+ hSize: scrollWidth > clientWidth ? (clientWidth / scrollWidth) * 100 : 0,
27
+ hPos: scrollWidth > clientWidth ? (scrollLeft / scrollWidth) * 100 : 0,
28
+ });
29
+ }, []);
30
+ React.useLayoutEffect(() => {
31
+ sync();
32
+ const vp = viewportRef.current;
33
+ if (!vp)
34
+ return;
35
+ const ro = new ResizeObserver(sync);
36
+ ro.observe(vp);
37
+ for (const child of Array.from(vp.children))
38
+ ro.observe(child);
39
+ return () => ro.disconnect();
40
+ }, [sync]);
41
+ const dragBar = (axis) => (e) => {
42
+ const vp = viewportRef.current;
43
+ if (!vp)
44
+ return;
45
+ const startPos = axis === "v" ? e.clientY : e.clientX;
46
+ const startScroll = axis === "v" ? vp.scrollTop : vp.scrollLeft;
47
+ const track = e.currentTarget;
48
+ const trackLen = axis === "v" ? track.clientHeight : track.clientWidth;
49
+ const scrollLen = axis === "v" ? vp.scrollHeight : vp.scrollWidth;
50
+ track.setPointerCapture(e.pointerId);
51
+ const onMove = (ev) => {
52
+ const delta = (axis === "v" ? ev.clientY : ev.clientX) - startPos;
53
+ const next = startScroll + (delta / trackLen) * scrollLen;
54
+ if (axis === "v")
55
+ vp.scrollTop = next;
56
+ else
57
+ vp.scrollLeft = next;
58
+ };
59
+ const onUp = (ev) => {
60
+ track.releasePointerCapture(ev.pointerId);
61
+ track.removeEventListener("pointermove", onMove);
62
+ track.removeEventListener("pointerup", onUp);
63
+ };
64
+ track.addEventListener("pointermove", onMove);
65
+ track.addEventListener("pointerup", onUp);
66
+ };
67
+ return (_jsxs("div", { "data-slot": "scroll-area", className: cn("relative overflow-hidden", className), ...props, children: [_jsx("div", { ref: viewportRef, "data-slot": "scroll-area-viewport", onScroll: sync, className: "size-full overflow-auto rounded-[inherit] outline-none [-ms-overflow-style:none] [scrollbar-width:none] focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 [&::-webkit-scrollbar]:hidden", children: children }), thumb.vSize > 0 && (_jsx("div", { "data-slot": "scroll-area-scrollbar", "data-orientation": "vertical", onPointerDown: dragBar("v"), className: "absolute top-0 right-0 bottom-0 w-2.5 touch-none p-px select-none", children: _jsx("div", { "data-slot": "scroll-area-thumb", className: "absolute inset-x-px rounded-full bg-border", style: { height: `${thumb.vSize}%`, top: `${thumb.vPos}%` } }) })), thumb.hSize > 0 && (_jsx("div", { "data-slot": "scroll-area-scrollbar", "data-orientation": "horizontal", onPointerDown: dragBar("h"), className: "absolute right-0 bottom-0 left-0 h-2.5 touch-none p-px select-none", children: _jsx("div", { "data-slot": "scroll-area-thumb", className: "absolute inset-y-px rounded-full bg-border", style: { width: `${thumb.hSize}%`, left: `${thumb.hPos}%` } }) }))] }));
68
+ }
69
+ function ScrollBar(_props) {
70
+ return null;
71
+ }
72
+ export { ScrollArea, ScrollBar };
@@ -0,0 +1,37 @@
1
+ import * as React from "react";
2
+ import { type Side, type Align } from "./use-floating.js";
3
+ export interface SelectProps {
4
+ value?: string;
5
+ defaultValue?: string;
6
+ onValueChange?: (value: string) => void;
7
+ open?: boolean;
8
+ defaultOpen?: boolean;
9
+ onOpenChange?: (open: boolean) => void;
10
+ children?: React.ReactNode;
11
+ }
12
+ declare function Select({ value, defaultValue, onValueChange, open, defaultOpen, onOpenChange, children, }: SelectProps): React.JSX.Element;
13
+ declare function SelectGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
14
+ declare function SelectValue({ className, placeholder, ...props }: React.ComponentProps<"span"> & {
15
+ placeholder?: React.ReactNode;
16
+ }): React.JSX.Element;
17
+ declare function SelectTrigger({ className, size, children, onClick, onKeyDown, ...props }: React.ComponentProps<"button"> & {
18
+ size?: "sm" | "default";
19
+ }): React.JSX.Element;
20
+ export interface SelectContentProps extends React.ComponentProps<"div"> {
21
+ side?: Side;
22
+ align?: Align;
23
+ sideOffset?: number;
24
+ alignOffset?: number;
25
+ }
26
+ declare function SelectContent({ className, children, side, sideOffset, align, alignOffset, onKeyDown, ...props }: SelectContentProps): React.JSX.Element;
27
+ declare function SelectLabel({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
28
+ export interface SelectItemProps extends Omit<React.ComponentProps<"div">, "value"> {
29
+ value: string;
30
+ disabled?: boolean;
31
+ }
32
+ declare function SelectItem({ className, children, value, disabled, onClick, ...props }: SelectItemProps): React.JSX.Element;
33
+ declare function SelectSeparator({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
34
+ /** No-op scroll buttons — native overflow handles scrolling. Kept for API parity. */
35
+ declare function SelectScrollUpButton(_props: React.ComponentProps<"div">): null;
36
+ declare function SelectScrollDownButton(_props: React.ComponentProps<"div">): null;
37
+ export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, };