@stevederico/skateboard-ui 3.12.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 +12 -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 -53
  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,1743 +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
- export type Listener<T> = (state: T) => void;
7
- declare class Store<State> {
8
- /**
9
- * The current state of the store.
10
- * This property is updated immediately when the state changes as a result of calling {@link setState}, {@link update}, or {@link set}.
11
- * To subscribe to state changes, use the {@link useState} method. The value returned by {@link useState} is updated after the component renders (similarly to React's useState).
12
- * The values can be used directly (to avoid subscribing to the store) in effects or event handlers.
13
- *
14
- * Do not modify properties in state directly. Instead, use the provided methods to ensure proper state management and listener notification.
15
- */
16
- state: State;
17
- private listeners;
18
- private updateTick;
19
- constructor(state: State);
20
- /**
21
- * Registers a listener that will be called whenever the store's state changes.
22
- *
23
- * @param fn The listener function to be called on state changes.
24
- * @returns A function to unsubscribe the listener.
25
- */
26
- subscribe: (fn: Listener<State>) => () => void;
27
- /**
28
- * Returns the current state of the store.
29
- */
30
- getSnapshot: () => State;
31
- /**
32
- * Updates the entire store's state and notifies all registered listeners.
33
- *
34
- * @param newState The new state to set for the store.
35
- */
36
- setState(newState: State): void;
37
- /**
38
- * Merges the provided changes into the current state and notifies listeners if there are changes.
39
- *
40
- * @param changes An object containing the changes to apply to the current state.
41
- */
42
- update(changes: Partial<State>): void;
43
- /**
44
- * Sets a specific key in the store's state to a new value and notifies listeners if the value has changed.
45
- *
46
- * @param key The key in the store's state to update.
47
- * @param value The new value to set for the specified key.
48
- */
49
- set<T>(key: keyof State, value: T): void;
50
- /**
51
- * Gives the state a new reference and updates all registered listeners.
52
- */
53
- notifyAll(): void;
54
- use<F extends (...args: any) => any>(selector: F, ...args: SelectorArgs<F>): ReturnType<F>;
55
- }
56
- export type SelectorArgs<Selector> = Selector extends ((...params: infer Params) => any) ? Tail<Params> : never;
57
- export type Tail<T extends readonly any[]> = T extends readonly [
58
- any,
59
- ...infer Rest
60
- ] ? Rest : [
61
- ];
62
- declare class ReactStore<State extends object, Context = Record<string, never>, Selectors extends Record<string, SelectorFunction<State>> = Record<string, never>> extends Store<State> {
63
- /**
64
- * Creates a new ReactStore instance.
65
- *
66
- * @param state Initial state of the store.
67
- * @param context Non-reactive context values.
68
- * @param selectors Optional selectors for use with `useState`.
69
- */
70
- constructor(state: State, context?: Context, selectors?: Selectors);
71
- /**
72
- * Non-reactive values such as refs, callbacks, etc.
73
- */
74
- readonly context: Context;
75
- private selectors;
76
- /**
77
- * Synchronizes a single external value into the store.
78
- *
79
- * Note that the while the value in `state` is updated immediately, the value returned
80
- * by `useState` is updated before the next render (similarly to React's `useState`).
81
- */
82
- useSyncedValue<Key extends keyof State, Value extends State[Key]>(key: keyof State, value: Value): void;
83
- /**
84
- * Synchronizes a single external value into the store and
85
- * cleans it up (sets to `undefined`) on unmount.
86
- *
87
- * Note that the while the value in `state` is updated immediately, the value returned
88
- * by `useState` is updated before the next render (similarly to React's `useState`).
89
- */
90
- useSyncedValueWithCleanup<Key extends KeysAllowingUndefined<State>>(key: Key, value: State[Key]): void;
91
- /**
92
- * Synchronizes multiple external values into the store.
93
- *
94
- * Note that the while the values in `state` are updated immediately, the values returned
95
- * by `useState` are updated before the next render (similarly to React's `useState`).
96
- */
97
- useSyncedValues(statePart: Partial<State>): void;
98
- /**
99
- * Registers a controllable prop pair (`controlled`, `defaultValue`) for a specific key. If `controlled`
100
- * is non-undefined, the store's state at `key` is updated to match `controlled`.
101
- */
102
- useControlledProp<Key extends keyof State, Value extends State[Key]>(key: keyof State, controlled: Value | undefined): void;
103
- /** Gets the current value from the store using a selector with the provided key.
104
- *
105
- * @param key Key of the selector to use.
106
- */
107
- select<Key extends keyof Selectors>(key: Key, ...args: SelectorArgs$1<Selectors[Key]>): ReturnType<Selectors[Key]>;
108
- /**
109
- * Returns a value from the store's state using a selector function.
110
- * Used to subscribe to specific parts of the state.
111
- * This methods causes a rerender whenever the selected state changes.
112
- *
113
- * @param key Key of the selector to use.
114
- */
115
- useState<Key extends keyof Selectors>(key: Key, ...args: SelectorArgs$1<Selectors[Key]>): ReturnType<Selectors[Key]>;
116
- /**
117
- * Wraps a function with `useStableCallback` to ensure it has a stable reference
118
- * and assigns it to the context.
119
- *
120
- * @param key Key of the event callback. Must be a function in the context.
121
- * @param fn Function to assign.
122
- */
123
- useContextCallback<Key extends ContextFunctionKeys<Context>>(key: Key, fn: ContextFunction<Context, Key> | undefined): void;
124
- /**
125
- * Returns a stable setter function for a specific key in the store's state.
126
- * It's commonly used to pass as a ref callback to React elements.
127
- *
128
- * @param key Key of the state to set.
129
- */
130
- useStateSetter<const Key extends keyof State, Value extends State[Key]>(key: keyof State): (v: Value) => void;
131
- /**
132
- * Observes changes derived from the store's selectors and calls the listener when the selected value changes.
133
- *
134
- * @param key Key of the selector to observe.
135
- * @param listener Listener function called when the selector result changes.
136
- */
137
- observe<Key extends keyof Selectors>(selector: Key, listener: (newValue: ReturnType<Selectors[Key]>, oldValue: ReturnType<Selectors[Key]>, store: this) => void): () => void;
138
- observe<Selector extends ObserveSelector<State>>(selector: Selector, listener: (newValue: ReturnType<Selector>, oldValue: ReturnType<Selector>, store: this) => void): () => void;
139
- }
140
- export type MaybeCallable = (...args: any[]) => any;
141
- export type ContextFunctionKeys<Context> = {
142
- [Key in keyof Context]-?: Extract<Context[Key], MaybeCallable> extends never ? never : Key;
143
- }[keyof Context];
144
- export type ContextFunction<Context, Key extends keyof Context> = Extract<Context[Key], MaybeCallable>;
145
- export type KeysAllowingUndefined<State> = {
146
- [Key in keyof State]-?: undefined extends State[Key] ? Key : never;
147
- }[keyof State];
148
- export type ObserveSelector<State> = (state: State) => any;
149
- export type SelectorFunction<State> = (state: State, ...args: any[]) => any;
150
- type Tail$1<T extends readonly any[]> = T extends readonly [
151
- any,
152
- ...infer Rest
153
- ] ? Rest : [
154
- ];
155
- type SelectorArgs$1<Selector> = Selector extends ((...params: infer Params) => any) ? Tail$1<Params> : never;
156
- export type TimeoutId = number;
157
- declare class Timeout {
158
- static create(): Timeout;
159
- currentId: TimeoutId;
160
- /**
161
- * Executes `fn` after `delay`, clearing any previously scheduled call.
162
- */
163
- start(delay: number, fn: Function): void;
164
- isStarted(): boolean;
165
- clear: () => void;
166
- disposeEffect: () => () => void;
167
- }
168
- export type InteractionType = "mouse" | "touch" | "pen" | "keyboard" | "";
169
- export declare type AlignedPlacement = `${Side}-${Alignment}`;
170
- export declare type Alignment = "start" | "end";
171
- export declare type Axis = "x" | "y";
172
- export declare type ClientRectObject = Prettify<Rect & SideObject>;
173
- export declare type Coords = {
174
- [key in Axis]: number;
175
- };
176
- export declare type Dimensions = {
177
- [key in Length]: number;
178
- };
179
- export declare type Length = "width" | "height";
180
- export declare type Padding = number | Prettify<Partial<SideObject>>;
181
- export declare type Placement = Prettify<Side | AlignedPlacement>;
182
- export declare type Prettify<T> = {
183
- [K in keyof T]: T[K];
184
- } & {};
185
- export declare type Rect = Prettify<Coords & Dimensions>;
186
- export declare type Side = "top" | "right" | "bottom" | "left";
187
- export declare type SideObject = {
188
- [key in Side]: number;
189
- };
190
- export declare type Strategy = "absolute" | "fixed";
191
- export declare interface ComputePositionReturn extends Coords {
192
- /**
193
- * The final chosen placement of the floating element.
194
- */
195
- placement: Placement;
196
- /**
197
- * The strategy used to position the floating element.
198
- */
199
- strategy: Strategy;
200
- /**
201
- * Object containing data returned from all middleware, keyed by their name.
202
- */
203
- middlewareData: MiddlewareData;
204
- }
205
- export declare interface MiddlewareData {
206
- [key: string]: any;
207
- arrow?: Partial<Coords> & {
208
- centerOffset: number;
209
- alignmentOffset?: number;
210
- };
211
- autoPlacement?: {
212
- index?: number;
213
- overflows: Array<{
214
- placement: Placement;
215
- overflows: Array<number>;
216
- }>;
217
- };
218
- flip?: {
219
- index?: number;
220
- overflows: Array<{
221
- placement: Placement;
222
- overflows: Array<number>;
223
- }>;
224
- };
225
- hide?: {
226
- referenceHidden?: boolean;
227
- escaped?: boolean;
228
- referenceHiddenOffsets?: SideObject;
229
- escapedOffsets?: SideObject;
230
- };
231
- offset?: Coords & {
232
- placement: Placement;
233
- };
234
- shift?: Coords & {
235
- enabled: {
236
- [key in Axis]: boolean;
237
- };
238
- };
239
- }
240
- /**
241
- * Custom positioning reference element.
242
- * @see https://floating-ui.com/docs/virtual-elements
243
- */
244
- export declare interface VirtualElement {
245
- getBoundingClientRect(): ClientRectObject;
246
- getClientRects?(): Array<ClientRectObject> | DOMRectList;
247
- contextElement?: Element;
248
- }
249
- declare type Prettify$1<T> = {
250
- [K in keyof T]: T[K];
251
- } & {};
252
- export declare type ReferenceType = Element | VirtualElement;
253
- export declare type UseFloatingData = Prettify$1<ComputePositionReturn & {
254
- isPositioned: boolean;
255
- }>;
256
- export declare type UseFloatingReturn<RT extends ReferenceType = ReferenceType> = Prettify$1<UseFloatingData & {
257
- /**
258
- * Update the position of the floating element, re-rendering the component
259
- * if required.
260
- */
261
- update: () => void;
262
- /**
263
- * Pre-configured positioning styles to apply to the floating element.
264
- */
265
- floatingStyles: React$1.CSSProperties;
266
- /**
267
- * Object containing the reference and floating refs and reactive setters.
268
- */
269
- refs: {
270
- /**
271
- * A React ref to the reference element.
272
- */
273
- reference: React$1.MutableRefObject<RT | null>;
274
- /**
275
- * A React ref to the floating element.
276
- */
277
- floating: React$1.MutableRefObject<HTMLElement | null>;
278
- /**
279
- * A callback to set the reference element (reactive).
280
- */
281
- setReference: (node: RT | null) => void;
282
- /**
283
- * A callback to set the floating element (reactive).
284
- */
285
- setFloating: (node: HTMLElement | null) => void;
286
- };
287
- /**
288
- * Object containing the reference and floating elements.
289
- */
290
- elements: {
291
- reference: RT | null;
292
- floating: HTMLElement | null;
293
- };
294
- }>;
295
- declare const none: "none";
296
- declare const triggerPress: "trigger-press";
297
- declare const triggerHover: "trigger-hover";
298
- declare const triggerFocus: "trigger-focus";
299
- declare const outsidePress: "outside-press";
300
- declare const itemPress: "item-press";
301
- declare const closePress: "close-press";
302
- declare const linkPress: "link-press";
303
- declare const clearPress: "clear-press";
304
- declare const chipRemovePress: "chip-remove-press";
305
- declare const trackPress: "track-press";
306
- declare const incrementPress: "increment-press";
307
- declare const decrementPress: "decrement-press";
308
- declare const inputChange: "input-change";
309
- declare const inputClear: "input-clear";
310
- declare const inputBlur: "input-blur";
311
- declare const inputPaste: "input-paste";
312
- declare const inputPress: "input-press";
313
- declare const focusOut: "focus-out";
314
- declare const escapeKey: "escape-key";
315
- declare const closeWatcher: "close-watcher";
316
- declare const listNavigation: "list-navigation";
317
- declare const keyboard: "keyboard";
318
- declare const pointer: "pointer";
319
- declare const drag: "drag";
320
- declare const wheel: "wheel";
321
- declare const scrub: "scrub";
322
- declare const cancelOpen: "cancel-open";
323
- declare const siblingOpen: "sibling-open";
324
- declare const disabled: "disabled";
325
- declare const missing: "missing";
326
- declare const initial: "initial";
327
- declare const imperativeAction: "imperative-action";
328
- declare const swipe: "swipe";
329
- declare const windowResize: "window-resize";
330
- export interface ReasonToEventMap {
331
- [none]: Event;
332
- [triggerPress]: MouseEvent | PointerEvent | TouchEvent | KeyboardEvent;
333
- [triggerHover]: MouseEvent;
334
- [triggerFocus]: FocusEvent;
335
- [outsidePress]: MouseEvent | PointerEvent | TouchEvent;
336
- [itemPress]: MouseEvent | KeyboardEvent | PointerEvent;
337
- [closePress]: MouseEvent | KeyboardEvent | PointerEvent;
338
- [linkPress]: MouseEvent | PointerEvent;
339
- [clearPress]: PointerEvent | MouseEvent | KeyboardEvent;
340
- [chipRemovePress]: PointerEvent | MouseEvent | KeyboardEvent;
341
- [trackPress]: PointerEvent | MouseEvent | TouchEvent;
342
- [incrementPress]: PointerEvent | MouseEvent | TouchEvent;
343
- [decrementPress]: PointerEvent | MouseEvent | TouchEvent;
344
- [inputChange]: InputEvent | Event;
345
- [inputClear]: InputEvent | FocusEvent | Event;
346
- [inputBlur]: FocusEvent;
347
- [inputPaste]: ClipboardEvent;
348
- [inputPress]: MouseEvent | PointerEvent | TouchEvent | KeyboardEvent;
349
- [focusOut]: FocusEvent | KeyboardEvent;
350
- [escapeKey]: KeyboardEvent;
351
- [closeWatcher]: Event;
352
- [listNavigation]: KeyboardEvent;
353
- [keyboard]: KeyboardEvent;
354
- [pointer]: PointerEvent;
355
- [drag]: PointerEvent | TouchEvent;
356
- [swipe]: PointerEvent | TouchEvent;
357
- [wheel]: WheelEvent;
358
- [scrub]: PointerEvent;
359
- [cancelOpen]: MouseEvent;
360
- [siblingOpen]: Event;
361
- [disabled]: Event;
362
- [missing]: Event;
363
- [initial]: Event;
364
- [imperativeAction]: Event;
365
- [windowResize]: UIEvent;
366
- }
367
- /**
368
- * Maps a change `reason` string to the corresponding native event type.
369
- */
370
- export type ReasonToEvent<Reason extends string> = Reason extends keyof ReasonToEventMap ? ReasonToEventMap[Reason] : Event;
371
- export type BaseUIChangeEventDetail<Reason extends string, CustomProperties extends object> = {
372
- /**
373
- * The reason for the event.
374
- */
375
- reason: Reason;
376
- /**
377
- * The native event associated with the custom event.
378
- */
379
- event: ReasonToEvent<Reason>;
380
- /**
381
- * Cancels Base UI from handling the event.
382
- */
383
- cancel: () => void;
384
- /**
385
- * Allows the event to propagate in cases where Base UI will stop the propagation.
386
- */
387
- allowPropagation: () => void;
388
- /**
389
- * Indicates whether the event has been canceled.
390
- */
391
- isCanceled: boolean;
392
- /**
393
- * Indicates whether the event is allowed to propagate.
394
- */
395
- isPropagationAllowed: boolean;
396
- /**
397
- * The element that triggered the event, if applicable.
398
- */
399
- trigger: Element | undefined;
400
- } & CustomProperties;
401
- /**
402
- * Details of custom change events emitted by Base UI components.
403
- */
404
- export type BaseUIChangeEventDetails<Reason extends string, CustomProperties extends object = {}> = Reason extends string ? BaseUIChangeEventDetail<Reason, CustomProperties> & {} : never;
405
- export type TransitionStatus = "starting" | "ending" | "idle" | undefined;
406
- export interface FloatingRootState {
407
- open: boolean;
408
- transitionStatus: TransitionStatus | undefined;
409
- domReferenceElement: Element | null;
410
- referenceElement: ReferenceType$1 | null;
411
- floatingElement: HTMLElement | null;
412
- positionReference: ReferenceType$1 | null;
413
- /**
414
- * The ID of the floating element.
415
- */
416
- floatingId: string | undefined;
417
- }
418
- export interface FloatingRootStoreContext {
419
- onOpenChange: ((open: boolean, eventDetails: BaseUIChangeEventDetails<string>) => void) | undefined;
420
- readonly dataRef: React$1.RefObject<ContextData>;
421
- readonly events: FloatingEvents;
422
- nested: boolean;
423
- readonly triggerElements: PopupTriggerMap;
424
- }
425
- declare const selectors: {
426
- open: (state: FloatingRootState) => boolean;
427
- transitionStatus: (state: FloatingRootState) => TransitionStatus;
428
- domReferenceElement: (state: FloatingRootState) => Element | null;
429
- referenceElement: (state: FloatingRootState) => ReferenceType$1 | null;
430
- floatingElement: (state: FloatingRootState) => HTMLElement | null;
431
- floatingId: (state: FloatingRootState) => string | undefined;
432
- };
433
- export interface FloatingRootStoreOptions {
434
- open: boolean;
435
- transitionStatus: TransitionStatus | undefined;
436
- referenceElement: ReferenceType$1 | null;
437
- floatingElement: HTMLElement | null;
438
- triggerElements: PopupTriggerMap;
439
- floatingId: string | undefined;
440
- /**
441
- * When true, `setOpen` only forwards to `onOpenChange`.
442
- * The popup store owns `dispatchOpenChange(...)` in this mode.
443
- */
444
- syncOnly: boolean;
445
- nested: boolean;
446
- onOpenChange: ((open: boolean, eventDetails: BaseUIChangeEventDetails<string>) => void) | undefined;
447
- }
448
- declare class FloatingRootStore extends ReactStore<Readonly<FloatingRootState>, FloatingRootStoreContext, typeof selectors> {
449
- private readonly syncOnly;
450
- constructor(options: FloatingRootStoreOptions);
451
- /**
452
- * Syncs the event used by hover logic to distinguish hover-open from click-like interaction.
453
- */
454
- syncOpenEvent: (newOpen: boolean, event: Event | undefined) => void;
455
- /**
456
- * Runs the root-owned side effects for an open state change.
457
- */
458
- dispatchOpenChange: (newOpen: boolean, eventDetails: BaseUIChangeEventDetails<string>) => void;
459
- /**
460
- * Emits the `openchange` event through the internal event emitter and calls the `onOpenChange` handler with the provided arguments.
461
- *
462
- * @param newOpen The new open state.
463
- * @param eventDetails Details about the event that triggered the open state change.
464
- */
465
- setOpen: (newOpen: boolean, eventDetails: BaseUIChangeEventDetails<string>) => void;
466
- }
467
- export type HTMLProps<T = any> = React$1.HTMLAttributes<T> & {
468
- ref?: React$1.Ref<T> | undefined;
469
- };
470
- /**
471
- * 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.
472
- *
473
- * @template Props Props to be spread on the rendered element.
474
- * @template State Component's internal state.
475
- */
476
- export type ComponentRenderFn<Props, State> = (props: Props, state: State) => React$1.ReactElement<unknown>;
477
- export type BaseUIEvent<E extends React$1.SyntheticEvent<Element, Event>> = E & {
478
- preventBaseUIHandler: () => void;
479
- readonly baseUIHandlerPrevented?: boolean | undefined;
480
- };
481
- 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;
482
- /**
483
- * Adds a `preventBaseUIHandler` method to all event handlers.
484
- */
485
- export type WithBaseUIEvent<T> = {
486
- [K in keyof T]: WithPreventBaseUIHandler<T[K]>;
487
- };
488
- /**
489
- * Props shared by all Base UI components.
490
- * Contains `className` (string or callback taking the component's state as an argument) and `render` (function to customize rendering).
491
- */
492
- export type BaseUIComponentProps<ElementType extends React$1.ElementType, State, RenderFunctionProps = HTMLProps> = Omit<WithBaseUIEvent<React$1.ComponentPropsWithRef<ElementType>>, "className" | "color" | "defaultValue" | "defaultChecked" | "style"> & {
493
- /**
494
- * CSS class applied to the element, or a function that
495
- * returns a class based on the component's state.
496
- */
497
- className?: string | ((state: State) => string | undefined) | undefined;
498
- /**
499
- * Allows you to replace the component's HTML element
500
- * with a different tag, or compose it with another component.
501
- *
502
- * Accepts a `ReactElement` or a function that returns the element to render.
503
- */
504
- render?: React$1.ReactElement | ComponentRenderFn<RenderFunctionProps, State> | undefined;
505
- /**
506
- * Style applied to the element, or a function that
507
- * returns a style object based on the component's state.
508
- */
509
- style?: React$1.CSSProperties | ((state: State) => React$1.CSSProperties | undefined) | undefined;
510
- };
511
- export interface NativeButtonProps {
512
- /**
513
- * Whether the component renders a native `<button>` element when replacing it
514
- * via the `render` prop.
515
- * Set to `false` if the rendered element is not a button (for example, `<div>`).
516
- * @default true
517
- */
518
- nativeButton?: boolean | undefined;
519
- }
520
- export interface UseRenderElementComponentProps<State> {
521
- /**
522
- * The class name to apply to the rendered element.
523
- * Can be a string or a function that accepts the state and returns a string.
524
- */
525
- className?: string | ((state: State) => string | undefined) | undefined;
526
- /**
527
- * The render prop or React element to override the default element.
528
- */
529
- render?: undefined | React$1.ReactElement | ComponentRenderFn<React$1.HTMLAttributes<any>, State>;
530
- /**
531
- * The style to apply to the rendered element.
532
- * Can be a style object or a function that accepts the state and returns a style object.
533
- */
534
- style?: React$1.CSSProperties | ((state: State) => React$1.CSSProperties | undefined) | undefined;
535
- }
536
- export interface UseFloatingPortalNodeProps {
537
- ref?: React$1.Ref<HTMLDivElement> | undefined;
538
- container?: HTMLElement | ShadowRoot | null | React$1.RefObject<HTMLElement | ShadowRoot | null> | undefined;
539
- componentProps?: UseRenderElementComponentProps<any> | undefined;
540
- elementProps?: React$1.HTMLAttributes<HTMLDivElement> | undefined;
541
- }
542
- declare const FloatingPortal: React$1.ForwardRefExoticComponent<Omit<FloatingPortal.Props<any> & {
543
- renderGuards?: boolean | undefined;
544
- }, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
545
- export interface FloatingPortalState {
546
- }
547
- declare namespace FloatingPortal {
548
- type State = FloatingPortalState;
549
- interface Props<TState> extends BaseUIComponentProps<"div", TState> {
550
- /**
551
- * A parent element to render the portal element into.
552
- */
553
- container?: UseFloatingPortalNodeProps["container"] | undefined;
554
- }
555
- }
556
- export type NarrowedElement<T> = T extends Element ? T : Element;
557
- export interface ExtendedRefs {
558
- reference: React$1.RefObject<ReferenceType$1 | null>;
559
- floating: React$1.RefObject<HTMLElement | null>;
560
- domReference: React$1.RefObject<NarrowedElement<ReferenceType$1> | null>;
561
- setReference(node: ReferenceType$1 | null): void;
562
- setFloating(node: HTMLElement | null): void;
563
- setPositionReference(node: ReferenceType$1 | null): void;
564
- }
565
- export interface ExtendedElements {
566
- reference: ReferenceType$1 | null;
567
- floating: HTMLElement | null;
568
- domReference: NarrowedElement<ReferenceType$1> | null;
569
- }
570
- export interface FloatingEvents {
571
- emit<T extends string>(event: T, data?: any): void;
572
- on(event: string, handler: (data: any) => void): void;
573
- off(event: string, handler: (data: any) => void): void;
574
- }
575
- export interface ContextData {
576
- openEvent?: Event | undefined;
577
- floatingContext?: FloatingContext | undefined;
578
- [key: string]: any;
579
- }
580
- export type FloatingRootContext = FloatingRootStore;
581
- export type FloatingContext = Omit<UseFloatingReturn<ReferenceType$1>, "refs" | "elements"> & {
582
- open: boolean;
583
- onOpenChange(open: boolean, eventDetails: BaseUIChangeEventDetails<string>): void;
584
- events: FloatingEvents;
585
- dataRef: React$1.RefObject<ContextData>;
586
- nodeId: string | undefined;
587
- floatingId: string | undefined;
588
- refs: ExtendedRefs;
589
- elements: ExtendedElements;
590
- rootStore: FloatingRootContext;
591
- };
592
- type ReferenceType$1 = Element | VirtualElement;
593
- declare class PopupTriggerMap {
594
- private elementsSet;
595
- private idMap;
596
- constructor();
597
- /**
598
- * Adds a trigger element with the given ID.
599
- *
600
- * Note: The provided element is assumed to not be registered under multiple IDs.
601
- */
602
- add(id: string, element: Element): void;
603
- /**
604
- * Removes the trigger element with the given ID.
605
- */
606
- delete(id: string): void;
607
- /**
608
- * Whether the given element is registered as a trigger.
609
- */
610
- hasElement(element: Element): boolean;
611
- /**
612
- * Whether there is a registered trigger element matching the given predicate.
613
- */
614
- hasMatchingElement(predicate: (el: Element) => boolean): boolean;
615
- /**
616
- * Returns the trigger element associated with the given ID, or undefined if no such element exists.
617
- */
618
- getById(id: string): Element | undefined;
619
- /**
620
- * Returns an iterable of all registered trigger entries, where each entry is a tuple of [id, element].
621
- */
622
- entries(): IterableIterator<[
623
- string,
624
- Element
625
- ]>;
626
- /**
627
- * Returns an iterable of all registered trigger elements.
628
- */
629
- elements(): IterableIterator<Element>;
630
- /**
631
- * Returns the number of registered trigger elements.
632
- */
633
- get size(): number;
634
- }
635
- /**
636
- * State common to all popup stores.
637
- */
638
- export type PopupStoreState<Payload> = {
639
- /**
640
- * Whether the popup is open (internal state).
641
- */
642
- open: boolean;
643
- /**
644
- * Whether the popup is open (external prop).
645
- */
646
- readonly openProp: boolean | undefined;
647
- /**
648
- * Whether the popup should be mounted in the DOM.
649
- * This usually follows `open` but can be different during exit transitions.
650
- */
651
- mounted: boolean;
652
- /**
653
- * The current enter/exit transition status of the popup.
654
- */
655
- transitionStatus: TransitionStatus;
656
- floatingRootContext: FloatingRootContext;
657
- floatingId: string | undefined;
658
- /**
659
- * Number of trigger elements currently registered for this popup.
660
- */
661
- triggerCount: number;
662
- /**
663
- * Whether to prevent unmounting the popup when closed.
664
- * Useful for interacting with JS animation libraries that control unmounting themselves.
665
- */
666
- preventUnmountingOnClose: boolean;
667
- /**
668
- * Optional payload set by the trigger.
669
- */
670
- payload: Payload | undefined;
671
- /**
672
- * ID of the currently active trigger.
673
- */
674
- activeTriggerId: string | null;
675
- /**
676
- * The currently active trigger DOM element.
677
- */
678
- activeTriggerElement: Element | null;
679
- /**
680
- * ID of the trigger (external prop).
681
- */
682
- readonly triggerIdProp: string | null | undefined;
683
- /**
684
- * The popup DOM element.
685
- */
686
- popupElement: HTMLElement | null;
687
- /**
688
- * The positioner DOM element.
689
- */
690
- positionerElement: HTMLElement | null;
691
- /**
692
- * Props to spread onto the active trigger element.
693
- */
694
- activeTriggerProps: HTMLProps;
695
- /**
696
- * Props to spread onto inactive trigger elements.
697
- */
698
- inactiveTriggerProps: HTMLProps;
699
- /**
700
- * Props to spread onto the popup element.
701
- */
702
- popupProps: HTMLProps;
703
- };
704
- export type PopupStoreContext<ChangeEventDetails> = {
705
- /**
706
- * Map of registered trigger elements.
707
- */
708
- readonly triggerElements: PopupTriggerMap;
709
- /**
710
- * Reference to the popup element.
711
- */
712
- readonly popupRef: React$1.RefObject<HTMLElement | null>;
713
- /**
714
- * Callback fired when the open state changes.
715
- */
716
- onOpenChange?: ((open: boolean, eventDetails: ChangeEventDetails) => void) | undefined;
717
- /**
718
- * Callback fired when the open state change animation completes.
719
- */
720
- onOpenChangeComplete: ((open: boolean) => void) | undefined;
721
- };
722
- export type PayloadChildRenderFunction<Payload> = (arg: {
723
- payload: Payload | undefined;
724
- }) => React$1.ReactNode;
725
- type Side$1 = "top" | "bottom" | "left" | "right" | "inline-end" | "inline-start";
726
- export type Align = "start" | "center" | "end";
727
- export type Boundary = "clipping-ancestors" | Element | Element[] | Rect;
728
- export type OffsetFunction = (data: {
729
- side: Side$1;
730
- align: Align;
731
- anchor: {
732
- width: number;
733
- height: number;
734
- };
735
- positioner: {
736
- width: number;
737
- height: number;
738
- };
739
- }) => number;
740
- export interface SideFlipMode {
741
- /**
742
- * How to avoid collisions on the side axis.
743
- * - `'flip'`: If there is not enough space, place the popup on the opposite side.
744
- * - `'none'`: Keep the preferred side even if it overflows.
745
- */
746
- side?: "flip" | "none" | undefined;
747
- /**
748
- * How to avoid collisions on the align axis.
749
- * - `'flip'`: If there is not enough space, swap `'start'` and `'end'` alignment.
750
- * - `'shift'`: Keep the alignment and shift the popup to fit within the boundary.
751
- * - `'none'`: Keep the preferred alignment even if it overflows.
752
- */
753
- align?: "flip" | "shift" | "none" | undefined;
754
- /**
755
- * If both sides on the preferred axis do not fit, determines whether to fallback
756
- * to a side on the perpendicular axis and which logical side to prefer.
757
- * - `'start'`: Prefer the logical start side on the perpendicular axis.
758
- * - `'end'`: Prefer the logical end side on the perpendicular axis.
759
- * - `'none'`: Do not fallback to the perpendicular axis.
760
- */
761
- fallbackAxisSide?: "start" | "end" | "none" | undefined;
762
- }
763
- export interface SideShiftMode {
764
- /**
765
- * How to avoid collisions on the side axis.
766
- * - `'shift'`: Keep the preferred side and shift the popup to fit within the boundary.
767
- * - `'none'`: Keep the preferred side even if it overflows.
768
- */
769
- side?: "shift" | "none" | undefined;
770
- /**
771
- * How to avoid collisions on the align axis.
772
- * - `'shift'`: Keep the alignment and shift the popup to fit within the boundary.
773
- * - `'none'`: Keep the preferred alignment even if it overflows.
774
- */
775
- align?: "shift" | "none" | undefined;
776
- /**
777
- * If both sides on the preferred axis do not fit, determines whether to fallback
778
- * to a side on the perpendicular axis and which logical side to prefer.
779
- * - `'start'`: Prefer the logical start side on the perpendicular axis.
780
- * - `'end'`: Prefer the logical end side on the perpendicular axis.
781
- * - `'none'`: Do not fallback to the perpendicular axis.
782
- */
783
- fallbackAxisSide?: "start" | "end" | "none" | undefined;
784
- }
785
- export type CollisionAvoidance = SideFlipMode | SideShiftMode;
786
- export interface UseAnchorPositioningSharedParameters {
787
- /**
788
- * An element to position the popup against.
789
- * By default, the popup will be positioned against the trigger.
790
- */
791
- anchor?: Element | null | VirtualElement | React$1.RefObject<Element | null> | (() => Element | VirtualElement | null) | undefined;
792
- /**
793
- * Determines which CSS `position` property to use.
794
- * @default 'absolute'
795
- */
796
- positionMethod?: "absolute" | "fixed" | undefined;
797
- /**
798
- * Which side of the anchor element to align the popup against.
799
- * May automatically change to avoid collisions.
800
- * @default 'bottom'
801
- */
802
- side?: Side$1 | undefined;
803
- /**
804
- * Distance between the anchor and the popup in pixels.
805
- * Also accepts a function that returns the distance to read the dimensions of the anchor
806
- * and positioner elements, along with its side and alignment.
807
- *
808
- * The function takes a `data` object parameter with the following properties:
809
- * - `data.anchor`: the dimensions of the anchor element with properties `width` and `height`.
810
- * - `data.positioner`: the dimensions of the positioner element with properties `width` and `height`.
811
- * - `data.side`: which side of the anchor element the positioner is aligned against.
812
- * - `data.align`: how the positioner is aligned relative to the specified side.
813
- *
814
- * @example
815
- * ```jsx
816
- * <Positioner
817
- * sideOffset={({ side, align, anchor, positioner }) => {
818
- * return side === 'top' || side === 'bottom'
819
- * ? anchor.height
820
- * : anchor.width;
821
- * }}
822
- * />
823
- * ```
824
- *
825
- * @default 0
826
- */
827
- sideOffset?: number | OffsetFunction | undefined;
828
- /**
829
- * How to align the popup relative to the specified side.
830
- * @default 'center'
831
- */
832
- align?: Align | undefined;
833
- /**
834
- * Additional offset along the alignment axis in pixels.
835
- * Also accepts a function that returns the offset to read the dimensions of the anchor
836
- * and positioner elements, along with its side and alignment.
837
- *
838
- * The function takes a `data` object parameter with the following properties:
839
- * - `data.anchor`: the dimensions of the anchor element with properties `width` and `height`.
840
- * - `data.positioner`: the dimensions of the positioner element with properties `width` and `height`.
841
- * - `data.side`: which side of the anchor element the positioner is aligned against.
842
- * - `data.align`: how the positioner is aligned relative to the specified side.
843
- *
844
- * @example
845
- * ```jsx
846
- * <Positioner
847
- * alignOffset={({ side, align, anchor, positioner }) => {
848
- * return side === 'top' || side === 'bottom'
849
- * ? anchor.width
850
- * : anchor.height;
851
- * }}
852
- * />
853
- * ```
854
- *
855
- * @default 0
856
- */
857
- alignOffset?: number | OffsetFunction | undefined;
858
- /**
859
- * An element or a rectangle that delimits the area that the popup is confined to.
860
- * @default 'clipping-ancestors'
861
- */
862
- collisionBoundary?: Boundary | undefined;
863
- /**
864
- * Additional space to maintain from the edge of the collision boundary.
865
- * @default 5
866
- */
867
- collisionPadding?: Padding | undefined;
868
- /**
869
- * Whether to maintain the popup in the viewport after
870
- * the anchor element was scrolled out of view.
871
- * @default false
872
- */
873
- sticky?: boolean | undefined;
874
- /**
875
- * Minimum distance to maintain between the arrow and the edges of the popup.
876
- *
877
- * Use it to prevent the arrow element from hanging out of the rounded corners of a popup.
878
- * @default 5
879
- */
880
- arrowPadding?: number | undefined;
881
- /**
882
- * Whether to disable the popup from tracking any layout shift of its positioning anchor.
883
- * @default false
884
- */
885
- disableAnchorTracking?: boolean | undefined;
886
- /**
887
- * Determines how to handle collisions when positioning the popup.
888
- *
889
- * `side` controls overflow on the preferred placement axis (`top`/`bottom` or `left`/`right`):
890
- * - `'flip'`: keep the requested side when it fits; otherwise try the opposite side
891
- * (`top` and `bottom`, or `left` and `right`).
892
- * - `'shift'`: never change side; keep the requested side and move the popup within
893
- * the clipping boundary so it stays visible.
894
- * - `'none'`: do not correct side-axis overflow.
895
- *
896
- * `align` controls overflow on the alignment axis (`start`/`center`/`end`):
897
- * - `'flip'`: keep side, but swap `start` and `end` when the requested alignment overflows.
898
- * - `'shift'`: keep side and requested alignment, then nudge the popup along the
899
- * alignment axis to fit.
900
- * - `'none'`: do not correct alignment-axis overflow.
901
- *
902
- * `fallbackAxisSide` controls fallback behavior on the perpendicular axis when the
903
- * preferred axis cannot fit:
904
- * - `'start'`: allow perpendicular fallback and try the logical start side first
905
- * (`top` before `bottom`, or `left` before `right` in LTR).
906
- * - `'end'`: allow perpendicular fallback and try the logical end side first
907
- * (`bottom` before `top`, or `right` before `left` in LTR).
908
- * - `'none'`: do not fallback to the perpendicular axis.
909
- *
910
- * When `side` is `'shift'`, explicitly setting `align` only supports `'shift'` or `'none'`.
911
- * If `align` is omitted, it defaults to `'flip'`.
912
- *
913
- * @example
914
- * ```jsx
915
- * <Positioner
916
- * collisionAvoidance={{
917
- * side: 'shift',
918
- * align: 'shift',
919
- * fallbackAxisSide: 'none',
920
- * }}
921
- * />
922
- * ```
923
- *
924
- */
925
- collisionAvoidance?: CollisionAvoidance | undefined;
926
- }
927
- export type State<Payload> = PopupStoreState<Payload> & {
928
- disabled: boolean;
929
- instantType: "dismiss" | "click" | "focus" | "trigger-change" | undefined;
930
- modal: boolean | "trap-focus";
931
- focusManagerModal: boolean;
932
- openMethod: InteractionType | null;
933
- openChangeReason: PopoverRoot.ChangeEventReason | null;
934
- stickIfOpen: boolean;
935
- nested: boolean;
936
- titleElementId: string | undefined;
937
- descriptionElementId: string | undefined;
938
- openOnHover: boolean;
939
- closeDelay: number;
940
- hasViewport: boolean;
941
- };
942
- export type Context = PopupStoreContext<PopoverRoot.ChangeEventDetails> & {
943
- readonly popupRef: React$1.RefObject<HTMLElement | null>;
944
- readonly backdropRef: React$1.RefObject<HTMLDivElement | null>;
945
- readonly internalBackdropRef: React$1.RefObject<HTMLDivElement | null>;
946
- readonly triggerFocusTargetRef: React$1.RefObject<HTMLElement | null>;
947
- readonly beforeContentFocusGuardRef: React$1.RefObject<HTMLElement | null>;
948
- readonly stickIfOpenTimeout: Timeout;
949
- };
950
- declare const selectors$1: {
951
- disabled: (state: State<unknown>) => boolean;
952
- instantType: (state: State<unknown>) => "click" | "focus" | "dismiss" | "trigger-change" | undefined;
953
- openMethod: (state: State<unknown>) => InteractionType | null;
954
- openChangeReason: (state: State<unknown>) => PopoverRootChangeEventReason | null;
955
- modal: (state: State<unknown>) => boolean | "trap-focus";
956
- focusManagerModal: (state: State<unknown>) => boolean;
957
- stickIfOpen: (state: State<unknown>) => boolean;
958
- titleElementId: (state: State<unknown>) => string | undefined;
959
- descriptionElementId: (state: State<unknown>) => string | undefined;
960
- openOnHover: (state: State<unknown>) => boolean;
961
- closeDelay: (state: State<unknown>) => number;
962
- hasViewport: (state: State<unknown>) => boolean;
963
- open: (state: {
964
- open: boolean;
965
- readonly openProp: boolean | undefined;
966
- mounted: boolean;
967
- transitionStatus: TransitionStatus;
968
- floatingRootContext: FloatingRootContext;
969
- floatingId: string | undefined;
970
- triggerCount: number;
971
- preventUnmountingOnClose: boolean;
972
- payload: unknown;
973
- activeTriggerId: string | null;
974
- activeTriggerElement: Element | null;
975
- readonly triggerIdProp: string | null | undefined;
976
- popupElement: HTMLElement | null;
977
- positionerElement: HTMLElement | null;
978
- activeTriggerProps: HTMLProps;
979
- inactiveTriggerProps: HTMLProps;
980
- popupProps: HTMLProps;
981
- }) => boolean;
982
- mounted: (state: {
983
- open: boolean;
984
- readonly openProp: boolean | undefined;
985
- mounted: boolean;
986
- transitionStatus: TransitionStatus;
987
- floatingRootContext: FloatingRootContext;
988
- floatingId: string | undefined;
989
- triggerCount: number;
990
- preventUnmountingOnClose: boolean;
991
- payload: unknown;
992
- activeTriggerId: string | null;
993
- activeTriggerElement: Element | null;
994
- readonly triggerIdProp: string | null | undefined;
995
- popupElement: HTMLElement | null;
996
- positionerElement: HTMLElement | null;
997
- activeTriggerProps: HTMLProps;
998
- inactiveTriggerProps: HTMLProps;
999
- popupProps: HTMLProps;
1000
- }) => boolean;
1001
- transitionStatus: (state: {
1002
- open: boolean;
1003
- readonly openProp: boolean | undefined;
1004
- mounted: boolean;
1005
- transitionStatus: TransitionStatus;
1006
- floatingRootContext: FloatingRootContext;
1007
- floatingId: string | undefined;
1008
- triggerCount: number;
1009
- preventUnmountingOnClose: boolean;
1010
- payload: unknown;
1011
- activeTriggerId: string | null;
1012
- activeTriggerElement: Element | null;
1013
- readonly triggerIdProp: string | null | undefined;
1014
- popupElement: HTMLElement | null;
1015
- positionerElement: HTMLElement | null;
1016
- activeTriggerProps: HTMLProps;
1017
- inactiveTriggerProps: HTMLProps;
1018
- popupProps: HTMLProps;
1019
- }) => TransitionStatus;
1020
- floatingRootContext: (state: {
1021
- open: boolean;
1022
- readonly openProp: boolean | undefined;
1023
- mounted: boolean;
1024
- transitionStatus: TransitionStatus;
1025
- floatingRootContext: FloatingRootContext;
1026
- floatingId: string | undefined;
1027
- triggerCount: number;
1028
- preventUnmountingOnClose: boolean;
1029
- payload: unknown;
1030
- activeTriggerId: string | null;
1031
- activeTriggerElement: Element | null;
1032
- readonly triggerIdProp: string | null | undefined;
1033
- popupElement: HTMLElement | null;
1034
- positionerElement: HTMLElement | null;
1035
- activeTriggerProps: HTMLProps;
1036
- inactiveTriggerProps: HTMLProps;
1037
- popupProps: HTMLProps;
1038
- }) => FloatingRootStore;
1039
- triggerCount: (state: {
1040
- open: boolean;
1041
- readonly openProp: boolean | undefined;
1042
- mounted: boolean;
1043
- transitionStatus: TransitionStatus;
1044
- floatingRootContext: FloatingRootContext;
1045
- floatingId: string | undefined;
1046
- triggerCount: number;
1047
- preventUnmountingOnClose: boolean;
1048
- payload: unknown;
1049
- activeTriggerId: string | null;
1050
- activeTriggerElement: Element | null;
1051
- readonly triggerIdProp: string | null | undefined;
1052
- popupElement: HTMLElement | null;
1053
- positionerElement: HTMLElement | null;
1054
- activeTriggerProps: HTMLProps;
1055
- inactiveTriggerProps: HTMLProps;
1056
- popupProps: HTMLProps;
1057
- }) => number;
1058
- preventUnmountingOnClose: (state: {
1059
- open: boolean;
1060
- readonly openProp: boolean | undefined;
1061
- mounted: boolean;
1062
- transitionStatus: TransitionStatus;
1063
- floatingRootContext: FloatingRootContext;
1064
- floatingId: string | undefined;
1065
- triggerCount: number;
1066
- preventUnmountingOnClose: boolean;
1067
- payload: unknown;
1068
- activeTriggerId: string | null;
1069
- activeTriggerElement: Element | null;
1070
- readonly triggerIdProp: string | null | undefined;
1071
- popupElement: HTMLElement | null;
1072
- positionerElement: HTMLElement | null;
1073
- activeTriggerProps: HTMLProps;
1074
- inactiveTriggerProps: HTMLProps;
1075
- popupProps: HTMLProps;
1076
- }) => boolean;
1077
- payload: (state: {
1078
- open: boolean;
1079
- readonly openProp: boolean | undefined;
1080
- mounted: boolean;
1081
- transitionStatus: TransitionStatus;
1082
- floatingRootContext: FloatingRootContext;
1083
- floatingId: string | undefined;
1084
- triggerCount: number;
1085
- preventUnmountingOnClose: boolean;
1086
- payload: unknown;
1087
- activeTriggerId: string | null;
1088
- activeTriggerElement: Element | null;
1089
- readonly triggerIdProp: string | null | undefined;
1090
- popupElement: HTMLElement | null;
1091
- positionerElement: HTMLElement | null;
1092
- activeTriggerProps: HTMLProps;
1093
- inactiveTriggerProps: HTMLProps;
1094
- popupProps: HTMLProps;
1095
- }) => unknown;
1096
- activeTriggerId: (state: {
1097
- open: boolean;
1098
- readonly openProp: boolean | undefined;
1099
- mounted: boolean;
1100
- transitionStatus: TransitionStatus;
1101
- floatingRootContext: FloatingRootContext;
1102
- floatingId: string | undefined;
1103
- triggerCount: number;
1104
- preventUnmountingOnClose: boolean;
1105
- payload: unknown;
1106
- activeTriggerId: string | null;
1107
- activeTriggerElement: Element | null;
1108
- readonly triggerIdProp: string | null | undefined;
1109
- popupElement: HTMLElement | null;
1110
- positionerElement: HTMLElement | null;
1111
- activeTriggerProps: HTMLProps;
1112
- inactiveTriggerProps: HTMLProps;
1113
- popupProps: HTMLProps;
1114
- }) => string | null;
1115
- activeTriggerElement: (state: {
1116
- open: boolean;
1117
- readonly openProp: boolean | undefined;
1118
- mounted: boolean;
1119
- transitionStatus: TransitionStatus;
1120
- floatingRootContext: FloatingRootContext;
1121
- floatingId: string | undefined;
1122
- triggerCount: number;
1123
- preventUnmountingOnClose: boolean;
1124
- payload: unknown;
1125
- activeTriggerId: string | null;
1126
- activeTriggerElement: Element | null;
1127
- readonly triggerIdProp: string | null | undefined;
1128
- popupElement: HTMLElement | null;
1129
- positionerElement: HTMLElement | null;
1130
- activeTriggerProps: HTMLProps;
1131
- inactiveTriggerProps: HTMLProps;
1132
- popupProps: HTMLProps;
1133
- }) => Element | null;
1134
- popupId: (state: {
1135
- open: boolean;
1136
- readonly openProp: boolean | undefined;
1137
- mounted: boolean;
1138
- transitionStatus: TransitionStatus;
1139
- floatingRootContext: FloatingRootContext;
1140
- floatingId: string | undefined;
1141
- triggerCount: number;
1142
- preventUnmountingOnClose: boolean;
1143
- payload: unknown;
1144
- activeTriggerId: string | null;
1145
- activeTriggerElement: Element | null;
1146
- readonly triggerIdProp: string | null | undefined;
1147
- popupElement: HTMLElement | null;
1148
- positionerElement: HTMLElement | null;
1149
- activeTriggerProps: HTMLProps;
1150
- inactiveTriggerProps: HTMLProps;
1151
- popupProps: HTMLProps;
1152
- }) => string | undefined;
1153
- isTriggerActive: (state: {
1154
- open: boolean;
1155
- readonly openProp: boolean | undefined;
1156
- mounted: boolean;
1157
- transitionStatus: TransitionStatus;
1158
- floatingRootContext: FloatingRootContext;
1159
- floatingId: string | undefined;
1160
- triggerCount: number;
1161
- preventUnmountingOnClose: boolean;
1162
- payload: unknown;
1163
- activeTriggerId: string | null;
1164
- activeTriggerElement: Element | null;
1165
- readonly triggerIdProp: string | null | undefined;
1166
- popupElement: HTMLElement | null;
1167
- positionerElement: HTMLElement | null;
1168
- activeTriggerProps: HTMLProps;
1169
- inactiveTriggerProps: HTMLProps;
1170
- popupProps: HTMLProps;
1171
- }, triggerId: string | undefined) => boolean;
1172
- isOpenedByTrigger: (state: {
1173
- open: boolean;
1174
- readonly openProp: boolean | undefined;
1175
- mounted: boolean;
1176
- transitionStatus: TransitionStatus;
1177
- floatingRootContext: FloatingRootContext;
1178
- floatingId: string | undefined;
1179
- triggerCount: number;
1180
- preventUnmountingOnClose: boolean;
1181
- payload: unknown;
1182
- activeTriggerId: string | null;
1183
- activeTriggerElement: Element | null;
1184
- readonly triggerIdProp: string | null | undefined;
1185
- popupElement: HTMLElement | null;
1186
- positionerElement: HTMLElement | null;
1187
- activeTriggerProps: HTMLProps;
1188
- inactiveTriggerProps: HTMLProps;
1189
- popupProps: HTMLProps;
1190
- }, triggerId: string | undefined) => boolean;
1191
- isMountedByTrigger: (state: {
1192
- open: boolean;
1193
- readonly openProp: boolean | undefined;
1194
- mounted: boolean;
1195
- transitionStatus: TransitionStatus;
1196
- floatingRootContext: FloatingRootContext;
1197
- floatingId: string | undefined;
1198
- triggerCount: number;
1199
- preventUnmountingOnClose: boolean;
1200
- payload: unknown;
1201
- activeTriggerId: string | null;
1202
- activeTriggerElement: Element | null;
1203
- readonly triggerIdProp: string | null | undefined;
1204
- popupElement: HTMLElement | null;
1205
- positionerElement: HTMLElement | null;
1206
- activeTriggerProps: HTMLProps;
1207
- inactiveTriggerProps: HTMLProps;
1208
- popupProps: HTMLProps;
1209
- }, triggerId: string | undefined) => boolean;
1210
- triggerProps: (state: {
1211
- open: boolean;
1212
- readonly openProp: boolean | undefined;
1213
- mounted: boolean;
1214
- transitionStatus: TransitionStatus;
1215
- floatingRootContext: FloatingRootContext;
1216
- floatingId: string | undefined;
1217
- triggerCount: number;
1218
- preventUnmountingOnClose: boolean;
1219
- payload: unknown;
1220
- activeTriggerId: string | null;
1221
- activeTriggerElement: Element | null;
1222
- readonly triggerIdProp: string | null | undefined;
1223
- popupElement: HTMLElement | null;
1224
- positionerElement: HTMLElement | null;
1225
- activeTriggerProps: HTMLProps;
1226
- inactiveTriggerProps: HTMLProps;
1227
- popupProps: HTMLProps;
1228
- }, isActive: boolean) => HTMLProps;
1229
- triggerPopupId: (state: {
1230
- open: boolean;
1231
- readonly openProp: boolean | undefined;
1232
- mounted: boolean;
1233
- transitionStatus: TransitionStatus;
1234
- floatingRootContext: FloatingRootContext;
1235
- floatingId: string | undefined;
1236
- triggerCount: number;
1237
- preventUnmountingOnClose: boolean;
1238
- payload: unknown;
1239
- activeTriggerId: string | null;
1240
- activeTriggerElement: Element | null;
1241
- readonly triggerIdProp: string | null | undefined;
1242
- popupElement: HTMLElement | null;
1243
- positionerElement: HTMLElement | null;
1244
- activeTriggerProps: HTMLProps;
1245
- inactiveTriggerProps: HTMLProps;
1246
- popupProps: HTMLProps;
1247
- }, triggerId: string | undefined) => string | undefined;
1248
- popupProps: (state: {
1249
- open: boolean;
1250
- readonly openProp: boolean | undefined;
1251
- mounted: boolean;
1252
- transitionStatus: TransitionStatus;
1253
- floatingRootContext: FloatingRootContext;
1254
- floatingId: string | undefined;
1255
- triggerCount: number;
1256
- preventUnmountingOnClose: boolean;
1257
- payload: unknown;
1258
- activeTriggerId: string | null;
1259
- activeTriggerElement: Element | null;
1260
- readonly triggerIdProp: string | null | undefined;
1261
- popupElement: HTMLElement | null;
1262
- positionerElement: HTMLElement | null;
1263
- activeTriggerProps: HTMLProps;
1264
- inactiveTriggerProps: HTMLProps;
1265
- popupProps: HTMLProps;
1266
- }) => HTMLProps;
1267
- popupElement: (state: {
1268
- open: boolean;
1269
- readonly openProp: boolean | undefined;
1270
- mounted: boolean;
1271
- transitionStatus: TransitionStatus;
1272
- floatingRootContext: FloatingRootContext;
1273
- floatingId: string | undefined;
1274
- triggerCount: number;
1275
- preventUnmountingOnClose: boolean;
1276
- payload: unknown;
1277
- activeTriggerId: string | null;
1278
- activeTriggerElement: Element | null;
1279
- readonly triggerIdProp: string | null | undefined;
1280
- popupElement: HTMLElement | null;
1281
- positionerElement: HTMLElement | null;
1282
- activeTriggerProps: HTMLProps;
1283
- inactiveTriggerProps: HTMLProps;
1284
- popupProps: HTMLProps;
1285
- }) => HTMLElement | null;
1286
- positionerElement: (state: {
1287
- open: boolean;
1288
- readonly openProp: boolean | undefined;
1289
- mounted: boolean;
1290
- transitionStatus: TransitionStatus;
1291
- floatingRootContext: FloatingRootContext;
1292
- floatingId: string | undefined;
1293
- triggerCount: number;
1294
- preventUnmountingOnClose: boolean;
1295
- payload: unknown;
1296
- activeTriggerId: string | null;
1297
- activeTriggerElement: Element | null;
1298
- readonly triggerIdProp: string | null | undefined;
1299
- popupElement: HTMLElement | null;
1300
- positionerElement: HTMLElement | null;
1301
- activeTriggerProps: HTMLProps;
1302
- inactiveTriggerProps: HTMLProps;
1303
- popupProps: HTMLProps;
1304
- }) => HTMLElement | null;
1305
- };
1306
- declare class PopoverStore<Payload> extends ReactStore<Readonly<State<Payload>>, Context, Selectors> {
1307
- constructor(initialState?: Partial<State<Payload>>, floatingId?: string | undefined, nested?: boolean);
1308
- setOpen: (nextOpen: boolean, eventDetails: Omit<PopoverRoot.ChangeEventDetails, "preventUnmountOnClose">) => void;
1309
- static useStore<Payload>(externalStore: PopoverStore<Payload> | undefined, initialState: Partial<State<Payload>>): PopoverStore<Payload>;
1310
- private disposeEffect;
1311
- }
1312
- export type Selectors = typeof selectors$1;
1313
- declare class PopoverHandle<Payload> {
1314
- /**
1315
- * Internal store holding the popover's state.
1316
- * @internal
1317
- */
1318
- readonly store: PopoverStore<Payload>;
1319
- constructor();
1320
- /**
1321
- * Opens the popover and associates it with the trigger with the given id.
1322
- * The trigger must be a Popover.Trigger component with this handle passed as a prop.
1323
- *
1324
- * @param triggerId ID of the trigger to associate with the popover.
1325
- */
1326
- open(triggerId: string): void;
1327
- /**
1328
- * Closes the popover.
1329
- */
1330
- close(): void;
1331
- /**
1332
- * Indicates whether the popover is currently open.
1333
- */
1334
- get isOpen(): boolean;
1335
- }
1336
- declare function createPopoverHandle<Payload>(): PopoverHandle<Payload>;
1337
- /**
1338
- * Groups all parts of the popover.
1339
- * Doesn't render its own HTML element.
1340
- *
1341
- * Documentation: [Base UI Popover](https://base-ui.com/react/components/popover)
1342
- */
1343
- export declare function PopoverRoot<Payload = unknown>(props: PopoverRoot.Props<Payload>): import("react/jsx-runtime").React$1.JSX.Element;
1344
- export interface PopoverRootState {
1345
- }
1346
- export interface PopoverRootProps<Payload = unknown> {
1347
- /**
1348
- * Whether the popover is initially open.
1349
- *
1350
- * To render a controlled popover, use the `open` prop instead.
1351
- * @default false
1352
- */
1353
- defaultOpen?: boolean | undefined;
1354
- /**
1355
- * Whether the popover is currently open.
1356
- */
1357
- open?: boolean | undefined;
1358
- /**
1359
- * Event handler called when the popover is opened or closed.
1360
- */
1361
- onOpenChange?: ((open: boolean, eventDetails: PopoverRoot.ChangeEventDetails) => void) | undefined;
1362
- /**
1363
- * Event handler called after any animations complete when the popover is opened or closed.
1364
- */
1365
- onOpenChangeComplete?: ((open: boolean) => void) | undefined;
1366
- /**
1367
- * A ref to imperative actions.
1368
- * - `unmount`: When specified, the popover will not be unmounted when closed.
1369
- * Instead, the `unmount` function must be called to unmount the popover manually.
1370
- * Useful when the popover's animation is controlled by an external library.
1371
- * - `close`: Closes the popover imperatively when called.
1372
- */
1373
- actionsRef?: React$1.RefObject<PopoverRoot.Actions | null> | undefined;
1374
- /**
1375
- * Determines if the popover enters a modal state when open.
1376
- * - `true`: user interaction is limited to the popover: document page scroll is locked, and pointer interactions on outside elements are disabled.
1377
- * - `false`: user interaction with the rest of the document is allowed.
1378
- * - `'trap-focus'`: focus is trapped inside the popover, but document page scroll is not locked and pointer interactions outside of it remain enabled.
1379
- *
1380
- * When `modal` is `true`, focus trapping is enabled only if `<Popover.Close>` is rendered
1381
- * inside `<Popover.Popup>`. It can be visually hidden with your own CSS if needed, such as
1382
- * Tailwind's `sr-only` utility.
1383
- *
1384
- * When `modal` is `'trap-focus'`, render `<Popover.Close>` inside `<Popover.Popup>` so touch
1385
- * screen readers can escape the popup.
1386
- * @default false
1387
- */
1388
- modal?: boolean | "trap-focus" | undefined;
1389
- /**
1390
- * ID of the trigger that the popover is associated with.
1391
- * This is useful in conjunction with the `open` prop to create a controlled popover.
1392
- * There's no need to specify this prop when the popover is uncontrolled (that is, when the `open` prop is not set).
1393
- */
1394
- triggerId?: string | null | undefined;
1395
- /**
1396
- * ID of the trigger that the popover is associated with.
1397
- * This is useful in conjunction with the `defaultOpen` prop to create an initially open popover.
1398
- */
1399
- defaultTriggerId?: string | null | undefined;
1400
- /**
1401
- * A handle to associate the popover with a trigger.
1402
- * If specified, allows external triggers to control the popover's open state.
1403
- */
1404
- handle?: PopoverHandle<Payload> | undefined;
1405
- /**
1406
- * The content of the popover.
1407
- * This can be a regular React node or a render function that receives the `payload` of the active trigger.
1408
- */
1409
- children?: React$1.ReactNode | PayloadChildRenderFunction<Payload>;
1410
- }
1411
- export interface PopoverRootActions {
1412
- unmount: () => void;
1413
- close: () => void;
1414
- }
1415
- export type PopoverRootChangeEventReason = typeof triggerHover | typeof triggerFocus | typeof triggerPress | typeof outsidePress | typeof escapeKey | typeof closePress | typeof focusOut | typeof imperativeAction | typeof none;
1416
- export type PopoverRootChangeEventDetails = BaseUIChangeEventDetails<PopoverRoot.ChangeEventReason> & {
1417
- preventUnmountOnClose(): void;
1418
- };
1419
- export declare namespace PopoverRoot {
1420
- type State = PopoverRootState;
1421
- type Props<Payload = unknown> = PopoverRootProps<Payload>;
1422
- type Actions = PopoverRootActions;
1423
- type ChangeEventReason = PopoverRootChangeEventReason;
1424
- type ChangeEventDetails = PopoverRootChangeEventDetails;
1425
- }
1426
- /**
1427
- * A button that opens the popover.
1428
- * Renders a `<button>` element.
1429
- *
1430
- * Documentation: [Base UI Popover](https://base-ui.com/react/components/popover)
1431
- */
1432
- export declare const PopoverTrigger: PopoverTrigger;
1433
- export interface PopoverTrigger {
1434
- <Payload>(componentProps: PopoverTriggerProps<Payload> & React$1.RefAttributes<HTMLElement>): React$1.JSX.Element;
1435
- }
1436
- export interface PopoverTriggerState {
1437
- /**
1438
- * Whether the popover is currently disabled.
1439
- */
1440
- disabled: boolean;
1441
- /**
1442
- * Whether the popover is currently open.
1443
- */
1444
- open: boolean;
1445
- }
1446
- export type PopoverTriggerProps<Payload = unknown> = NativeButtonProps & BaseUIComponentProps<"button", PopoverTriggerState> & {
1447
- /**
1448
- * Whether the component renders a native `<button>` element when replacing it
1449
- * via the `render` prop.
1450
- * Set to `false` if the rendered element is not a button (e.g. `<div>`).
1451
- * @default true
1452
- */
1453
- nativeButton?: boolean | undefined;
1454
- /**
1455
- * A handle to associate the trigger with a popover.
1456
- */
1457
- handle?: PopoverHandle<Payload> | undefined;
1458
- /**
1459
- * A payload to pass to the popover when it is opened.
1460
- */
1461
- payload?: Payload | undefined;
1462
- /**
1463
- * ID of the trigger. In addition to being forwarded to the rendered element,
1464
- * it is also used to specify the active trigger for the popover in controlled mode (with the PopoverRoot `triggerId` prop).
1465
- */
1466
- id?: string | undefined;
1467
- /**
1468
- * Whether the popover should also open when the trigger is hovered.
1469
- * @default false
1470
- */
1471
- openOnHover?: boolean | undefined;
1472
- /**
1473
- * How long to wait before the popover may be opened on hover. Specified in milliseconds.
1474
- *
1475
- * Requires the `openOnHover` prop.
1476
- * @default 300
1477
- */
1478
- delay?: number | undefined;
1479
- /**
1480
- * How long to wait before closing the popover that was opened on hover.
1481
- * Specified in milliseconds.
1482
- *
1483
- * Requires the `openOnHover` prop.
1484
- * @default 0
1485
- */
1486
- closeDelay?: number | undefined;
1487
- };
1488
- export declare namespace PopoverTrigger {
1489
- type State = PopoverTriggerState;
1490
- type Props<Payload = unknown> = PopoverTriggerProps<Payload>;
1491
- }
1492
- /**
1493
- * A portal element that moves the popup to a different part of the DOM.
1494
- * By default, the portal element is appended to `<body>`.
1495
- * Renders a `<div>` element.
1496
- *
1497
- * Documentation: [Base UI Popover](https://base-ui.com/react/components/popover)
1498
- */
1499
- export declare const PopoverPortal: React$1.ForwardRefExoticComponent<Omit<PopoverPortalProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
1500
- export interface PopoverPortalState {
1501
- }
1502
- export interface PopoverPortalProps extends FloatingPortal.Props<PopoverPortalState> {
1503
- /**
1504
- * Whether to keep the portal mounted in the DOM while the popup is hidden.
1505
- * @default false
1506
- */
1507
- keepMounted?: boolean | undefined;
1508
- }
1509
- export declare namespace PopoverPortal {
1510
- type State = PopoverPortalState;
1511
- type Props = PopoverPortalProps;
1512
- }
1513
- /**
1514
- * Positions the popover against the trigger.
1515
- * Renders a `<div>` element.
1516
- *
1517
- * Documentation: [Base UI Popover](https://base-ui.com/react/components/popover)
1518
- */
1519
- export declare const PopoverPositioner: React$1.ForwardRefExoticComponent<Omit<PopoverPositionerProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
1520
- export interface PopoverPositionerState {
1521
- /**
1522
- * Whether the popover is currently open.
1523
- */
1524
- open: boolean;
1525
- /**
1526
- * The side of the anchor the component is placed on.
1527
- */
1528
- side: Side$1;
1529
- /**
1530
- * The alignment of the component relative to the anchor.
1531
- */
1532
- align: Align;
1533
- /**
1534
- * Whether the anchor element is hidden.
1535
- */
1536
- anchorHidden: boolean;
1537
- /**
1538
- * Whether CSS transitions should be disabled.
1539
- */
1540
- instant: string | undefined;
1541
- }
1542
- export interface PopoverPositionerProps extends UseAnchorPositioningSharedParameters, BaseUIComponentProps<"div", PopoverPositionerState> {
1543
- }
1544
- export declare namespace PopoverPositioner {
1545
- type State = PopoverPositionerState;
1546
- type Props = PopoverPositionerProps;
1547
- }
1548
- /**
1549
- * A container for the popover contents.
1550
- * Renders a `<div>` element.
1551
- *
1552
- * Documentation: [Base UI Popover](https://base-ui.com/react/components/popover)
1553
- */
1554
- export declare const PopoverPopup: React$1.ForwardRefExoticComponent<Omit<PopoverPopupProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
1555
- export interface PopoverPopupState {
1556
- /**
1557
- * Whether the popover is currently open.
1558
- */
1559
- open: boolean;
1560
- /**
1561
- * The side of the anchor the component is placed on.
1562
- */
1563
- side: Side$1;
1564
- /**
1565
- * The alignment of the component relative to the anchor.
1566
- */
1567
- align: Align;
1568
- /**
1569
- * The transition status of the component.
1570
- */
1571
- transitionStatus: TransitionStatus;
1572
- /**
1573
- * Whether transitions should be skipped.
1574
- */
1575
- instant: "dismiss" | "click" | "focus" | "trigger-change" | undefined;
1576
- }
1577
- export interface PopoverPopupProps extends BaseUIComponentProps<"div", PopoverPopupState> {
1578
- /**
1579
- * Determines the element to focus when the popover is opened.
1580
- *
1581
- * - `false`: Do not move focus.
1582
- * - `true`: Move focus based on the default behavior (first tabbable element or popup).
1583
- * - `RefObject`: Move focus to the ref element.
1584
- * - `function`: Called with the interaction type (`mouse`, `touch`, `pen`, or `keyboard`).
1585
- * Return an element to focus, `true` to use the default behavior, or `false`/`undefined` to do nothing.
1586
- */
1587
- initialFocus?: boolean | React$1.RefObject<HTMLElement | null> | ((openType: InteractionType) => void | boolean | HTMLElement | null) | undefined;
1588
- /**
1589
- * Determines the element to focus when the popover is closed.
1590
- *
1591
- * - `false`: Do not move focus.
1592
- * - `true`: Move focus based on the default behavior (trigger or previously focused element).
1593
- * - `RefObject`: Move focus to the ref element.
1594
- * - `function`: Called with the interaction type (`mouse`, `touch`, `pen`, or `keyboard`).
1595
- * Return an element to focus, `true` to use the default behavior, or `false`/`undefined` to do nothing.
1596
- */
1597
- finalFocus?: boolean | React$1.RefObject<HTMLElement | null> | ((closeType: InteractionType) => void | boolean | HTMLElement | null) | undefined;
1598
- }
1599
- export declare namespace PopoverPopup {
1600
- type State = PopoverPopupState;
1601
- type Props = PopoverPopupProps;
1602
- }
1603
- /**
1604
- * Displays an element positioned against the popover anchor.
1605
- * Renders a `<div>` element.
1606
- *
1607
- * Documentation: [Base UI Popover](https://base-ui.com/react/components/popover)
1608
- */
1609
- export declare const PopoverArrow: React$1.ForwardRefExoticComponent<Omit<PopoverArrowProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
1610
- export interface PopoverArrowState {
1611
- /**
1612
- * Whether the popover is currently open.
1613
- */
1614
- open: boolean;
1615
- /**
1616
- * The side of the anchor the component is placed on.
1617
- */
1618
- side: Side$1;
1619
- /**
1620
- * The alignment of the component relative to the anchor.
1621
- */
1622
- align: Align;
1623
- /**
1624
- * Whether the arrow cannot be centered on the anchor.
1625
- */
1626
- uncentered: boolean;
1627
- }
1628
- export interface PopoverArrowProps extends BaseUIComponentProps<"div", PopoverArrowState> {
1629
- }
1630
- export declare namespace PopoverArrow {
1631
- type State = PopoverArrowState;
1632
- type Props = PopoverArrowProps;
1633
- }
1634
- /**
1635
- * An overlay displayed beneath the popover.
1636
- * Renders a `<div>` element.
1637
- *
1638
- * Documentation: [Base UI Popover](https://base-ui.com/react/components/popover)
1639
- */
1640
- export declare const PopoverBackdrop: React$1.ForwardRefExoticComponent<Omit<PopoverBackdropProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
1641
- export interface PopoverBackdropState {
1642
- /**
1643
- * Whether the popover is currently open.
1644
- */
1645
- open: boolean;
1646
- /**
1647
- * The transition status of the component.
1648
- */
1649
- transitionStatus: TransitionStatus;
1650
- }
1651
- export interface PopoverBackdropProps extends BaseUIComponentProps<"div", PopoverBackdropState> {
1652
- }
1653
- export declare namespace PopoverBackdrop {
1654
- type State = PopoverBackdropState;
1655
- type Props = PopoverBackdropProps;
1656
- }
1657
- /**
1658
- * A heading that labels the popover.
1659
- * Renders an `<h2>` element.
1660
- *
1661
- * Documentation: [Base UI Popover](https://base-ui.com/react/components/popover)
1662
- */
1663
- export declare const PopoverTitle: React$1.ForwardRefExoticComponent<Omit<PopoverTitleProps, "ref"> & React$1.RefAttributes<HTMLHeadingElement>>;
1664
- export interface PopoverTitleState {
1665
- }
1666
- export interface PopoverTitleProps extends BaseUIComponentProps<"h1" | "h2" | "h3" | "h4" | "h5" | "h6", PopoverTitleState> {
1667
- }
1668
- export declare namespace PopoverTitle {
1669
- type State = PopoverTitleState;
1670
- type Props = PopoverTitleProps;
1671
- }
1672
- /**
1673
- * A paragraph with additional information about the popover.
1674
- * Renders a `<p>` element.
1675
- *
1676
- * Documentation: [Base UI Popover](https://base-ui.com/react/components/popover)
1677
- */
1678
- export declare const PopoverDescription: React$1.ForwardRefExoticComponent<Omit<PopoverDescriptionProps, "ref"> & React$1.RefAttributes<HTMLParagraphElement>>;
1679
- export interface PopoverDescriptionState {
1680
- }
1681
- export interface PopoverDescriptionProps extends BaseUIComponentProps<"p", PopoverDescriptionState> {
1682
- }
1683
- export declare namespace PopoverDescription {
1684
- type State = PopoverDescriptionState;
1685
- type Props = PopoverDescriptionProps;
1686
- }
1687
- /**
1688
- * A button that closes the popover.
1689
- * Renders a `<button>` element.
1690
- *
1691
- * Documentation: [Base UI Popover](https://base-ui.com/react/components/popover)
1692
- */
1693
- export declare const PopoverClose: React$1.ForwardRefExoticComponent<Omit<PopoverCloseProps, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
1694
- export interface PopoverCloseState {
1695
- }
1696
- export interface PopoverCloseProps extends NativeButtonProps, BaseUIComponentProps<"button", PopoverCloseState> {
1697
- }
1698
- export declare namespace PopoverClose {
1699
- type State = PopoverCloseState;
1700
- type Props = PopoverCloseProps;
1701
- }
1702
- /**
1703
- * A viewport for displaying content transitions.
1704
- * This component is only required if one popup can be opened by multiple triggers, its content
1705
- * changes based on the trigger, and switching between them is animated.
1706
- * Renders a `<div>` element.
1707
- *
1708
- * Documentation: [Base UI Popover](https://base-ui.com/react/components/popover)
1709
- */
1710
- export declare const PopoverViewport: React$1.ForwardRefExoticComponent<Omit<PopoverViewport.Props, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
1711
- export interface PopoverViewportState {
1712
- /**
1713
- * The activation direction of the transitioned content.
1714
- */
1715
- activationDirection: string | undefined;
1716
- /**
1717
- * Whether the viewport is currently transitioning between contents.
1718
- */
1719
- transitioning: boolean;
1720
- /**
1721
- * Present if animations should be instant.
1722
- */
1723
- instant: "dismiss" | "click" | "focus" | "trigger-change" | undefined;
1724
- }
1725
- export declare namespace PopoverViewport {
1726
- interface Props extends BaseUIComponentProps<"div", PopoverViewportState> {
1727
- /**
1728
- * The content to render inside the transition container.
1729
- */
1730
- children?: React$1.ReactNode;
1731
- }
1732
- type State = PopoverViewportState;
1733
- }
1734
-
1735
- declare namespace Popover {
1736
- export { PopoverArrow as Arrow, PopoverBackdrop as Backdrop, PopoverClose as Close, PopoverDescription as Description, PopoverHandle as Handle, PopoverPopup as Popup, PopoverPortal as Portal, PopoverPositioner as Positioner, PopoverRoot as Root, PopoverTitle as Title, PopoverTrigger as Trigger, PopoverViewport as Viewport, createPopoverHandle as createHandle };
1737
- }
1738
-
1739
- export {
1740
- Popover,
1741
- };
1742
-
1743
- export {};