@stevederico/skateboard-ui 3.11.0 → 4.0.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 (336) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +37 -31
  3. package/dist/shadcn/ui/accordion.d.ts +1 -6
  4. package/dist/shadcn/ui/accordion.js +3 -17
  5. package/dist/shadcn/ui/alert-dialog.d.ts +1 -18
  6. package/dist/shadcn/ui/alert-dialog.js +3 -43
  7. package/dist/shadcn/ui/alert.d.ts +1 -13
  8. package/dist/shadcn/ui/alert.js +3 -28
  9. package/dist/shadcn/ui/aspect-ratio.d.ts +1 -4
  10. package/dist/shadcn/ui/aspect-ratio.js +3 -8
  11. package/dist/shadcn/ui/avatar.d.ts +1 -11
  12. package/dist/shadcn/ui/avatar.js +3 -24
  13. package/dist/shadcn/ui/badge.d.ts +1 -14
  14. package/dist/shadcn/ui/badge.js +3 -33
  15. package/dist/shadcn/ui/breadcrumb.d.ts +1 -10
  16. package/dist/shadcn/ui/breadcrumb.js +3 -37
  17. package/dist/shadcn/ui/button-group.d.ts +1 -13
  18. package/dist/shadcn/ui/button-group.js +3 -36
  19. package/dist/shadcn/ui/button.d.ts +1 -34
  20. package/dist/shadcn/ui/button.js +3 -48
  21. package/dist/shadcn/ui/calendar.d.ts +1 -13
  22. package/dist/shadcn/ui/calendar.js +3 -75
  23. package/dist/shadcn/ui/card.d.ts +1 -11
  24. package/dist/shadcn/ui/card.js +3 -25
  25. package/dist/shadcn/ui/checkbox.d.ts +1 -3
  26. package/dist/shadcn/ui/checkbox.js +3 -9
  27. package/dist/shadcn/ui/collapsible.d.ts +1 -5
  28. package/dist/shadcn/ui/collapsible.js +3 -13
  29. package/dist/shadcn/ui/command.d.ts +1 -19
  30. package/dist/shadcn/ui/command.js +3 -35
  31. package/dist/shadcn/ui/context-menu.d.ts +1 -29
  32. package/dist/shadcn/ui/context-menu.js +3 -52
  33. package/dist/shadcn/ui/dialog.d.ts +1 -17
  34. package/dist/shadcn/ui/dialog.js +3 -38
  35. package/dist/shadcn/ui/drawer.d.ts +1 -13
  36. package/dist/shadcn/ui/drawer.js +3 -196
  37. package/dist/shadcn/ui/dropdown-menu.d.ts +1 -29
  38. package/dist/shadcn/ui/dropdown-menu.js +3 -52
  39. package/dist/shadcn/ui/empty.d.ts +1 -14
  40. package/dist/shadcn/ui/empty.js +3 -33
  41. package/dist/shadcn/ui/field.d.ts +1 -28
  42. package/dist/shadcn/ui/field.js +3 -68
  43. package/dist/shadcn/ui/hover-card.d.ts +1 -5
  44. package/dist/shadcn/ui/hover-card.js +3 -14
  45. package/dist/shadcn/ui/input-group.d.ts +1 -28
  46. package/dist/shadcn/ui/input-group.js +3 -58
  47. package/dist/shadcn/ui/input.d.ts +1 -3
  48. package/dist/shadcn/ui/input.js +3 -8
  49. package/dist/shadcn/ui/item.d.ts +1 -34
  50. package/dist/shadcn/ui/item.js +3 -79
  51. package/dist/shadcn/ui/kbd.d.ts +1 -3
  52. package/dist/shadcn/ui/kbd.js +3 -9
  53. package/dist/shadcn/ui/label.d.ts +1 -3
  54. package/dist/shadcn/ui/label.js +3 -8
  55. package/dist/shadcn/ui/menubar.d.ts +1 -29
  56. package/dist/shadcn/ui/menubar.js +3 -57
  57. package/dist/shadcn/ui/navigation-menu.d.ts +1 -13
  58. package/dist/shadcn/ui/navigation-menu.js +3 -31
  59. package/dist/shadcn/ui/pagination.d.ts +1 -17
  60. package/dist/shadcn/ui/pagination.js +3 -27
  61. package/dist/shadcn/ui/popover.d.ts +1 -9
  62. package/dist/shadcn/ui/popover.js +3 -24
  63. package/dist/shadcn/ui/progress.d.ts +1 -7
  64. package/dist/shadcn/ui/progress.js +3 -20
  65. package/dist/shadcn/ui/radio-group.d.ts +1 -5
  66. package/dist/shadcn/ui/radio-group.js +3 -12
  67. package/dist/shadcn/ui/scroll-area.d.ts +1 -5
  68. package/dist/shadcn/ui/scroll-area.js +3 -12
  69. package/dist/shadcn/ui/select.d.ts +1 -15
  70. package/dist/shadcn/ui/select.js +3 -35
  71. package/dist/shadcn/ui/separator.d.ts +1 -3
  72. package/dist/shadcn/ui/separator.js +3 -8
  73. package/dist/shadcn/ui/sheet.d.ts +1 -14
  74. package/dist/shadcn/ui/sheet.js +3 -38
  75. package/dist/shadcn/ui/sidebar.d.ts +1 -70
  76. package/dist/shadcn/ui/sidebar.js +3 -256
  77. package/dist/shadcn/ui/skeleton.d.ts +1 -2
  78. package/dist/shadcn/ui/skeleton.js +3 -6
  79. package/dist/shadcn/ui/slider.d.ts +1 -3
  80. package/dist/shadcn/ui/slider.js +3 -12
  81. package/dist/shadcn/ui/spinner.d.ts +1 -2
  82. package/dist/shadcn/ui/spinner.js +3 -7
  83. package/dist/shadcn/ui/switch.d.ts +1 -5
  84. package/dist/shadcn/ui/switch.js +3 -8
  85. package/dist/shadcn/ui/table.d.ts +1 -10
  86. package/dist/shadcn/ui/table.js +3 -29
  87. package/dist/shadcn/ui/tabs.d.ts +1 -13
  88. package/dist/shadcn/ui/tabs.js +3 -29
  89. package/dist/shadcn/ui/textarea.d.ts +1 -3
  90. package/dist/shadcn/ui/textarea.js +3 -7
  91. package/dist/shadcn/ui/toggle-group.d.ts +1 -11
  92. package/dist/shadcn/ui/toggle-group.js +3 -25
  93. package/dist/shadcn/ui/toggle.d.ts +1 -15
  94. package/dist/shadcn/ui/toggle.js +3 -26
  95. package/dist/shadcn/ui/tooltip.d.ts +1 -6
  96. package/dist/shadcn/ui/tooltip.js +3 -17
  97. package/dist/ui/accordion.d.ts +21 -0
  98. package/dist/ui/accordion.js +67 -0
  99. package/dist/ui/alert-dialog.d.ts +32 -0
  100. package/dist/ui/alert-dialog.js +102 -0
  101. package/dist/ui/alert.d.ts +13 -0
  102. package/dist/ui/alert.js +28 -0
  103. package/dist/ui/aspect-ratio.d.ts +5 -0
  104. package/dist/ui/aspect-ratio.js +9 -0
  105. package/dist/ui/avatar.d.ts +14 -0
  106. package/dist/ui/avatar.js +49 -0
  107. package/dist/ui/badge.d.ts +22 -0
  108. package/dist/ui/badge.js +26 -0
  109. package/dist/ui/breadcrumb.d.ts +13 -0
  110. package/dist/ui/breadcrumb.js +29 -0
  111. package/dist/ui/button-group.d.ts +21 -0
  112. package/dist/ui/button-group.js +29 -0
  113. package/dist/ui/button.d.ts +38 -0
  114. package/dist/ui/button.js +49 -0
  115. package/dist/ui/calendar.d.ts +13 -0
  116. package/dist/ui/calendar.js +75 -0
  117. package/dist/ui/card.d.ts +11 -0
  118. package/dist/ui/card.js +25 -0
  119. package/dist/ui/checkbox.d.ts +17 -0
  120. package/dist/ui/checkbox.js +25 -0
  121. package/dist/ui/collapsible.d.ts +11 -0
  122. package/dist/ui/collapsible.js +40 -0
  123. package/dist/ui/command.d.ts +19 -0
  124. package/dist/ui/command.js +35 -0
  125. package/dist/ui/context-menu.d.ts +53 -0
  126. package/dist/ui/context-menu.js +345 -0
  127. package/dist/ui/dialog.d.ts +40 -0
  128. package/dist/ui/dialog.js +109 -0
  129. package/dist/ui/drawer.d.ts +36 -0
  130. package/dist/ui/drawer.js +234 -0
  131. package/dist/ui/dropdown-menu.d.ts +61 -0
  132. package/dist/ui/dropdown-menu.js +323 -0
  133. package/dist/ui/empty.d.ts +14 -0
  134. package/dist/ui/empty.js +33 -0
  135. package/dist/ui/field.d.ts +28 -0
  136. package/dist/ui/field.js +68 -0
  137. package/dist/ui/hover-card.d.ts +32 -0
  138. package/dist/ui/hover-card.js +119 -0
  139. package/dist/ui/input-group.d.ts +28 -0
  140. package/dist/ui/input-group.js +58 -0
  141. package/dist/ui/input.d.ts +3 -0
  142. package/dist/ui/input.js +7 -0
  143. package/dist/ui/item.d.ts +41 -0
  144. package/dist/ui/item.js +69 -0
  145. package/dist/ui/kbd.d.ts +4 -0
  146. package/dist/ui/kbd.js +10 -0
  147. package/dist/ui/label.d.ts +3 -0
  148. package/dist/ui/label.js +8 -0
  149. package/dist/ui/menubar.d.ts +59 -0
  150. package/dist/ui/menubar.js +384 -0
  151. package/dist/ui/navigation-menu.d.ts +24 -0
  152. package/dist/ui/navigation-menu.js +134 -0
  153. package/dist/ui/pagination.d.ts +17 -0
  154. package/dist/ui/pagination.js +36 -0
  155. package/dist/ui/popover.d.ts +25 -0
  156. package/dist/ui/popover.js +68 -0
  157. package/dist/ui/portal.d.ts +7 -0
  158. package/dist/ui/portal.js +12 -0
  159. package/dist/ui/progress.d.ts +15 -0
  160. package/dist/ui/progress.js +36 -0
  161. package/dist/ui/radio-group.d.ts +17 -0
  162. package/dist/ui/radio-group.js +54 -0
  163. package/dist/ui/scroll-area.d.ts +9 -0
  164. package/dist/ui/scroll-area.js +72 -0
  165. package/dist/ui/select.d.ts +37 -0
  166. package/dist/ui/select.js +216 -0
  167. package/dist/ui/separator.d.ts +14 -0
  168. package/dist/ui/separator.js +13 -0
  169. package/dist/ui/sheet.d.ts +31 -0
  170. package/dist/ui/sheet.js +121 -0
  171. package/dist/ui/sidebar.d.ts +86 -0
  172. package/dist/ui/sidebar.js +211 -0
  173. package/dist/ui/skeleton.d.ts +3 -0
  174. package/dist/ui/skeleton.js +7 -0
  175. package/dist/ui/slider.d.ts +18 -0
  176. package/dist/ui/slider.js +94 -0
  177. package/dist/ui/slot.d.ts +27 -0
  178. package/dist/ui/slot.js +62 -0
  179. package/dist/ui/spinner.d.ts +3 -0
  180. package/dist/ui/spinner.js +8 -0
  181. package/dist/ui/switch.d.ts +17 -0
  182. package/dist/ui/switch.js +23 -0
  183. package/dist/ui/table.d.ts +10 -0
  184. package/dist/ui/table.js +29 -0
  185. package/dist/ui/tabs.d.ts +29 -0
  186. package/dist/ui/tabs.js +82 -0
  187. package/dist/ui/textarea.d.ts +3 -0
  188. package/dist/ui/textarea.js +7 -0
  189. package/dist/ui/toggle-group.d.ts +23 -0
  190. package/dist/ui/toggle-group.js +52 -0
  191. package/dist/ui/toggle.d.ts +25 -0
  192. package/dist/ui/toggle.js +41 -0
  193. package/dist/ui/tooltip.d.ts +25 -0
  194. package/dist/ui/tooltip.js +90 -0
  195. package/dist/ui/use-controllable-state.d.ts +10 -0
  196. package/dist/ui/use-controllable-state.js +17 -0
  197. package/dist/ui/use-dismiss.d.ts +10 -0
  198. package/dist/ui/use-dismiss.js +51 -0
  199. package/dist/ui/use-floating.d.ts +38 -0
  200. package/dist/ui/use-floating.js +128 -0
  201. package/dist/ui/use-presence.d.ts +8 -0
  202. package/dist/ui/use-presence.js +48 -0
  203. package/package.json +6 -1
  204. package/dist/shadcn/lib/base-ui/LICENSE +0 -21
  205. package/dist/shadcn/lib/base-ui/_chunk-000kmre8.js +0 -150
  206. package/dist/shadcn/lib/base-ui/_chunk-1vw45v38.js +0 -64
  207. package/dist/shadcn/lib/base-ui/_chunk-23rx7haq.js +0 -81
  208. package/dist/shadcn/lib/base-ui/_chunk-242gh8ph.js +0 -230
  209. package/dist/shadcn/lib/base-ui/_chunk-26cc610z.js +0 -6
  210. package/dist/shadcn/lib/base-ui/_chunk-2z044bba.js +0 -5890
  211. package/dist/shadcn/lib/base-ui/_chunk-3cpd1vjz.js +0 -13
  212. package/dist/shadcn/lib/base-ui/_chunk-3enq1vat.js +0 -82
  213. package/dist/shadcn/lib/base-ui/_chunk-3xpke33f.js +0 -23
  214. package/dist/shadcn/lib/base-ui/_chunk-451nqgsa.js +0 -6
  215. package/dist/shadcn/lib/base-ui/_chunk-4maf6pas.js +0 -11
  216. package/dist/shadcn/lib/base-ui/_chunk-4zhfq4d3.js +0 -16
  217. package/dist/shadcn/lib/base-ui/_chunk-5gaqyne5.js +0 -21
  218. package/dist/shadcn/lib/base-ui/_chunk-5tt5hk59.js +0 -4
  219. package/dist/shadcn/lib/base-ui/_chunk-5tze5c8q.js +0 -13
  220. package/dist/shadcn/lib/base-ui/_chunk-5xmdvndx.js +0 -225
  221. package/dist/shadcn/lib/base-ui/_chunk-6adaer33.js +0 -435
  222. package/dist/shadcn/lib/base-ui/_chunk-6ejf1z1r.js +0 -9
  223. package/dist/shadcn/lib/base-ui/_chunk-6kqramh9.js +0 -27
  224. package/dist/shadcn/lib/base-ui/_chunk-7b9dc493.js +0 -14
  225. package/dist/shadcn/lib/base-ui/_chunk-8a9vv8am.js +0 -89
  226. package/dist/shadcn/lib/base-ui/_chunk-8ctgmf06.js +0 -129
  227. package/dist/shadcn/lib/base-ui/_chunk-8ganmsbg.js +0 -54
  228. package/dist/shadcn/lib/base-ui/_chunk-8xaqxgck.js +0 -15
  229. package/dist/shadcn/lib/base-ui/_chunk-95tf2rxq.js +0 -62
  230. package/dist/shadcn/lib/base-ui/_chunk-9x63vfqj.js +0 -70
  231. package/dist/shadcn/lib/base-ui/_chunk-ase0ydtt.js +0 -9
  232. package/dist/shadcn/lib/base-ui/_chunk-b0nc8wq7.js +0 -34
  233. package/dist/shadcn/lib/base-ui/_chunk-b5ya6xds.js +0 -10
  234. package/dist/shadcn/lib/base-ui/_chunk-b6dkjkbw.js +0 -43
  235. package/dist/shadcn/lib/base-ui/_chunk-c2bz952e.js +0 -19
  236. package/dist/shadcn/lib/base-ui/_chunk-cdgfsr3q.js +0 -15
  237. package/dist/shadcn/lib/base-ui/_chunk-cdj8cpx5.js +0 -347
  238. package/dist/shadcn/lib/base-ui/_chunk-cgptgywc.js +0 -104
  239. package/dist/shadcn/lib/base-ui/_chunk-cwvtvwc7.js +0 -35
  240. package/dist/shadcn/lib/base-ui/_chunk-dan0mva4.js +0 -23
  241. package/dist/shadcn/lib/base-ui/_chunk-dzvjwv25.js +0 -0
  242. package/dist/shadcn/lib/base-ui/_chunk-e13rsb6b.js +0 -184
  243. package/dist/shadcn/lib/base-ui/_chunk-e56mpvk1.js +0 -118
  244. package/dist/shadcn/lib/base-ui/_chunk-e6k2ecs7.js +0 -48
  245. package/dist/shadcn/lib/base-ui/_chunk-ebyxgtb4.js +0 -29
  246. package/dist/shadcn/lib/base-ui/_chunk-f2wttwrf.js +0 -39
  247. package/dist/shadcn/lib/base-ui/_chunk-fdzctasg.js +0 -38
  248. package/dist/shadcn/lib/base-ui/_chunk-ffpjy0ta.js +0 -39
  249. package/dist/shadcn/lib/base-ui/_chunk-fqry7pew.js +0 -603
  250. package/dist/shadcn/lib/base-ui/_chunk-ghn1tzt8.js +0 -84
  251. package/dist/shadcn/lib/base-ui/_chunk-gy0bpkmx.js +0 -12
  252. package/dist/shadcn/lib/base-ui/_chunk-hm5h9vsk.js +0 -16
  253. package/dist/shadcn/lib/base-ui/_chunk-htdj1jps.js +0 -833
  254. package/dist/shadcn/lib/base-ui/_chunk-j29xjete.js +0 -146
  255. package/dist/shadcn/lib/base-ui/_chunk-j3qkyd10.js +0 -50
  256. package/dist/shadcn/lib/base-ui/_chunk-ktvsd5k6.js +0 -2386
  257. package/dist/shadcn/lib/base-ui/_chunk-kw8nnq00.js +0 -546
  258. package/dist/shadcn/lib/base-ui/_chunk-m307wpdj.js +0 -18
  259. package/dist/shadcn/lib/base-ui/_chunk-mnd0j7v9.js +0 -15
  260. package/dist/shadcn/lib/base-ui/_chunk-n11h505c.js +0 -32
  261. package/dist/shadcn/lib/base-ui/_chunk-p0e2qacz.js +0 -26
  262. package/dist/shadcn/lib/base-ui/_chunk-pv7b791x.js +0 -106
  263. package/dist/shadcn/lib/base-ui/_chunk-q5cg71p7.js +0 -83
  264. package/dist/shadcn/lib/base-ui/_chunk-qbezxj1g.js +0 -385
  265. package/dist/shadcn/lib/base-ui/_chunk-qmsqz6nt.js +0 -15
  266. package/dist/shadcn/lib/base-ui/_chunk-rrh8rt4v.js +0 -65
  267. package/dist/shadcn/lib/base-ui/_chunk-s5pwkz8v.js +0 -25
  268. package/dist/shadcn/lib/base-ui/_chunk-svxv97ph.js +0 -218
  269. package/dist/shadcn/lib/base-ui/_chunk-t7ppm3t0.js +0 -68
  270. package/dist/shadcn/lib/base-ui/_chunk-vg16xxmb.js +0 -52
  271. package/dist/shadcn/lib/base-ui/_chunk-vgkfmtbe.js +0 -21
  272. package/dist/shadcn/lib/base-ui/_chunk-watha94s.js +0 -14
  273. package/dist/shadcn/lib/base-ui/_chunk-wdqynnjf.js +0 -35
  274. package/dist/shadcn/lib/base-ui/_chunk-wx2nxg0p.js +0 -15
  275. package/dist/shadcn/lib/base-ui/_chunk-x11e1k9r.js +0 -0
  276. package/dist/shadcn/lib/base-ui/_chunk-x8xehj6d.js +0 -302
  277. package/dist/shadcn/lib/base-ui/_chunk-xcqbtm2f.js +0 -28
  278. package/dist/shadcn/lib/base-ui/_chunk-ytnp24gq.js +0 -328
  279. package/dist/shadcn/lib/base-ui/_chunk-yzr7eg4b.js +0 -6
  280. package/dist/shadcn/lib/base-ui/_chunk-zk4mtm9m.js +0 -9
  281. package/dist/shadcn/lib/base-ui/accordion.d.ts +0 -447
  282. package/dist/shadcn/lib/base-ui/accordion.js +0 -630
  283. package/dist/shadcn/lib/base-ui/alert-dialog.d.ts +0 -1467
  284. package/dist/shadcn/lib/base-ui/alert-dialog.js +0 -98
  285. package/dist/shadcn/lib/base-ui/avatar.d.ts +0 -123
  286. package/dist/shadcn/lib/base-ui/avatar.js +0 -235
  287. package/dist/shadcn/lib/base-ui/button.d.ts +0 -84
  288. package/dist/shadcn/lib/base-ui/button.js +0 -51
  289. package/dist/shadcn/lib/base-ui/checkbox.d.ts +0 -341
  290. package/dist/shadcn/lib/base-ui/checkbox.js +0 -501
  291. package/dist/shadcn/lib/base-ui/collapsible.d.ts +0 -291
  292. package/dist/shadcn/lib/base-ui/collapsible.js +0 -264
  293. package/dist/shadcn/lib/base-ui/context-menu.d.ts +0 -2213
  294. package/dist/shadcn/lib/base-ui/context-menu.js +0 -323
  295. package/dist/shadcn/lib/base-ui/dialog.d.ts +0 -1448
  296. package/dist/shadcn/lib/base-ui/dialog.js +0 -79
  297. package/dist/shadcn/lib/base-ui/input.d.ts +0 -506
  298. package/dist/shadcn/lib/base-ui/input.js +0 -1027
  299. package/dist/shadcn/lib/base-ui/menu.d.ts +0 -2275
  300. package/dist/shadcn/lib/base-ui/menu.js +0 -60
  301. package/dist/shadcn/lib/base-ui/menubar.d.ts +0 -48
  302. package/dist/shadcn/lib/base-ui/menubar.js +0 -156
  303. package/dist/shadcn/lib/base-ui/merge-props.d.ts +0 -70
  304. package/dist/shadcn/lib/base-ui/merge-props.js +0 -15
  305. package/dist/shadcn/lib/base-ui/navigation-menu.d.ts +0 -825
  306. package/dist/shadcn/lib/base-ui/navigation-menu.js +0 -1849
  307. package/dist/shadcn/lib/base-ui/popover.d.ts +0 -1743
  308. package/dist/shadcn/lib/base-ui/popover.js +0 -1089
  309. package/dist/shadcn/lib/base-ui/preview-card.d.ts +0 -1608
  310. package/dist/shadcn/lib/base-ui/preview-card.js +0 -919
  311. package/dist/shadcn/lib/base-ui/progress.d.ts +0 -172
  312. package/dist/shadcn/lib/base-ui/progress.js +0 -272
  313. package/dist/shadcn/lib/base-ui/radio-group.d.ts +0 -260
  314. package/dist/shadcn/lib/base-ui/radio-group.js +0 -239
  315. package/dist/shadcn/lib/base-ui/radio.d.ts +0 -176
  316. package/dist/shadcn/lib/base-ui/radio.js +0 -387
  317. package/dist/shadcn/lib/base-ui/scroll-area.d.ts +0 -241
  318. package/dist/shadcn/lib/base-ui/scroll-area.js +0 -1055
  319. package/dist/shadcn/lib/base-ui/select.d.ts +0 -1266
  320. package/dist/shadcn/lib/base-ui/select.js +0 -2450
  321. package/dist/shadcn/lib/base-ui/separator.d.ts +0 -76
  322. package/dist/shadcn/lib/base-ui/separator.js +0 -11
  323. package/dist/shadcn/lib/base-ui/slider.d.ts +0 -551
  324. package/dist/shadcn/lib/base-ui/slider.js +0 -1583
  325. package/dist/shadcn/lib/base-ui/switch.d.ts +0 -313
  326. package/dist/shadcn/lib/base-ui/switch.js +0 -326
  327. package/dist/shadcn/lib/base-ui/tabs.d.ts +0 -406
  328. package/dist/shadcn/lib/base-ui/tabs.js +0 -915
  329. package/dist/shadcn/lib/base-ui/toggle-group.d.ts +0 -235
  330. package/dist/shadcn/lib/base-ui/toggle-group.js +0 -145
  331. package/dist/shadcn/lib/base-ui/toggle.d.ts +0 -224
  332. package/dist/shadcn/lib/base-ui/toggle.js +0 -127
  333. package/dist/shadcn/lib/base-ui/tooltip.d.ts +0 -1656
  334. package/dist/shadcn/lib/base-ui/tooltip.js +0 -920
  335. package/dist/shadcn/lib/base-ui/use-render.d.ts +0 -87
  336. package/dist/shadcn/lib/base-ui/use-render.js +0 -15
@@ -1,825 +0,0 @@
1
- /* @base-ui/react 1.5.0 — vendored (MIT — MUI Inc).
2
- * Refresh: scripts/vendor-base-ui.js (see header for instructions).
3
- * Do not edit by hand. */
4
- import * as React$1 from 'react';
5
-
6
- declare const none: "none";
7
- declare const triggerPress: "trigger-press";
8
- declare const triggerHover: "trigger-hover";
9
- declare const triggerFocus: "trigger-focus";
10
- declare const outsidePress: "outside-press";
11
- declare const itemPress: "item-press";
12
- declare const closePress: "close-press";
13
- declare const linkPress: "link-press";
14
- declare const clearPress: "clear-press";
15
- declare const chipRemovePress: "chip-remove-press";
16
- declare const trackPress: "track-press";
17
- declare const incrementPress: "increment-press";
18
- declare const decrementPress: "decrement-press";
19
- declare const inputChange: "input-change";
20
- declare const inputClear: "input-clear";
21
- declare const inputBlur: "input-blur";
22
- declare const inputPaste: "input-paste";
23
- declare const inputPress: "input-press";
24
- declare const focusOut: "focus-out";
25
- declare const escapeKey: "escape-key";
26
- declare const closeWatcher: "close-watcher";
27
- declare const listNavigation: "list-navigation";
28
- declare const keyboard: "keyboard";
29
- declare const pointer: "pointer";
30
- declare const drag: "drag";
31
- declare const wheel: "wheel";
32
- declare const scrub: "scrub";
33
- declare const cancelOpen: "cancel-open";
34
- declare const siblingOpen: "sibling-open";
35
- declare const disabled: "disabled";
36
- declare const missing: "missing";
37
- declare const initial: "initial";
38
- declare const imperativeAction: "imperative-action";
39
- declare const swipe: "swipe";
40
- declare const windowResize: "window-resize";
41
- export interface ReasonToEventMap {
42
- [none]: Event;
43
- [triggerPress]: MouseEvent | PointerEvent | TouchEvent | KeyboardEvent;
44
- [triggerHover]: MouseEvent;
45
- [triggerFocus]: FocusEvent;
46
- [outsidePress]: MouseEvent | PointerEvent | TouchEvent;
47
- [itemPress]: MouseEvent | KeyboardEvent | PointerEvent;
48
- [closePress]: MouseEvent | KeyboardEvent | PointerEvent;
49
- [linkPress]: MouseEvent | PointerEvent;
50
- [clearPress]: PointerEvent | MouseEvent | KeyboardEvent;
51
- [chipRemovePress]: PointerEvent | MouseEvent | KeyboardEvent;
52
- [trackPress]: PointerEvent | MouseEvent | TouchEvent;
53
- [incrementPress]: PointerEvent | MouseEvent | TouchEvent;
54
- [decrementPress]: PointerEvent | MouseEvent | TouchEvent;
55
- [inputChange]: InputEvent | Event;
56
- [inputClear]: InputEvent | FocusEvent | Event;
57
- [inputBlur]: FocusEvent;
58
- [inputPaste]: ClipboardEvent;
59
- [inputPress]: MouseEvent | PointerEvent | TouchEvent | KeyboardEvent;
60
- [focusOut]: FocusEvent | KeyboardEvent;
61
- [escapeKey]: KeyboardEvent;
62
- [closeWatcher]: Event;
63
- [listNavigation]: KeyboardEvent;
64
- [keyboard]: KeyboardEvent;
65
- [pointer]: PointerEvent;
66
- [drag]: PointerEvent | TouchEvent;
67
- [swipe]: PointerEvent | TouchEvent;
68
- [wheel]: WheelEvent;
69
- [scrub]: PointerEvent;
70
- [cancelOpen]: MouseEvent;
71
- [siblingOpen]: Event;
72
- [disabled]: Event;
73
- [missing]: Event;
74
- [initial]: Event;
75
- [imperativeAction]: Event;
76
- [windowResize]: UIEvent;
77
- }
78
- /**
79
- * Maps a change `reason` string to the corresponding native event type.
80
- */
81
- export type ReasonToEvent<Reason extends string> = Reason extends keyof ReasonToEventMap ? ReasonToEventMap[Reason] : Event;
82
- export type BaseUIChangeEventDetail<Reason extends string, CustomProperties extends object> = {
83
- /**
84
- * The reason for the event.
85
- */
86
- reason: Reason;
87
- /**
88
- * The native event associated with the custom event.
89
- */
90
- event: ReasonToEvent<Reason>;
91
- /**
92
- * Cancels Base UI from handling the event.
93
- */
94
- cancel: () => void;
95
- /**
96
- * Allows the event to propagate in cases where Base UI will stop the propagation.
97
- */
98
- allowPropagation: () => void;
99
- /**
100
- * Indicates whether the event has been canceled.
101
- */
102
- isCanceled: boolean;
103
- /**
104
- * Indicates whether the event is allowed to propagate.
105
- */
106
- isPropagationAllowed: boolean;
107
- /**
108
- * The element that triggered the event, if applicable.
109
- */
110
- trigger: Element | undefined;
111
- } & CustomProperties;
112
- /**
113
- * Details of custom change events emitted by Base UI components.
114
- */
115
- export type BaseUIChangeEventDetails<Reason extends string, CustomProperties extends object = {}> = Reason extends string ? BaseUIChangeEventDetail<Reason, CustomProperties> & {} : never;
116
- export type HTMLProps<T = any> = React$1.HTMLAttributes<T> & {
117
- ref?: React$1.Ref<T> | undefined;
118
- };
119
- /**
120
- * Shape of the render prop: a function that takes props to be spread on the element and component's state and returns a React element.
121
- *
122
- * @template Props Props to be spread on the rendered element.
123
- * @template State Component's internal state.
124
- */
125
- export type ComponentRenderFn<Props, State> = (props: Props, state: State) => React$1.ReactElement<unknown>;
126
- export type BaseUIEvent<E extends React$1.SyntheticEvent<Element, Event>> = E & {
127
- preventBaseUIHandler: () => void;
128
- readonly baseUIHandlerPrevented?: boolean | undefined;
129
- };
130
- export type WithPreventBaseUIHandler<T> = T extends ((event: infer E) => any) ? E extends React$1.SyntheticEvent<Element, Event> ? (event: BaseUIEvent<E>) => ReturnType<T> : T : T extends undefined ? undefined : T;
131
- /**
132
- * Adds a `preventBaseUIHandler` method to all event handlers.
133
- */
134
- export type WithBaseUIEvent<T> = {
135
- [K in keyof T]: WithPreventBaseUIHandler<T[K]>;
136
- };
137
- /**
138
- * Props shared by all Base UI components.
139
- * Contains `className` (string or callback taking the component's state as an argument) and `render` (function to customize rendering).
140
- */
141
- export type BaseUIComponentProps<ElementType extends React$1.ElementType, State, RenderFunctionProps = HTMLProps> = Omit<WithBaseUIEvent<React$1.ComponentPropsWithRef<ElementType>>, "className" | "color" | "defaultValue" | "defaultChecked" | "style"> & {
142
- /**
143
- * CSS class applied to the element, or a function that
144
- * returns a class based on the component's state.
145
- */
146
- className?: string | ((state: State) => string | undefined) | undefined;
147
- /**
148
- * Allows you to replace the component's HTML element
149
- * with a different tag, or compose it with another component.
150
- *
151
- * Accepts a `ReactElement` or a function that returns the element to render.
152
- */
153
- render?: React$1.ReactElement | ComponentRenderFn<RenderFunctionProps, State> | undefined;
154
- /**
155
- * Style applied to the element, or a function that
156
- * returns a style object based on the component's state.
157
- */
158
- style?: React$1.CSSProperties | ((state: State) => React$1.CSSProperties | undefined) | undefined;
159
- };
160
- export interface NativeButtonProps {
161
- /**
162
- * Whether the component renders a native `<button>` element when replacing it
163
- * via the `render` prop.
164
- * Set to `false` if the rendered element is not a button (for example, `<div>`).
165
- * @default true
166
- */
167
- nativeButton?: boolean | undefined;
168
- }
169
- /**
170
- * Groups all parts of the navigation menu.
171
- * Renders a `<nav>` element at the root, or `<div>` element when nested.
172
- *
173
- * Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
174
- */
175
- export declare const NavigationMenuRoot: {
176
- <Value = any>(props: NavigationMenuRoot.Props<Value>): React$1.JSX.Element;
177
- };
178
- export interface NavigationMenuRootState {
179
- /**
180
- * If `true`, the popup is open.
181
- */
182
- open: boolean;
183
- /**
184
- * Whether the navigation menu is nested.
185
- */
186
- nested: boolean;
187
- }
188
- export interface NavigationMenuRootProps<Value = any> extends BaseUIComponentProps<"nav", NavigationMenuRootState> {
189
- /**
190
- * A ref to imperative actions.
191
- */
192
- actionsRef?: React$1.RefObject<NavigationMenuRoot.Actions | null> | undefined;
193
- /**
194
- * Event handler called after any animations complete when the navigation menu is closed.
195
- */
196
- onOpenChangeComplete?: ((open: boolean) => void) | undefined;
197
- /**
198
- * The controlled value of the navigation menu item that should be currently open.
199
- * When non-nullish, the menu will be open. When nullish, the menu will be closed.
200
- *
201
- * To render an uncontrolled navigation menu, use the `defaultValue` prop instead.
202
- * @default null
203
- */
204
- value?: Value | null | undefined;
205
- /**
206
- * The uncontrolled value of the item that should be initially selected.
207
- *
208
- * To render a controlled navigation menu, use the `value` prop instead.
209
- * @default null
210
- */
211
- defaultValue?: Value | null | undefined;
212
- /**
213
- * Callback fired when the value changes.
214
- */
215
- onValueChange?: ((value: Value | null, eventDetails: NavigationMenuRoot.ChangeEventDetails) => void) | undefined;
216
- /**
217
- * How long to wait before opening the navigation popup. Specified in milliseconds.
218
- * @default 50
219
- */
220
- delay?: number | undefined;
221
- /**
222
- * How long to wait before closing the navigation popup. Specified in milliseconds.
223
- * @default 50
224
- */
225
- closeDelay?: number | undefined;
226
- /**
227
- * The orientation of the navigation menu.
228
- * @default 'horizontal'
229
- */
230
- orientation?: "horizontal" | "vertical" | undefined;
231
- }
232
- export interface NavigationMenuRootActions {
233
- unmount: () => void;
234
- }
235
- export type NavigationMenuRootChangeEventReason = typeof triggerPress | typeof triggerHover | typeof outsidePress | typeof listNavigation | typeof focusOut | typeof escapeKey | typeof linkPress | typeof none;
236
- export type NavigationMenuRootChangeEventDetails = BaseUIChangeEventDetails<NavigationMenuRoot.ChangeEventReason>;
237
- export declare namespace NavigationMenuRoot {
238
- type State = NavigationMenuRootState;
239
- type Props<TValue = any> = NavigationMenuRootProps<TValue>;
240
- type Value<TValue = any> = TValue | null;
241
- type Actions = NavigationMenuRootActions;
242
- type ChangeEventReason = NavigationMenuRootChangeEventReason;
243
- type ChangeEventDetails = NavigationMenuRootChangeEventDetails;
244
- }
245
- /**
246
- * Contains a list of navigation menu items.
247
- * Renders a `<ul>` element.
248
- *
249
- * Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
250
- */
251
- export declare const NavigationMenuList: React$1.ForwardRefExoticComponent<Omit<NavigationMenuListProps, "ref"> & React$1.RefAttributes<HTMLUListElement>>;
252
- export interface NavigationMenuListState {
253
- /**
254
- * If `true`, the popup is open.
255
- */
256
- open: boolean;
257
- }
258
- export interface NavigationMenuListProps extends BaseUIComponentProps<"ul", NavigationMenuListState> {
259
- }
260
- export declare namespace NavigationMenuList {
261
- type State = NavigationMenuListState;
262
- type Props = NavigationMenuListProps;
263
- }
264
- /**
265
- * An individual navigation menu item.
266
- * Renders a `<li>` element.
267
- *
268
- * Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
269
- */
270
- export declare const NavigationMenuItem: React$1.ForwardRefExoticComponent<Omit<NavigationMenuItemProps, "ref"> & React$1.RefAttributes<HTMLLIElement>>;
271
- export interface NavigationMenuItemState {
272
- }
273
- export interface NavigationMenuItemProps extends BaseUIComponentProps<"li", NavigationMenuItemState> {
274
- /**
275
- * A unique value that identifies this navigation menu item.
276
- * If no value is provided, a unique ID will be generated automatically.
277
- * Use when controlling the navigation menu programmatically.
278
- */
279
- value?: any;
280
- }
281
- export declare namespace NavigationMenuItem {
282
- type State = NavigationMenuItemState;
283
- type Props = NavigationMenuItemProps;
284
- }
285
- export type TransitionStatus = "starting" | "ending" | "idle" | undefined;
286
- /**
287
- * A container for the content of the navigation menu item that is moved into the popup
288
- * when the item is active.
289
- * Renders a `<div>` element.
290
- *
291
- * Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
292
- */
293
- export declare const NavigationMenuContent: React$1.ForwardRefExoticComponent<Omit<NavigationMenuContentProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
294
- export interface NavigationMenuContentState {
295
- /**
296
- * If `true`, the component is open.
297
- */
298
- open: boolean;
299
- /**
300
- * The transition status of the component.
301
- */
302
- transitionStatus: TransitionStatus;
303
- /**
304
- * The direction of the activation.
305
- */
306
- activationDirection: "left" | "right" | "up" | "down" | null;
307
- }
308
- export interface NavigationMenuContentProps extends BaseUIComponentProps<"div", NavigationMenuContentState> {
309
- /**
310
- * Whether to keep the content mounted in the DOM while the popup is closed.
311
- * Ensures the content is present during server-side rendering for web crawlers.
312
- * @default false
313
- */
314
- keepMounted?: boolean | undefined;
315
- }
316
- export declare namespace NavigationMenuContent {
317
- type State = NavigationMenuContentState;
318
- type Props = NavigationMenuContentProps;
319
- }
320
- /**
321
- * Opens the navigation menu popup when hovered or clicked, revealing the
322
- * associated content.
323
- * Renders a `<button>` element.
324
- *
325
- * Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
326
- */
327
- export declare const NavigationMenuTrigger: React$1.ForwardRefExoticComponent<Omit<NavigationMenuTriggerProps, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
328
- export interface NavigationMenuTriggerState {
329
- /**
330
- * If `true`, the popup is open and the item is active.
331
- */
332
- open: boolean;
333
- }
334
- export interface NavigationMenuTriggerProps extends NativeButtonProps, BaseUIComponentProps<"button", NavigationMenuTriggerState> {
335
- }
336
- export declare namespace NavigationMenuTrigger {
337
- type State = NavigationMenuTriggerState;
338
- type Props = NavigationMenuTriggerProps;
339
- }
340
- export declare type Axis = "x" | "y";
341
- export declare type ClientRectObject = Prettify<Rect & SideObject>;
342
- export declare type Coords = {
343
- [key in Axis]: number;
344
- };
345
- export declare type Dimensions = {
346
- [key in Length]: number;
347
- };
348
- export declare type Length = "width" | "height";
349
- export declare type Padding = number | Prettify<Partial<SideObject>>;
350
- export declare type Prettify<T> = {
351
- [K in keyof T]: T[K];
352
- } & {};
353
- export declare type Rect = Prettify<Coords & Dimensions>;
354
- export declare type Side = "top" | "right" | "bottom" | "left";
355
- export declare type SideObject = {
356
- [key in Side]: number;
357
- };
358
- /**
359
- * Custom positioning reference element.
360
- * @see https://floating-ui.com/docs/virtual-elements
361
- */
362
- export declare interface VirtualElement {
363
- getBoundingClientRect(): ClientRectObject;
364
- getClientRects?(): Array<ClientRectObject> | DOMRectList;
365
- contextElement?: Element;
366
- }
367
- export interface UseRenderElementComponentProps<State> {
368
- /**
369
- * The class name to apply to the rendered element.
370
- * Can be a string or a function that accepts the state and returns a string.
371
- */
372
- className?: string | ((state: State) => string | undefined) | undefined;
373
- /**
374
- * The render prop or React element to override the default element.
375
- */
376
- render?: undefined | React$1.ReactElement | ComponentRenderFn<React$1.HTMLAttributes<any>, State>;
377
- /**
378
- * The style to apply to the rendered element.
379
- * Can be a style object or a function that accepts the state and returns a style object.
380
- */
381
- style?: React$1.CSSProperties | ((state: State) => React$1.CSSProperties | undefined) | undefined;
382
- }
383
- export interface UseFloatingPortalNodeProps {
384
- ref?: React$1.Ref<HTMLDivElement> | undefined;
385
- container?: HTMLElement | ShadowRoot | null | React$1.RefObject<HTMLElement | ShadowRoot | null> | undefined;
386
- componentProps?: UseRenderElementComponentProps<any> | undefined;
387
- elementProps?: React$1.HTMLAttributes<HTMLDivElement> | undefined;
388
- }
389
- declare const FloatingPortal: React$1.ForwardRefExoticComponent<Omit<FloatingPortal.Props<any> & {
390
- renderGuards?: boolean | undefined;
391
- }, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
392
- export interface FloatingPortalState {
393
- }
394
- declare namespace FloatingPortal {
395
- type State = FloatingPortalState;
396
- interface Props<TState> extends BaseUIComponentProps<"div", TState> {
397
- /**
398
- * A parent element to render the portal element into.
399
- */
400
- container?: UseFloatingPortalNodeProps["container"] | undefined;
401
- }
402
- }
403
- /**
404
- * A portal element that moves the popup to a different part of the DOM.
405
- * By default, the portal element is appended to `<body>`.
406
- * Renders a `<div>` element.
407
- *
408
- * Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
409
- */
410
- export declare const NavigationMenuPortal: React$1.ForwardRefExoticComponent<Omit<NavigationMenuPortalProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
411
- export interface NavigationMenuPortalState {
412
- }
413
- export interface NavigationMenuPortalProps extends FloatingPortal.Props<NavigationMenuPortalState> {
414
- /**
415
- * Whether to keep the portal mounted in the DOM while the popup is hidden.
416
- * @default false
417
- */
418
- keepMounted?: boolean | undefined;
419
- /**
420
- * A parent element to render the portal element into.
421
- */
422
- container?: FloatingPortal.Props<NavigationMenuPortalState>["container"] | undefined;
423
- }
424
- export declare namespace NavigationMenuPortal {
425
- type State = NavigationMenuPortalState;
426
- type Props = NavigationMenuPortalProps;
427
- }
428
- type Side$1 = "top" | "bottom" | "left" | "right" | "inline-end" | "inline-start";
429
- export type Align = "start" | "center" | "end";
430
- export type Boundary = "clipping-ancestors" | Element | Element[] | Rect;
431
- export type OffsetFunction = (data: {
432
- side: Side$1;
433
- align: Align;
434
- anchor: {
435
- width: number;
436
- height: number;
437
- };
438
- positioner: {
439
- width: number;
440
- height: number;
441
- };
442
- }) => number;
443
- export interface SideFlipMode {
444
- /**
445
- * How to avoid collisions on the side axis.
446
- * - `'flip'`: If there is not enough space, place the popup on the opposite side.
447
- * - `'none'`: Keep the preferred side even if it overflows.
448
- */
449
- side?: "flip" | "none" | undefined;
450
- /**
451
- * How to avoid collisions on the align axis.
452
- * - `'flip'`: If there is not enough space, swap `'start'` and `'end'` alignment.
453
- * - `'shift'`: Keep the alignment and shift the popup to fit within the boundary.
454
- * - `'none'`: Keep the preferred alignment even if it overflows.
455
- */
456
- align?: "flip" | "shift" | "none" | undefined;
457
- /**
458
- * If both sides on the preferred axis do not fit, determines whether to fallback
459
- * to a side on the perpendicular axis and which logical side to prefer.
460
- * - `'start'`: Prefer the logical start side on the perpendicular axis.
461
- * - `'end'`: Prefer the logical end side on the perpendicular axis.
462
- * - `'none'`: Do not fallback to the perpendicular axis.
463
- */
464
- fallbackAxisSide?: "start" | "end" | "none" | undefined;
465
- }
466
- export interface SideShiftMode {
467
- /**
468
- * How to avoid collisions on the side axis.
469
- * - `'shift'`: Keep the preferred side and shift the popup to fit within the boundary.
470
- * - `'none'`: Keep the preferred side even if it overflows.
471
- */
472
- side?: "shift" | "none" | undefined;
473
- /**
474
- * How to avoid collisions on the align axis.
475
- * - `'shift'`: Keep the alignment and shift the popup to fit within the boundary.
476
- * - `'none'`: Keep the preferred alignment even if it overflows.
477
- */
478
- align?: "shift" | "none" | undefined;
479
- /**
480
- * If both sides on the preferred axis do not fit, determines whether to fallback
481
- * to a side on the perpendicular axis and which logical side to prefer.
482
- * - `'start'`: Prefer the logical start side on the perpendicular axis.
483
- * - `'end'`: Prefer the logical end side on the perpendicular axis.
484
- * - `'none'`: Do not fallback to the perpendicular axis.
485
- */
486
- fallbackAxisSide?: "start" | "end" | "none" | undefined;
487
- }
488
- export type CollisionAvoidance = SideFlipMode | SideShiftMode;
489
- export interface UseAnchorPositioningSharedParameters {
490
- /**
491
- * An element to position the popup against.
492
- * By default, the popup will be positioned against the trigger.
493
- */
494
- anchor?: Element | null | VirtualElement | React$1.RefObject<Element | null> | (() => Element | VirtualElement | null) | undefined;
495
- /**
496
- * Determines which CSS `position` property to use.
497
- * @default 'absolute'
498
- */
499
- positionMethod?: "absolute" | "fixed" | undefined;
500
- /**
501
- * Which side of the anchor element to align the popup against.
502
- * May automatically change to avoid collisions.
503
- * @default 'bottom'
504
- */
505
- side?: Side$1 | undefined;
506
- /**
507
- * Distance between the anchor and the popup in pixels.
508
- * Also accepts a function that returns the distance to read the dimensions of the anchor
509
- * and positioner elements, along with its side and alignment.
510
- *
511
- * The function takes a `data` object parameter with the following properties:
512
- * - `data.anchor`: the dimensions of the anchor element with properties `width` and `height`.
513
- * - `data.positioner`: the dimensions of the positioner element with properties `width` and `height`.
514
- * - `data.side`: which side of the anchor element the positioner is aligned against.
515
- * - `data.align`: how the positioner is aligned relative to the specified side.
516
- *
517
- * @example
518
- * ```jsx
519
- * <Positioner
520
- * sideOffset={({ side, align, anchor, positioner }) => {
521
- * return side === 'top' || side === 'bottom'
522
- * ? anchor.height
523
- * : anchor.width;
524
- * }}
525
- * />
526
- * ```
527
- *
528
- * @default 0
529
- */
530
- sideOffset?: number | OffsetFunction | undefined;
531
- /**
532
- * How to align the popup relative to the specified side.
533
- * @default 'center'
534
- */
535
- align?: Align | undefined;
536
- /**
537
- * Additional offset along the alignment axis in pixels.
538
- * Also accepts a function that returns the offset to read the dimensions of the anchor
539
- * and positioner elements, along with its side and alignment.
540
- *
541
- * The function takes a `data` object parameter with the following properties:
542
- * - `data.anchor`: the dimensions of the anchor element with properties `width` and `height`.
543
- * - `data.positioner`: the dimensions of the positioner element with properties `width` and `height`.
544
- * - `data.side`: which side of the anchor element the positioner is aligned against.
545
- * - `data.align`: how the positioner is aligned relative to the specified side.
546
- *
547
- * @example
548
- * ```jsx
549
- * <Positioner
550
- * alignOffset={({ side, align, anchor, positioner }) => {
551
- * return side === 'top' || side === 'bottom'
552
- * ? anchor.width
553
- * : anchor.height;
554
- * }}
555
- * />
556
- * ```
557
- *
558
- * @default 0
559
- */
560
- alignOffset?: number | OffsetFunction | undefined;
561
- /**
562
- * An element or a rectangle that delimits the area that the popup is confined to.
563
- * @default 'clipping-ancestors'
564
- */
565
- collisionBoundary?: Boundary | undefined;
566
- /**
567
- * Additional space to maintain from the edge of the collision boundary.
568
- * @default 5
569
- */
570
- collisionPadding?: Padding | undefined;
571
- /**
572
- * Whether to maintain the popup in the viewport after
573
- * the anchor element was scrolled out of view.
574
- * @default false
575
- */
576
- sticky?: boolean | undefined;
577
- /**
578
- * Minimum distance to maintain between the arrow and the edges of the popup.
579
- *
580
- * Use it to prevent the arrow element from hanging out of the rounded corners of a popup.
581
- * @default 5
582
- */
583
- arrowPadding?: number | undefined;
584
- /**
585
- * Whether to disable the popup from tracking any layout shift of its positioning anchor.
586
- * @default false
587
- */
588
- disableAnchorTracking?: boolean | undefined;
589
- /**
590
- * Determines how to handle collisions when positioning the popup.
591
- *
592
- * `side` controls overflow on the preferred placement axis (`top`/`bottom` or `left`/`right`):
593
- * - `'flip'`: keep the requested side when it fits; otherwise try the opposite side
594
- * (`top` and `bottom`, or `left` and `right`).
595
- * - `'shift'`: never change side; keep the requested side and move the popup within
596
- * the clipping boundary so it stays visible.
597
- * - `'none'`: do not correct side-axis overflow.
598
- *
599
- * `align` controls overflow on the alignment axis (`start`/`center`/`end`):
600
- * - `'flip'`: keep side, but swap `start` and `end` when the requested alignment overflows.
601
- * - `'shift'`: keep side and requested alignment, then nudge the popup along the
602
- * alignment axis to fit.
603
- * - `'none'`: do not correct alignment-axis overflow.
604
- *
605
- * `fallbackAxisSide` controls fallback behavior on the perpendicular axis when the
606
- * preferred axis cannot fit:
607
- * - `'start'`: allow perpendicular fallback and try the logical start side first
608
- * (`top` before `bottom`, or `left` before `right` in LTR).
609
- * - `'end'`: allow perpendicular fallback and try the logical end side first
610
- * (`bottom` before `top`, or `right` before `left` in LTR).
611
- * - `'none'`: do not fallback to the perpendicular axis.
612
- *
613
- * When `side` is `'shift'`, explicitly setting `align` only supports `'shift'` or `'none'`.
614
- * If `align` is omitted, it defaults to `'flip'`.
615
- *
616
- * @example
617
- * ```jsx
618
- * <Positioner
619
- * collisionAvoidance={{
620
- * side: 'shift',
621
- * align: 'shift',
622
- * fallbackAxisSide: 'none',
623
- * }}
624
- * />
625
- * ```
626
- *
627
- */
628
- collisionAvoidance?: CollisionAvoidance | undefined;
629
- }
630
- /**
631
- * Positions the navigation menu against the currently active trigger.
632
- * Renders a `<div>` element.
633
- *
634
- * Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
635
- */
636
- export declare const NavigationMenuPositioner: React$1.ForwardRefExoticComponent<Omit<NavigationMenuPositionerProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
637
- export interface NavigationMenuPositionerState {
638
- /**
639
- * Whether the navigation menu is currently open.
640
- */
641
- open: boolean;
642
- /**
643
- * The side of the anchor the component is placed on.
644
- */
645
- side: Side$1;
646
- /**
647
- * The alignment of the component relative to the anchor.
648
- */
649
- align: Align;
650
- /**
651
- * Whether the anchor element is hidden.
652
- */
653
- anchorHidden: boolean;
654
- /**
655
- * Whether CSS transitions should be disabled.
656
- */
657
- instant: boolean;
658
- }
659
- export interface NavigationMenuPositionerProps extends UseAnchorPositioningSharedParameters, BaseUIComponentProps<"div", NavigationMenuPositionerState> {
660
- }
661
- export declare namespace NavigationMenuPositioner {
662
- type State = NavigationMenuPositionerState;
663
- type Props = NavigationMenuPositionerProps;
664
- }
665
- /**
666
- * The clipping viewport of the navigation menu's current content.
667
- * Renders a `<div>` element.
668
- *
669
- * Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
670
- */
671
- export declare const NavigationMenuViewport: React$1.ForwardRefExoticComponent<Omit<NavigationMenuViewportProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
672
- export interface NavigationMenuViewportState {
673
- }
674
- export interface NavigationMenuViewportProps extends BaseUIComponentProps<"div", NavigationMenuViewportState> {
675
- }
676
- export declare namespace NavigationMenuViewport {
677
- type State = NavigationMenuViewportState;
678
- type Props = NavigationMenuViewportProps;
679
- }
680
- /**
681
- * A backdrop for the navigation menu popup.
682
- * Renders a `<div>` element.
683
- *
684
- * Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
685
- */
686
- export declare const NavigationMenuBackdrop: React$1.ForwardRefExoticComponent<Omit<NavigationMenuBackdropProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
687
- export interface NavigationMenuBackdropState {
688
- /**
689
- * If `true`, the popup is open.
690
- */
691
- open: boolean;
692
- /**
693
- * The transition status of the popup.
694
- */
695
- transitionStatus: TransitionStatus;
696
- }
697
- export interface NavigationMenuBackdropProps extends BaseUIComponentProps<"div", NavigationMenuBackdropState> {
698
- }
699
- export declare namespace NavigationMenuBackdrop {
700
- type State = NavigationMenuBackdropState;
701
- type Props = NavigationMenuBackdropProps;
702
- }
703
- /**
704
- * A container for the navigation menu contents.
705
- * Renders a `<nav>` element.
706
- *
707
- * Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
708
- */
709
- export declare const NavigationMenuPopup: React$1.ForwardRefExoticComponent<Omit<NavigationMenuPopupProps, "ref"> & React$1.RefAttributes<HTMLElement>>;
710
- export interface NavigationMenuPopupState {
711
- /**
712
- * If `true`, the popup is open.
713
- */
714
- open: boolean;
715
- /**
716
- * The transition status of the popup.
717
- */
718
- transitionStatus: TransitionStatus;
719
- /**
720
- * The side of the anchor the popup is positioned on.
721
- */
722
- side: Side$1;
723
- /**
724
- * The alignment of the popup relative to the anchor.
725
- */
726
- align: Align;
727
- /**
728
- * Whether the anchor element is hidden.
729
- */
730
- anchorHidden: boolean;
731
- }
732
- export interface NavigationMenuPopupProps extends BaseUIComponentProps<"nav", NavigationMenuPopupState> {
733
- }
734
- export declare namespace NavigationMenuPopup {
735
- type State = NavigationMenuPopupState;
736
- type Props = NavigationMenuPopupProps;
737
- }
738
- /**
739
- * Displays an element pointing toward the navigation menu's current anchor.
740
- * Renders a `<div>` element.
741
- *
742
- * Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
743
- */
744
- export declare const NavigationMenuArrow: React$1.ForwardRefExoticComponent<Omit<NavigationMenuArrowProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
745
- export interface NavigationMenuArrowState {
746
- /**
747
- * Whether the popup is currently open.
748
- */
749
- open: boolean;
750
- /**
751
- * The side of the anchor the component is placed on.
752
- */
753
- side: Side$1;
754
- /**
755
- * The alignment of the component relative to the anchor.
756
- */
757
- align: Align;
758
- /**
759
- * Whether the arrow cannot be centered on the anchor.
760
- */
761
- uncentered: boolean;
762
- }
763
- export interface NavigationMenuArrowProps extends BaseUIComponentProps<"div", NavigationMenuArrowState> {
764
- }
765
- export declare namespace NavigationMenuArrow {
766
- type State = NavigationMenuArrowState;
767
- type Props = NavigationMenuArrowProps;
768
- }
769
- /**
770
- * A link in the navigation menu that can be used to navigate to a different page or section.
771
- * Renders an `<a>` element.
772
- *
773
- * Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
774
- */
775
- export declare const NavigationMenuLink: React$1.ForwardRefExoticComponent<Omit<NavigationMenuLinkProps, "ref"> & React$1.RefAttributes<HTMLAnchorElement>>;
776
- export interface NavigationMenuLinkState {
777
- /**
778
- * Whether the link is the currently active page.
779
- */
780
- active: boolean;
781
- }
782
- export interface NavigationMenuLinkProps extends BaseUIComponentProps<"a", NavigationMenuLinkState> {
783
- /**
784
- * Whether the link is the currently active page.
785
- * @default false
786
- */
787
- active?: boolean | undefined;
788
- /**
789
- * Whether to close the navigation menu when the link is clicked.
790
- * @default false
791
- */
792
- closeOnClick?: boolean | undefined;
793
- }
794
- export declare namespace NavigationMenuLink {
795
- type State = NavigationMenuLinkState;
796
- type Props = NavigationMenuLinkProps;
797
- }
798
- /**
799
- * An icon that indicates that the trigger button opens a menu.
800
- *
801
- * Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
802
- */
803
- export declare const NavigationMenuIcon: React$1.ForwardRefExoticComponent<Omit<NavigationMenuIconProps, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
804
- export interface NavigationMenuIconState {
805
- /**
806
- * Whether the navigation menu is open and the item is active.
807
- */
808
- open: boolean;
809
- }
810
- export interface NavigationMenuIconProps extends BaseUIComponentProps<"span", NavigationMenuIconState> {
811
- }
812
- export declare namespace NavigationMenuIcon {
813
- type State = NavigationMenuIconState;
814
- type Props = NavigationMenuIconProps;
815
- }
816
-
817
- declare namespace NavigationMenu {
818
- export { NavigationMenuArrow as Arrow, NavigationMenuBackdrop as Backdrop, NavigationMenuContent as Content, NavigationMenuIcon as Icon, NavigationMenuItem as Item, NavigationMenuLink as Link, NavigationMenuList as List, NavigationMenuPopup as Popup, NavigationMenuPortal as Portal, NavigationMenuPositioner as Positioner, NavigationMenuRoot as Root, NavigationMenuTrigger as Trigger, NavigationMenuViewport as Viewport };
819
- }
820
-
821
- export {
822
- NavigationMenu,
823
- };
824
-
825
- export {};