@rpcbase/ui 0.280.0 → 0.281.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 (518) hide show
  1. package/dist/components/AddressAutocompleteInput/index.d.ts +1 -1
  2. package/dist/components/AddressAutocompleteInput/index.d.ts.map +1 -1
  3. package/dist/components/ApplePayButton/index.d.ts +1 -1
  4. package/dist/components/ApplePayButton/index.d.ts.map +1 -1
  5. package/dist/components/Checkbox/index.d.ts +1 -1
  6. package/dist/components/Checkbox/index.d.ts.map +1 -1
  7. package/dist/components/DayPickerField/index.d.ts +2 -2
  8. package/dist/components/DayPickerField/index.d.ts.map +1 -1
  9. package/dist/components/Dialog/index.d.ts +9 -9
  10. package/dist/components/Dialog/index.d.ts.map +1 -1
  11. package/dist/components/FilesUploadField/index.d.ts +1 -1
  12. package/dist/components/FilesUploadField/index.d.ts.map +1 -1
  13. package/dist/components/HourPickerField/index.d.ts +2 -2
  14. package/dist/components/HourPickerField/index.d.ts.map +1 -1
  15. package/dist/components/I18nField/index.d.ts +1 -1
  16. package/dist/components/I18nField/index.d.ts.map +1 -1
  17. package/dist/components/Image/index.d.ts +1 -1
  18. package/dist/components/Image/index.d.ts.map +1 -1
  19. package/dist/components/ImagesField/index.d.ts +1 -1
  20. package/dist/components/ImagesField/index.d.ts.map +1 -1
  21. package/dist/components/Input/index.d.ts +1 -1
  22. package/dist/components/Input/index.d.ts.map +1 -1
  23. package/dist/components/Notifications/NotificationsButton.d.ts +1 -1
  24. package/dist/components/Notifications/NotificationsButton.d.ts.map +1 -1
  25. package/dist/components/Notifications/NotificationsDrawer.d.ts +1 -1
  26. package/dist/components/Notifications/NotificationsDrawer.d.ts.map +1 -1
  27. package/dist/components/Notifications/NotificationsSettings.d.ts +1 -1
  28. package/dist/components/Notifications/NotificationsSettings.d.ts.map +1 -1
  29. package/dist/components/PhoneNumberInput/suggestions.d.ts +3 -3
  30. package/dist/components/PhoneNumberInput/suggestions.d.ts.map +1 -1
  31. package/dist/components/Select/index.d.ts +2 -2
  32. package/dist/components/Select/index.d.ts.map +1 -1
  33. package/dist/components/header/MenuPopover/index.d.ts +1 -1
  34. package/dist/components/header/MenuPopover/index.d.ts.map +1 -1
  35. package/dist/index.js +12 -12
  36. package/dist/index10.js +6 -4
  37. package/dist/index10.js.map +1 -1
  38. package/dist/index12.js.map +1 -1
  39. package/dist/index13.js.map +1 -1
  40. package/dist/index14.js.map +1 -1
  41. package/dist/index15.js.map +1 -1
  42. package/dist/index154.js +19 -7
  43. package/dist/index154.js.map +1 -1
  44. package/dist/index16.js +36 -45
  45. package/dist/index16.js.map +1 -1
  46. package/dist/index160.js +3 -3
  47. package/dist/index160.js.map +1 -1
  48. package/dist/index166.js +5 -5
  49. package/dist/index166.js.map +1 -1
  50. package/dist/index172.js +27 -25
  51. package/dist/index172.js.map +1 -1
  52. package/dist/index181.js +1 -1
  53. package/dist/index181.js.map +1 -1
  54. package/dist/index182.js +145 -162
  55. package/dist/index182.js.map +1 -1
  56. package/dist/index184.js +6 -8
  57. package/dist/index184.js.map +1 -1
  58. package/dist/index186.js +2 -8
  59. package/dist/index186.js.map +1 -1
  60. package/dist/index19.js +1 -1
  61. package/dist/index19.js.map +1 -1
  62. package/dist/index195.js +1 -1
  63. package/dist/index195.js.map +1 -1
  64. package/dist/index196.js +2 -2
  65. package/dist/index196.js.map +1 -1
  66. package/dist/index197.js +1 -1
  67. package/dist/index197.js.map +1 -1
  68. package/dist/index198.js +16 -15
  69. package/dist/index198.js.map +1 -1
  70. package/dist/index199.js +13 -17
  71. package/dist/index199.js.map +1 -1
  72. package/dist/index200.js +3 -2
  73. package/dist/index200.js.map +1 -1
  74. package/dist/index207.js +5 -90
  75. package/dist/index207.js.map +1 -1
  76. package/dist/index208.js +15 -3
  77. package/dist/index208.js.map +1 -1
  78. package/dist/index209.js +102 -22
  79. package/dist/index209.js.map +1 -1
  80. package/dist/index210.js +3 -28
  81. package/dist/index210.js.map +1 -1
  82. package/dist/index211.js +23 -19
  83. package/dist/index211.js.map +1 -1
  84. package/dist/index212.js +27 -6
  85. package/dist/index212.js.map +1 -1
  86. package/dist/index213.js +19 -14
  87. package/dist/index213.js.map +1 -1
  88. package/dist/index214.js +5 -6
  89. package/dist/index214.js.map +1 -1
  90. package/dist/index215.js +14 -26
  91. package/dist/index215.js.map +1 -1
  92. package/dist/index216.js +7 -22
  93. package/dist/index216.js.map +1 -1
  94. package/dist/index217.js +27 -6
  95. package/dist/index217.js.map +1 -1
  96. package/dist/index218.js +23 -5
  97. package/dist/index218.js.map +1 -1
  98. package/dist/index219.js +6 -4
  99. package/dist/index219.js.map +1 -1
  100. package/dist/index220.js +5 -4
  101. package/dist/index220.js.map +1 -1
  102. package/dist/index221.js +4 -24
  103. package/dist/index221.js.map +1 -1
  104. package/dist/index222.js +4 -3
  105. package/dist/index222.js.map +1 -1
  106. package/dist/index223.js +21 -21
  107. package/dist/index223.js.map +1 -1
  108. package/dist/index224.js +3 -23
  109. package/dist/index224.js.map +1 -1
  110. package/dist/index225.js +23 -6
  111. package/dist/index225.js.map +1 -1
  112. package/dist/index226.js +22 -9
  113. package/dist/index226.js.map +1 -1
  114. package/dist/index227.js +5 -17
  115. package/dist/index227.js.map +1 -1
  116. package/dist/index228.js +8 -49
  117. package/dist/index228.js.map +1 -1
  118. package/dist/index229.js +18 -5
  119. package/dist/index229.js.map +1 -1
  120. package/dist/index230.js +50 -19
  121. package/dist/index230.js.map +1 -1
  122. package/dist/index231.js +20 -28
  123. package/dist/index231.js.map +1 -1
  124. package/dist/index232.js +27 -104
  125. package/dist/index232.js.map +1 -1
  126. package/dist/index233.js +98 -33
  127. package/dist/index233.js.map +1 -1
  128. package/dist/index234.js +28 -113
  129. package/dist/index234.js.map +1 -1
  130. package/dist/index235.js +117 -11
  131. package/dist/index235.js.map +1 -1
  132. package/dist/index236.js +12 -4
  133. package/dist/index236.js.map +1 -1
  134. package/dist/index237.js +4 -15
  135. package/dist/index237.js.map +1 -1
  136. package/dist/index238.js +13 -62
  137. package/dist/index238.js.map +1 -1
  138. package/dist/index239.js +64 -9
  139. package/dist/index239.js.map +1 -1
  140. package/dist/index240.js +10 -106
  141. package/dist/index240.js.map +1 -1
  142. package/dist/index241.js +107 -13
  143. package/dist/index241.js.map +1 -1
  144. package/dist/index242.js +16 -13
  145. package/dist/index242.js.map +1 -1
  146. package/dist/index243.js +13 -5
  147. package/dist/index243.js.map +1 -1
  148. package/dist/index244.js +4 -316
  149. package/dist/index244.js.map +1 -1
  150. package/dist/index245.js +315 -58
  151. package/dist/index245.js.map +1 -1
  152. package/dist/index246.js +58 -223
  153. package/dist/index246.js.map +1 -1
  154. package/dist/index247.js +215 -318
  155. package/dist/index247.js.map +1 -1
  156. package/dist/index248.js +250 -306
  157. package/dist/index248.js.map +1 -1
  158. package/dist/index249.js +308 -173
  159. package/dist/index249.js.map +1 -1
  160. package/dist/index250.js +178 -7
  161. package/dist/index250.js.map +1 -1
  162. package/dist/index251.js +8 -15
  163. package/dist/index251.js.map +1 -1
  164. package/dist/index252.js +41 -5
  165. package/dist/index252.js.map +1 -1
  166. package/dist/index253.js +46 -38
  167. package/dist/index253.js.map +1 -1
  168. package/dist/index254.js +7 -50
  169. package/dist/index254.js.map +1 -1
  170. package/dist/index255.js +49 -6
  171. package/dist/index255.js.map +1 -1
  172. package/dist/index256.js +48 -46
  173. package/dist/index256.js.map +1 -1
  174. package/dist/index257.js +6 -51
  175. package/dist/index257.js.map +1 -1
  176. package/dist/index258.js +10 -9
  177. package/dist/index258.js.map +1 -1
  178. package/dist/index259.js +60 -8
  179. package/dist/index259.js.map +1 -1
  180. package/dist/index26.js.map +1 -1
  181. package/dist/index260.js +41 -60
  182. package/dist/index260.js.map +1 -1
  183. package/dist/index261.js +88 -34
  184. package/dist/index261.js.map +1 -1
  185. package/dist/index262.js +47 -94
  186. package/dist/index262.js.map +1 -1
  187. package/dist/index263.js +36 -49
  188. package/dist/index263.js.map +1 -1
  189. package/dist/index264.js +45 -32
  190. package/dist/index264.js.map +1 -1
  191. package/dist/index265.js +47 -46
  192. package/dist/index265.js.map +1 -1
  193. package/dist/index266.js +18 -48
  194. package/dist/index266.js.map +1 -1
  195. package/dist/index267.js +174 -15
  196. package/dist/index267.js.map +1 -1
  197. package/dist/index268.js +47 -169
  198. package/dist/index268.js.map +1 -1
  199. package/dist/index269.js +17 -34
  200. package/dist/index269.js.map +1 -1
  201. package/dist/index270.js +59 -10
  202. package/dist/index270.js.map +1 -1
  203. package/dist/index271.js +10 -66
  204. package/dist/index271.js.map +1 -1
  205. package/dist/index272.js +4 -4
  206. package/dist/index273.js +71 -69
  207. package/dist/index273.js.map +1 -1
  208. package/dist/index274.js +158 -152
  209. package/dist/index274.js.map +1 -1
  210. package/dist/index275.js +7 -13
  211. package/dist/index275.js.map +1 -1
  212. package/dist/index276.js +12 -5
  213. package/dist/index276.js.map +1 -1
  214. package/dist/index277.js +12 -6
  215. package/dist/index277.js.map +1 -1
  216. package/dist/index278.js +11 -12
  217. package/dist/index278.js.map +1 -1
  218. package/dist/index279.js +65 -9
  219. package/dist/index279.js.map +1 -1
  220. package/dist/index280.js +6 -74
  221. package/dist/index280.js.map +1 -1
  222. package/dist/index281.js +25 -6
  223. package/dist/index281.js.map +1 -1
  224. package/dist/index282.js +24 -24
  225. package/dist/index282.js.map +1 -1
  226. package/dist/index283.js +125 -24
  227. package/dist/index283.js.map +1 -1
  228. package/dist/index284.js +52 -115
  229. package/dist/index284.js.map +1 -1
  230. package/dist/index285.js +59 -55
  231. package/dist/index285.js.map +1 -1
  232. package/dist/index286.js +48 -61
  233. package/dist/index286.js.map +1 -1
  234. package/dist/index287.js +5 -48
  235. package/dist/index287.js.map +1 -1
  236. package/dist/index288.js +14 -8
  237. package/dist/index288.js.map +1 -1
  238. package/dist/index289.js +18 -14
  239. package/dist/index289.js.map +1 -1
  240. package/dist/index290.js +10 -17
  241. package/dist/index290.js.map +1 -1
  242. package/dist/index291.js +23 -11
  243. package/dist/index291.js.map +1 -1
  244. package/dist/index292.js +52 -25
  245. package/dist/index292.js.map +1 -1
  246. package/dist/index293.js +6 -52
  247. package/dist/index293.js.map +1 -1
  248. package/dist/index294.js +137 -5
  249. package/dist/index294.js.map +1 -1
  250. package/dist/index295.js +59 -149
  251. package/dist/index295.js.map +1 -1
  252. package/dist/index296.js +90 -49
  253. package/dist/index296.js.map +1 -1
  254. package/dist/index297.js +11 -117
  255. package/dist/index297.js.map +1 -1
  256. package/dist/index298.js +863 -11
  257. package/dist/index298.js.map +1 -1
  258. package/dist/index299.js +21 -865
  259. package/dist/index299.js.map +1 -1
  260. package/dist/index3.js.map +1 -1
  261. package/dist/index300.js +417 -27
  262. package/dist/index300.js.map +1 -1
  263. package/dist/index301.js +774 -483
  264. package/dist/index301.js.map +1 -1
  265. package/dist/index302.js +7436 -803
  266. package/dist/index302.js.map +1 -1
  267. package/dist/index303.js +7 -7429
  268. package/dist/index303.js.map +1 -1
  269. package/dist/index304.js +12 -6
  270. package/dist/index304.js.map +1 -1
  271. package/dist/index305.js +5 -12
  272. package/dist/index305.js.map +1 -1
  273. package/dist/index306.js +3 -3
  274. package/dist/index306.js.map +1 -1
  275. package/dist/index307.js +469 -5
  276. package/dist/index307.js.map +1 -1
  277. package/dist/index308.js +32 -464
  278. package/dist/index308.js.map +1 -1
  279. package/dist/index309.js +18 -36
  280. package/dist/index309.js.map +1 -1
  281. package/dist/index310.js +28 -17
  282. package/dist/index310.js.map +1 -1
  283. package/dist/index311.js +4 -30
  284. package/dist/index311.js.map +1 -1
  285. package/dist/index312.js +59 -4
  286. package/dist/index312.js.map +1 -1
  287. package/dist/index313.js +11 -59
  288. package/dist/index313.js.map +1 -1
  289. package/dist/index314.js +5 -9
  290. package/dist/index314.js.map +1 -1
  291. package/dist/index315.js +9 -5
  292. package/dist/index315.js.map +1 -1
  293. package/dist/index316.js +12 -9
  294. package/dist/index316.js.map +1 -1
  295. package/dist/index317.js +3 -13
  296. package/dist/index317.js.map +1 -1
  297. package/dist/index318.js +17 -3
  298. package/dist/index318.js.map +1 -1
  299. package/dist/index319.js +23 -14
  300. package/dist/index319.js.map +1 -1
  301. package/dist/index320.js +39 -23
  302. package/dist/index320.js.map +1 -1
  303. package/dist/index321.js +5 -41
  304. package/dist/index321.js.map +1 -1
  305. package/dist/index322.js +25 -5
  306. package/dist/index322.js.map +1 -1
  307. package/dist/index323.js +18 -24
  308. package/dist/index323.js.map +1 -1
  309. package/dist/index324.js +32 -17
  310. package/dist/index324.js.map +1 -1
  311. package/dist/index325.js +5 -34
  312. package/dist/index325.js.map +1 -1
  313. package/dist/index326.js +9 -5
  314. package/dist/index326.js.map +1 -1
  315. package/dist/index327.js +7 -8
  316. package/dist/index327.js.map +1 -1
  317. package/dist/index328.js +9 -8
  318. package/dist/index328.js.map +1 -1
  319. package/dist/index329.js +10 -9
  320. package/dist/index329.js.map +1 -1
  321. package/dist/index330.js +7 -10
  322. package/dist/index330.js.map +1 -1
  323. package/dist/index331.js +75 -7
  324. package/dist/index331.js.map +1 -1
  325. package/dist/index332.js +153 -66
  326. package/dist/index332.js.map +1 -1
  327. package/dist/index333.js +99 -147
  328. package/dist/index333.js.map +1 -1
  329. package/dist/index334.js +13 -113
  330. package/dist/index334.js.map +1 -1
  331. package/dist/index335.js +78 -12
  332. package/dist/index335.js.map +1 -1
  333. package/dist/index336.js +23 -57
  334. package/dist/index336.js.map +1 -1
  335. package/dist/index337.js +12 -45
  336. package/dist/index337.js.map +1 -1
  337. package/dist/index338.js +16 -13
  338. package/dist/index338.js.map +1 -1
  339. package/dist/index339.js +100 -15
  340. package/dist/index339.js.map +1 -1
  341. package/dist/index340.js +50 -95
  342. package/dist/index340.js.map +1 -1
  343. package/dist/index341.js +57 -5
  344. package/dist/index341.js.map +1 -1
  345. package/dist/index342.js +41 -78
  346. package/dist/index342.js.map +1 -1
  347. package/dist/index343.js +100 -58
  348. package/dist/index343.js.map +1 -1
  349. package/dist/index344.js +46 -104
  350. package/dist/index344.js.map +1 -1
  351. package/dist/index345.js +39 -51
  352. package/dist/index345.js.map +1 -1
  353. package/dist/index346.js +143 -42
  354. package/dist/index346.js.map +1 -1
  355. package/dist/index347.js +122 -123
  356. package/dist/index347.js.map +1 -1
  357. package/dist/index348.js +224 -108
  358. package/dist/index348.js.map +1 -1
  359. package/dist/index349.js +158 -174
  360. package/dist/index349.js.map +1 -1
  361. package/dist/index350.js +213 -144
  362. package/dist/index350.js.map +1 -1
  363. package/dist/index351.js +5 -309
  364. package/dist/index351.js.map +1 -1
  365. package/dist/index352.js +6 -5
  366. package/dist/index352.js.map +1 -1
  367. package/dist/index353.js +7 -6
  368. package/dist/index353.js.map +1 -1
  369. package/dist/index354.js +4 -5
  370. package/dist/index354.js.map +1 -1
  371. package/dist/index355.js +4 -4
  372. package/dist/index355.js.map +1 -1
  373. package/dist/index356.js +21 -6
  374. package/dist/index356.js.map +1 -1
  375. package/dist/index357.js +10 -21
  376. package/dist/index357.js.map +1 -1
  377. package/dist/index358.js +128 -10
  378. package/dist/index358.js.map +1 -1
  379. package/dist/index359.js +36 -122
  380. package/dist/index359.js.map +1 -1
  381. package/dist/index360.js +64 -38
  382. package/dist/index360.js.map +1 -1
  383. package/dist/index361.js +115 -66
  384. package/dist/index361.js.map +1 -1
  385. package/dist/index362.js +485 -112
  386. package/dist/index362.js.map +1 -1
  387. package/dist/index363.js +7 -490
  388. package/dist/index363.js.map +1 -1
  389. package/dist/index364.js +1 -1
  390. package/dist/index364.js.map +1 -1
  391. package/dist/index367.js +2 -9
  392. package/dist/index367.js.map +1 -1
  393. package/dist/index368.js +26 -5
  394. package/dist/index368.js.map +1 -1
  395. package/dist/index369.js +43 -27
  396. package/dist/index369.js.map +1 -1
  397. package/dist/index370.js +35 -46
  398. package/dist/index370.js.map +1 -1
  399. package/dist/index371.js +16 -27
  400. package/dist/index371.js.map +1 -1
  401. package/dist/index372.js +41 -16
  402. package/dist/index372.js.map +1 -1
  403. package/dist/index373.js +11 -42
  404. package/dist/index373.js.map +1 -1
  405. package/dist/index374.js +10 -14
  406. package/dist/index374.js.map +1 -1
  407. package/dist/index375.js +51 -9
  408. package/dist/index375.js.map +1 -1
  409. package/dist/index376.js +40 -53
  410. package/dist/index376.js.map +1 -1
  411. package/dist/index377.js +17 -43
  412. package/dist/index377.js.map +1 -1
  413. package/dist/index378.js +4 -15
  414. package/dist/index378.js.map +1 -1
  415. package/dist/index379.js +4 -4
  416. package/dist/index379.js.map +1 -1
  417. package/dist/index380.js +9 -4
  418. package/dist/index380.js.map +1 -1
  419. package/dist/index381.js +304 -9
  420. package/dist/index381.js.map +1 -1
  421. package/dist/index382.js +4 -339
  422. package/dist/index382.js.map +1 -1
  423. package/dist/index383.js +21 -5
  424. package/dist/index383.js.map +1 -1
  425. package/dist/index384.js +106 -16
  426. package/dist/index384.js.map +1 -1
  427. package/dist/index385.js +19 -109
  428. package/dist/index385.js.map +1 -1
  429. package/dist/index386.js +18 -18
  430. package/dist/index386.js.map +1 -1
  431. package/dist/index387.js +14 -19
  432. package/dist/index387.js.map +1 -1
  433. package/dist/index388.js +12 -4
  434. package/dist/index388.js.map +1 -1
  435. package/dist/index389.js +113 -20
  436. package/dist/index389.js.map +1 -1
  437. package/dist/index390.js +5 -11
  438. package/dist/index390.js.map +1 -1
  439. package/dist/index391.js +28 -85
  440. package/dist/index391.js.map +1 -1
  441. package/dist/index392.js +9 -9
  442. package/dist/index392.js.map +1 -1
  443. package/dist/index393.js +6 -29
  444. package/dist/index393.js.map +1 -1
  445. package/dist/index394.js +254 -10
  446. package/dist/index394.js.map +1 -1
  447. package/dist/index395.js +12 -6
  448. package/dist/index395.js.map +1 -1
  449. package/dist/index396.js +11 -252
  450. package/dist/index396.js.map +1 -1
  451. package/dist/index397.js +6 -11
  452. package/dist/index397.js.map +1 -1
  453. package/dist/index398.js +22 -10
  454. package/dist/index398.js.map +1 -1
  455. package/dist/index399.js +22 -6
  456. package/dist/index399.js.map +1 -1
  457. package/dist/index4.js.map +1 -1
  458. package/dist/index400.js +103 -21
  459. package/dist/index400.js.map +1 -1
  460. package/dist/index401.js +15 -23
  461. package/dist/index401.js.map +1 -1
  462. package/dist/index402.js +11 -108
  463. package/dist/index402.js.map +1 -1
  464. package/dist/index403.js +10 -15
  465. package/dist/index403.js.map +1 -1
  466. package/dist/index404.js +237 -10
  467. package/dist/index404.js.map +1 -1
  468. package/dist/index405.js +27 -9
  469. package/dist/index405.js.map +1 -1
  470. package/dist/index406.js +33 -238
  471. package/dist/index406.js.map +1 -1
  472. package/dist/index407.js +11 -30
  473. package/dist/index407.js.map +1 -1
  474. package/dist/index408.js +118 -48
  475. package/dist/index408.js.map +1 -1
  476. package/dist/index409.js +39 -11
  477. package/dist/index409.js.map +1 -1
  478. package/dist/index410.js +18 -121
  479. package/dist/index410.js.map +1 -1
  480. package/dist/index411.js +11 -39
  481. package/dist/index411.js.map +1 -1
  482. package/dist/index412.js +21 -24
  483. package/dist/index412.js.map +1 -1
  484. package/dist/index413.js +17 -11
  485. package/dist/index413.js.map +1 -1
  486. package/dist/index414.js +10 -20
  487. package/dist/index414.js.map +1 -1
  488. package/dist/index415.js +4 -17
  489. package/dist/index415.js.map +1 -1
  490. package/dist/index416.js +300 -14
  491. package/dist/index416.js.map +1 -1
  492. package/dist/index417.js +61 -323
  493. package/dist/index417.js.map +1 -1
  494. package/dist/index418.js +4 -63
  495. package/dist/index418.js.map +1 -1
  496. package/dist/index419.js +28 -4
  497. package/dist/index419.js.map +1 -1
  498. package/dist/index420.js +468 -25
  499. package/dist/index420.js.map +1 -1
  500. package/dist/index421.js +250 -452
  501. package/dist/index421.js.map +1 -1
  502. package/dist/index6.js.map +1 -1
  503. package/dist/index7.js +91 -133
  504. package/dist/index7.js.map +1 -1
  505. package/dist/index70.js +2 -2
  506. package/dist/index70.js.map +1 -1
  507. package/dist/index71.js +11 -4
  508. package/dist/index71.js.map +1 -1
  509. package/dist/index72.js +1 -3
  510. package/dist/index72.js.map +1 -1
  511. package/dist/index8.js.map +1 -1
  512. package/dist/index9.js +16 -19
  513. package/dist/index9.js.map +1 -1
  514. package/dist/test-only/TestCoverageTestBadge/index.d.ts +1 -1
  515. package/dist/test-only/TestCoverageTestBadge/index.d.ts.map +1 -1
  516. package/package.json +15 -15
  517. package/dist/index422.js +0 -272
  518. package/dist/index422.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index244.js","names":["ownerWindow","React","REASONS.focusOut","platform.engine.webkit"],"sources":["../../../node_modules/@base-ui/react/floating-ui-react/components/FloatingFocusManager.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getNodeName, isHTMLElement } from '@floating-ui/utils/dom';\nimport { addEventListener } from '@base-ui/utils/addEventListener';\nimport { mergeCleanups } from '@base-ui/utils/mergeCleanups';\nimport { useMergedRefs } from '@base-ui/utils/useMergedRefs';\nimport { useValueAsRef } from '@base-ui/utils/useValueAsRef';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useTimeout } from '@base-ui/utils/useTimeout';\nimport { platform } from '@base-ui/utils/platform';\nimport { useAnimationFrame } from '@base-ui/utils/useAnimationFrame';\nimport { ownerDocument, ownerWindow } from '@base-ui/utils/owner';\nimport { FocusGuard } from \"../../utils/FocusGuard.mjs\";\nimport { activeElement, contains, getTarget, isTypeableCombobox, getFloatingFocusElement, isTypeableElement } from \"../utils/element.mjs\";\nimport { isVirtualClick, isVirtualPointerEvent, stopEvent } from \"../utils/event.mjs\";\nimport { tabbable, focusable, isOutsideEvent, isTabbable, getNextTabbable, getPreviousTabbable } from \"../utils/tabbable.mjs\";\nimport { getNodeAncestors, getNodeChildren } from \"../utils/nodes.mjs\";\nimport { isElementVisible } from \"../utils/composite.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { createAttribute } from \"../utils/createAttribute.mjs\";\nimport { enqueueFocus } from \"../utils/enqueueFocus.mjs\";\nimport { markOthers } from \"../utils/markOthers.mjs\";\nimport { usePortalContext } from \"./FloatingPortal.mjs\";\nimport { useFloatingTree } from \"./FloatingTree.mjs\";\nimport { CLICK_TRIGGER_IDENTIFIER } from \"../../internals/constants.mjs\";\nimport { resolveRef } from \"../../utils/resolveRef.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction getEventType(event, lastInteractionType) {\n const win = ownerWindow(getTarget(event));\n if (event instanceof win.KeyboardEvent) {\n return 'keyboard';\n }\n if (event instanceof win.FocusEvent) {\n // Focus events can be caused by a preceding pointer interaction (e.g., focusout on outside press).\n // Prefer the last known pointer type if provided, else treat as keyboard.\n return lastInteractionType || 'keyboard';\n }\n if ('pointerType' in event) {\n return event.pointerType || 'keyboard';\n }\n if ('touches' in event) {\n return 'touch';\n }\n if (event instanceof win.MouseEvent) {\n // onClick events may not contain pointer events, and will fall through to here\n return lastInteractionType || (event.detail === 0 ? 'keyboard' : 'mouse');\n }\n return '';\n}\nconst LIST_LIMIT = 20;\nlet previouslyFocusedElements = [];\nfunction clearDisconnectedPreviouslyFocusedElements() {\n previouslyFocusedElements = previouslyFocusedElements.filter(entry => {\n return entry.deref()?.isConnected;\n });\n}\nfunction addPreviouslyFocusedElement(element) {\n clearDisconnectedPreviouslyFocusedElements();\n if (element && getNodeName(element) !== 'body') {\n previouslyFocusedElements.push(new WeakRef(element));\n if (previouslyFocusedElements.length > LIST_LIMIT) {\n previouslyFocusedElements = previouslyFocusedElements.slice(-LIST_LIMIT);\n }\n }\n}\nfunction getPreviouslyFocusedElement() {\n clearDisconnectedPreviouslyFocusedElements();\n return previouslyFocusedElements[previouslyFocusedElements.length - 1]?.deref();\n}\nfunction getFirstTabbableElement(container) {\n if (!container) {\n return null;\n }\n if (isTabbable(container)) {\n return container;\n }\n return tabbable(container)[0] || container;\n}\nfunction handleTabIndex(floatingFocusElement) {\n if (floatingFocusElement.hasAttribute('tabindex') && !floatingFocusElement.hasAttribute('data-tabindex')) {\n return;\n }\n if (!floatingFocusElement.getAttribute('role')?.includes('dialog')) {\n return;\n }\n const focusableElements = focusable(floatingFocusElement);\n const tabbableContent = focusableElements.filter(element => {\n const dataTabIndex = element.getAttribute('data-tabindex') || '';\n return isTabbable(element) || element.hasAttribute('data-tabindex') && !dataTabIndex.startsWith('-');\n });\n const tabIndex = floatingFocusElement.getAttribute('tabindex');\n if (tabbableContent.length === 0) {\n if (tabIndex !== '0') {\n floatingFocusElement.setAttribute('tabindex', '0');\n // Mark our own write so the externally-managed early-return above doesn't\n // mistake it for a user-authored `tabindex` and freeze management.\n floatingFocusElement.setAttribute('data-tabindex', '0');\n }\n } else if (tabIndex !== '-1' || floatingFocusElement.hasAttribute('data-tabindex') && floatingFocusElement.getAttribute('data-tabindex') !== '-1') {\n floatingFocusElement.setAttribute('tabindex', '-1');\n floatingFocusElement.setAttribute('data-tabindex', '-1');\n }\n}\n/**\n * Provides focus management for the floating element.\n * @see https://floating-ui.com/docs/FloatingFocusManager\n * @internal\n */\nexport function FloatingFocusManager(props) {\n const {\n context,\n children,\n disabled = false,\n initialFocus = true,\n returnFocus = true,\n restoreFocus = false,\n modal = true,\n closeOnFocusOut = true,\n openInteractionType = '',\n nextFocusableElement,\n previousFocusableElement,\n beforeContentFocusGuardRef,\n externalTree,\n getInsideElements\n } = props;\n const store = 'rootStore' in context ? context.rootStore : context;\n const open = store.useState('open');\n const domReference = store.useState('domReferenceElement');\n const floating = store.useState('floatingElement');\n const {\n events,\n dataRef\n } = store.context;\n const getNodeId = useStableCallback(() => dataRef.current.floatingContext?.nodeId);\n const ignoreInitialFocus = initialFocus === false;\n // If the reference is a combobox and is typeable (e.g. input/textarea),\n // there are different focus semantics. The guards should not be rendered, but\n // aria-hidden should be applied to all nodes still. Further, the visually\n // hidden dismiss button should only appear at the end of the list, not the\n // start.\n const isUntrappedTypeableCombobox = isTypeableCombobox(domReference) && ignoreInitialFocus;\n const initialFocusRef = useValueAsRef(initialFocus);\n const returnFocusRef = useValueAsRef(returnFocus);\n const openInteractionTypeRef = useValueAsRef(openInteractionType);\n const openRef = useValueAsRef(open);\n const tree = useFloatingTree(externalTree);\n const portalContext = usePortalContext();\n const preventReturnFocusRef = React.useRef(false);\n const isPointerDownRef = React.useRef(false);\n const pointerDownOutsideRef = React.useRef(false);\n const lastFocusedTabbableRef = React.useRef(null);\n const closeTypeRef = React.useRef('');\n const lastInteractionTypeRef = React.useRef('');\n const beforeGuardRef = React.useRef(null);\n const afterGuardRef = React.useRef(null);\n const mergedBeforeGuardRef = useMergedRefs(beforeGuardRef, beforeContentFocusGuardRef, portalContext?.beforeInsideRef);\n const mergedAfterGuardRef = useMergedRefs(afterGuardRef, portalContext?.afterInsideRef);\n const blurTimeout = useTimeout();\n const pointerDownTimeout = useTimeout();\n const restoreFocusFrame = useAnimationFrame();\n const isInsidePortal = portalContext != null;\n const floatingFocusElement = getFloatingFocusElement(floating);\n const getTabbableContent = useStableCallback((container = floatingFocusElement) => {\n return container ? tabbable(container) : [];\n });\n const getResolvedInsideElements = useStableCallback(() => getInsideElements?.().filter(element => element != null) ?? []);\n\n // Prevent Tab from escaping the modal when there are no tabbable elements.\n React.useEffect(() => {\n if (disabled || !modal) {\n return undefined;\n }\n function onKeyDown(event) {\n if (event.key === 'Tab') {\n // The focus guards have nothing to focus, so we need to stop the event.\n if (contains(floatingFocusElement, activeElement(ownerDocument(floatingFocusElement))) && getTabbableContent().length === 0 && !isUntrappedTypeableCombobox) {\n stopEvent(event);\n }\n }\n }\n const doc = ownerDocument(floatingFocusElement);\n return addEventListener(doc, 'keydown', onKeyDown);\n }, [disabled, floatingFocusElement, modal, isUntrappedTypeableCombobox, getTabbableContent]);\n\n // Track pointer/keyboard interactions to disambiguate focus and outside presses.\n React.useEffect(() => {\n if (disabled || !open) {\n return undefined;\n }\n const doc = ownerDocument(floatingFocusElement);\n function clearPointerDownOutside() {\n pointerDownOutsideRef.current = false;\n }\n function onPointerDown(event) {\n const target = getTarget(event);\n const insideElements = getResolvedInsideElements();\n const pointerTargetInside = contains(floating, target) || contains(domReference, target) || contains(portalContext?.portalNode, target) || insideElements.some(element => element === target || contains(element, target));\n pointerDownOutsideRef.current = !pointerTargetInside;\n lastInteractionTypeRef.current = event.pointerType || 'keyboard';\n if (target?.closest(`[${CLICK_TRIGGER_IDENTIFIER}]`)) {\n isPointerDownRef.current = true;\n // Reset on the next tick so a single click on a click-trigger doesn't\n // permanently suppress focus-out closing for the lifetime of the instance.\n pointerDownTimeout.start(0, () => {\n isPointerDownRef.current = false;\n });\n }\n }\n function onKeyDown() {\n lastInteractionTypeRef.current = 'keyboard';\n }\n return mergeCleanups(addEventListener(doc, 'pointerdown', onPointerDown, true), addEventListener(doc, 'pointerup', clearPointerDownOutside, true), addEventListener(doc, 'pointercancel', clearPointerDownOutside, true), addEventListener(doc, 'keydown', onKeyDown, true),\n // Avoid a stale `true` leaking into the next open (e.g. keep-mounted popups)\n // if the popup dismissed between pointerdown and pointerup.\n clearPointerDownOutside);\n }, [disabled, floating, domReference, floatingFocusElement, open, portalContext, pointerDownTimeout, getResolvedInsideElements]);\n\n // Close on focus out and restore focus within the floating tree when needed.\n React.useEffect(() => {\n if (disabled || !closeOnFocusOut) {\n return undefined;\n }\n const doc = ownerDocument(floatingFocusElement);\n\n // In Safari, buttons lose focus when pressing them.\n function handlePointerDown() {\n isPointerDownRef.current = true;\n pointerDownTimeout.start(0, () => {\n isPointerDownRef.current = false;\n });\n }\n function handleFocusIn(event) {\n const target = getTarget(event);\n if (isTabbable(target)) {\n lastFocusedTabbableRef.current = target;\n }\n }\n function handleFocusOutside(event) {\n const relatedTarget = event.relatedTarget;\n const currentTarget = event.currentTarget;\n const target = getTarget(event);\n\n // When focus is lost to the body (e.g. on a backdrop press), record the element that\n // had focus so a confirmation dialog opened while the body is focused can return focus\n // to it. Scoped to `modal` to avoid non-modal popups polluting the shared stack.\n if (modal && relatedTarget == null && target != null && contains(floating, target)) {\n addPreviouslyFocusedElement(target);\n }\n queueMicrotask(() => {\n const nodeId = getNodeId();\n const triggers = store.context.triggerElements;\n const insideElements = getResolvedInsideElements();\n const isRelatedFocusGuard = relatedTarget?.hasAttribute(createAttribute('focus-guard')) && [beforeGuardRef.current, afterGuardRef.current, portalContext?.beforeInsideRef.current, portalContext?.afterInsideRef.current, portalContext?.beforeOutsideRef.current, portalContext?.afterOutsideRef.current, resolveRef(previousFocusableElement), resolveRef(nextFocusableElement)].includes(relatedTarget);\n const movedToUnrelatedNode = !(contains(domReference, relatedTarget) || contains(floating, relatedTarget) || contains(relatedTarget, floating) || contains(portalContext?.portalNode, relatedTarget) || insideElements.some(element => element === relatedTarget || contains(element, relatedTarget)) || relatedTarget != null && triggers.hasElement(relatedTarget) || triggers.hasMatchingElement(trigger => contains(trigger, relatedTarget)) || isRelatedFocusGuard || tree && (getNodeChildren(tree.nodesRef.current, nodeId).find(node => contains(node.context?.elements.floating, relatedTarget) || contains(node.context?.elements.domReference, relatedTarget)) || getNodeAncestors(tree.nodesRef.current, nodeId).find(node => [node.context?.elements.floating, getFloatingFocusElement(node.context?.elements.floating)].includes(relatedTarget) || node.context?.elements.domReference === relatedTarget)));\n if (currentTarget === domReference && floatingFocusElement) {\n handleTabIndex(floatingFocusElement);\n }\n\n // Restore focus to the previous tabbable element index to prevent\n // focus from being lost outside the floating tree.\n if (restoreFocus && currentTarget !== domReference && !isElementVisible(target) && activeElement(doc) === doc.body) {\n // Let `FloatingPortal` effect knows that focus is still inside the\n // floating tree.\n if (isHTMLElement(floatingFocusElement)) {\n floatingFocusElement.focus();\n // If explicitly requested to restore focus to the popup container, do not search\n // for the next/previous tabbable element.\n if (restoreFocus === 'popup') {\n // If the element is removed on pointerdown, focus tries to move it,\n // but since it's removed at the same time, focus gets lost as it\n // happens after the .focus() call above.\n // In this case, focus needs to be moved asynchronously.\n restoreFocusFrame.request(() => {\n floatingFocusElement.focus();\n });\n return;\n }\n }\n const tabbableContent = getTabbableContent();\n const prevTabbable = lastFocusedTabbableRef.current;\n const nodeToFocus = (prevTabbable && tabbableContent.includes(prevTabbable) ? prevTabbable : null) || tabbableContent[tabbableContent.length - 1] || floatingFocusElement;\n if (isHTMLElement(nodeToFocus)) {\n nodeToFocus.focus();\n }\n }\n\n // https://github.com/floating-ui/floating-ui/issues/3060\n if (dataRef.current.insideReactTree) {\n dataRef.current.insideReactTree = false;\n return;\n }\n\n // Focus did not move inside the floating tree, and there are no tabbable\n // portal guards to handle closing.\n if ((isUntrappedTypeableCombobox ? true : !modal) && relatedTarget && movedToUnrelatedNode && !isPointerDownRef.current && (\n // Fix React 18 Strict Mode returnFocus due to double rendering.\n // For an \"untrapped\" typeable combobox (input role=combobox with\n // initialFocus=false), re-opening the popup and tabbing out should still close it even\n // when the previously focused element (e.g. the next tabbable outside the popup) is\n // focused again. Otherwise, the popup remains open on the second Tab sequence:\n // click input -> Tab (closes) -> click input -> Tab.\n // Allow closing when `isUntrappedTypeableCombobox` regardless of the previously focused element.\n isUntrappedTypeableCombobox || relatedTarget !== getPreviouslyFocusedElement())) {\n preventReturnFocusRef.current = true;\n store.setOpen(false, createChangeEventDetails(REASONS.focusOut, event));\n }\n });\n }\n function markInsideReactTree() {\n if (pointerDownOutsideRef.current) {\n return;\n }\n dataRef.current.insideReactTree = true;\n blurTimeout.start(0, () => {\n dataRef.current.insideReactTree = false;\n });\n }\n const domReferenceElement = isHTMLElement(domReference) ? domReference : null;\n if (!floating && !domReferenceElement) {\n return undefined;\n }\n return mergeCleanups(domReferenceElement && addEventListener(domReferenceElement, 'focusout', handleFocusOutside), domReferenceElement && addEventListener(domReferenceElement, 'pointerdown', handlePointerDown), floating && addEventListener(floating, 'focusin', handleFocusIn), floating && addEventListener(floating, 'focusout', handleFocusOutside), floating && portalContext && addEventListener(floating, 'focusout', markInsideReactTree, true));\n }, [disabled, domReference, floating, floatingFocusElement, modal, tree, portalContext, store, closeOnFocusOut, restoreFocus, getTabbableContent, isUntrappedTypeableCombobox, getNodeId, dataRef, blurTimeout, pointerDownTimeout, restoreFocusFrame, nextFocusableElement, previousFocusableElement, getResolvedInsideElements]);\n\n // Hide everything outside the floating tree from assistive tech while open.\n React.useEffect(() => {\n if (disabled || !floating || !open) {\n return undefined;\n }\n\n // Don't hide portals nested within the parent portal.\n const portalNodes = Array.from(portalContext?.portalNode?.querySelectorAll(`[${createAttribute('portal')}]`) || []);\n const ancestors = tree ? getNodeAncestors(tree.nodesRef.current, getNodeId()) : [];\n const rootAncestorComboboxDomReference = ancestors.find(node => isTypeableCombobox(node.context?.elements.domReference || null))?.context?.elements.domReference;\n const controlInsideElements = [floating, ...portalNodes, beforeGuardRef.current, afterGuardRef.current, portalContext?.beforeOutsideRef.current, portalContext?.afterOutsideRef.current, ...getResolvedInsideElements()];\n const insideElements = [...controlInsideElements, rootAncestorComboboxDomReference, resolveRef(previousFocusableElement), resolveRef(nextFocusableElement), isUntrappedTypeableCombobox ? domReference : null].filter(x => x != null);\n const ariaHiddenCleanup = markOthers(insideElements, {\n ariaHidden: modal || isUntrappedTypeableCombobox,\n mark: false\n });\n const markerInsideElements = [floating, ...portalNodes].filter(x => x != null);\n const markerCleanup = markOthers(markerInsideElements);\n return () => {\n markerCleanup();\n ariaHiddenCleanup();\n };\n }, [open, disabled, domReference, floating, modal, portalContext, isUntrappedTypeableCombobox, tree, getNodeId, nextFocusableElement, previousFocusableElement, getResolvedInsideElements]);\n\n // Focus the initial element when the floating element opens.\n useIsoLayoutEffect(() => {\n if (!open || disabled || !isHTMLElement(floatingFocusElement)) {\n return;\n }\n const doc = ownerDocument(floatingFocusElement);\n const previouslyFocusedElement = activeElement(doc);\n\n // Wait for any layout effect state setters to execute to set `tabIndex`.\n queueMicrotask(() => {\n const initialFocusValueOrFn = initialFocusRef.current;\n const resolvedInitialFocus = typeof initialFocusValueOrFn === 'function' ? initialFocusValueOrFn(openInteractionTypeRef.current || '') : initialFocusValueOrFn;\n\n // `null` should fallback to default behavior in case of an empty ref.\n if (resolvedInitialFocus === undefined || resolvedInitialFocus === false) {\n return;\n }\n const focusAlreadyInsideFloatingEl = contains(floatingFocusElement, previouslyFocusedElement);\n if (focusAlreadyInsideFloatingEl) {\n return;\n }\n let focusableElements = null;\n const getDefaultFocusElement = () => {\n if (focusableElements == null) {\n focusableElements = getTabbableContent(floatingFocusElement);\n }\n return focusableElements[0] || floatingFocusElement;\n };\n let elToFocus;\n if (resolvedInitialFocus === true || resolvedInitialFocus === null) {\n elToFocus = getDefaultFocusElement();\n } else {\n elToFocus = resolveRef(resolvedInitialFocus);\n }\n elToFocus = elToFocus || getDefaultFocusElement();\n const hadFocusInside = contains(floatingFocusElement, activeElement(doc));\n enqueueFocus(elToFocus, {\n preventScroll: elToFocus === floatingFocusElement,\n shouldFocus() {\n // This focus is queued on the next animation frame. If the floating element has closed\n // before it runs — e.g. tabbing out of a kept-mounted popup — don't pull focus back\n // onto the initial element after it has legitimately moved elsewhere.\n if (!openRef.current) {\n return false;\n }\n if (hadFocusInside) {\n return true;\n }\n const currentActiveElement = activeElement(doc);\n const focusMovedInside = currentActiveElement !== elToFocus && contains(floatingFocusElement, currentActiveElement);\n return !focusMovedInside;\n }\n });\n });\n }, [disabled, open, floatingFocusElement, getTabbableContent, initialFocusRef, openInteractionTypeRef, openRef]);\n\n // Track return focus targets and restore focus on unmount/close.\n useIsoLayoutEffect(() => {\n if (disabled || !floatingFocusElement) {\n return undefined;\n }\n const doc = ownerDocument(floatingFocusElement);\n const elementFocusedBeforeOpen = activeElement(doc);\n // Only nullish interaction types represent programmatic opens. The empty\n // string default is intentionally not treated as programmatic.\n const preferPreviousFocus = openInteractionTypeRef.current == null;\n addPreviouslyFocusedElement(elementFocusedBeforeOpen);\n\n // Dismissing via outside press should always ignore `returnFocus` to\n // prevent unwanted scrolling.\n function onOpenChangeLocal(details) {\n if (!details.open) {\n closeTypeRef.current = getEventType(details.nativeEvent, lastInteractionTypeRef.current);\n }\n if (details.reason === REASONS.triggerHover && details.nativeEvent.type === 'mouseleave') {\n preventReturnFocusRef.current = true;\n }\n if (details.reason !== REASONS.outsidePress) {\n return;\n }\n if (details.nested) {\n preventReturnFocusRef.current = false;\n } else if (isVirtualClick(details.nativeEvent) || isVirtualPointerEvent(details.nativeEvent)) {\n preventReturnFocusRef.current = false;\n } else {\n let isPreventScrollSupported = false;\n ownerDocument(floatingFocusElement).createElement('div').focus({\n get preventScroll() {\n isPreventScrollSupported = true;\n return false;\n }\n });\n if (isPreventScrollSupported) {\n preventReturnFocusRef.current = false;\n } else {\n preventReturnFocusRef.current = true;\n }\n }\n }\n events.on('openchange', onOpenChangeLocal);\n function getReturnElement() {\n const returnFocusValueOrFn = returnFocusRef.current;\n let resolvedReturnFocusValue = typeof returnFocusValueOrFn === 'function' ? returnFocusValueOrFn(closeTypeRef.current) : returnFocusValueOrFn;\n\n // `null` should fallback to default behavior in case of an empty ref.\n if (resolvedReturnFocusValue === undefined || resolvedReturnFocusValue === false) {\n return null;\n }\n if (resolvedReturnFocusValue === null) {\n resolvedReturnFocusValue = true;\n }\n const referenceReturnElement = domReference?.isConnected ? domReference : null;\n const previousReturnElement = elementFocusedBeforeOpen?.isConnected && getNodeName(elementFocusedBeforeOpen) !== 'body' ? elementFocusedBeforeOpen : null;\n let defaultReturnElement = preferPreviousFocus ? previousReturnElement || referenceReturnElement : referenceReturnElement || previousReturnElement;\n if (!defaultReturnElement) {\n defaultReturnElement = getPreviouslyFocusedElement() || null;\n }\n if (typeof resolvedReturnFocusValue === 'boolean') {\n return defaultReturnElement;\n }\n return resolveRef(resolvedReturnFocusValue) || defaultReturnElement || null;\n }\n return () => {\n events.off('openchange', onOpenChangeLocal);\n const activeEl = activeElement(doc);\n const insideElements = getResolvedInsideElements();\n const isFocusInsideFloatingTree = contains(floating, activeEl) || insideElements.some(element => element === activeEl || contains(element, activeEl)) || tree && getNodeChildren(tree.nodesRef.current, getNodeId(), false).some(node => contains(node.context?.elements.floating, activeEl));\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const returnFocusValueOrFn = returnFocusRef.current;\n const returnElement = getReturnElement();\n queueMicrotask(() => {\n // This is `returnElement`, if it's tabbable, or its first tabbable child.\n const tabbableReturnElement = getFirstTabbableElement(returnElement);\n const hasExplicitReturnFocus = typeof returnFocusValueOrFn !== 'boolean';\n if (returnFocusValueOrFn && !preventReturnFocusRef.current && isHTMLElement(tabbableReturnElement) && (\n // If the focus moved somewhere else after mount, avoid returning focus\n // since it likely entered a different element which should be\n // respected: https://github.com/floating-ui/floating-ui/issues/2607\n !hasExplicitReturnFocus && tabbableReturnElement !== activeEl && activeEl !== doc.body ? isFocusInsideFloatingTree : true)) {\n tabbableReturnElement.focus({\n preventScroll: true\n });\n }\n preventReturnFocusRef.current = false;\n });\n };\n }, [disabled, floating, floatingFocusElement, returnFocusRef, openInteractionTypeRef, events, tree, domReference, getNodeId, getResolvedInsideElements]);\n\n // Safari may randomly scroll to the bottom of the page if an input inside a popup has focus\n // when the popup unmounts from the DOM.\n // By blurring it before the popup unmounts, we can prevent this behavior.\n useIsoLayoutEffect(() => {\n if (!platform.engine.webkit || open || !floating) {\n return;\n }\n const activeEl = activeElement(ownerDocument(floating));\n if (!isHTMLElement(activeEl) || !isTypeableElement(activeEl)) {\n return;\n }\n if (contains(floating, activeEl)) {\n activeEl.blur();\n }\n }, [open, floating]);\n\n // Synchronize the `context` & `modal` value to the FloatingPortal context.\n // It will decide whether or not it needs to render its own guards.\n useIsoLayoutEffect(() => {\n if (disabled || !portalContext) {\n return undefined;\n }\n portalContext.setFocusManagerState({\n modal,\n closeOnFocusOut,\n open,\n onOpenChange: store.setOpen,\n domReference\n });\n return () => {\n portalContext.setFocusManagerState(null);\n };\n }, [disabled, portalContext, modal, open, store, closeOnFocusOut, domReference]);\n\n // Keep the floating element tabIndex in sync and clear stale focus records.\n useIsoLayoutEffect(() => {\n if (disabled || !floatingFocusElement) {\n return undefined;\n }\n handleTabIndex(floatingFocusElement);\n return () => {\n queueMicrotask(clearDisconnectedPreviouslyFocusedElements);\n };\n }, [disabled, floatingFocusElement]);\n const shouldRenderGuards = !disabled && (modal ? !isUntrappedTypeableCombobox : true) && (isInsidePortal || modal);\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [shouldRenderGuards && /*#__PURE__*/_jsx(FocusGuard, {\n \"data-type\": \"inside\",\n ref: mergedBeforeGuardRef,\n onFocus: event => {\n if (modal) {\n const els = getTabbableContent();\n enqueueFocus(els[els.length - 1]);\n } else if (portalContext?.portalNode) {\n preventReturnFocusRef.current = false;\n if (isOutsideEvent(event, portalContext.portalNode)) {\n const nextTabbable = getNextTabbable(domReference);\n nextTabbable?.focus();\n } else {\n resolveRef(previousFocusableElement ?? portalContext.beforeOutsideRef)?.focus();\n }\n }\n }\n }), children, shouldRenderGuards && /*#__PURE__*/_jsx(FocusGuard, {\n \"data-type\": \"inside\",\n ref: mergedAfterGuardRef,\n onFocus: event => {\n if (modal) {\n enqueueFocus(getTabbableContent()[0]);\n } else if (portalContext?.portalNode) {\n if (closeOnFocusOut) {\n preventReturnFocusRef.current = true;\n }\n if (isOutsideEvent(event, portalContext.portalNode)) {\n const prevTabbable = getPreviousTabbable(domReference);\n prevTabbable?.focus();\n } else {\n resolveRef(nextFocusableElement ?? portalContext.afterOutsideRef)?.focus();\n }\n }\n }\n })]\n });\n}"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,SAAS,GAAa,GAAO,GAAqB;CAChD,IAAM,IAAMA,EAAY,EAAU,CAAK,CAAC;CAmBxC,OAlBI,aAAiB,EAAI,gBAChB,aAEL,aAAiB,EAAI,aAGhB,KAAuB,aAE5B,iBAAiB,IACZ,EAAM,eAAe,aAE1B,aAAa,IACR,UAEL,aAAiB,EAAI,aAEhB,MAAwB,EAAM,WAAW,IAAI,aAAa,WAE5D;AACT;AACA,IAAM,IAAa,IACf,IAA4B,CAAC;AACjC,SAAS,IAA6C;CACpD,IAA4B,EAA0B,QAAO,MACpD,EAAM,MAAM,CAAC,EAAE,WACvB;AACH;AACA,SAAS,GAA4B,GAAS;C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ACX,EAAc,qBAAqB,IAAI;EACzC;CACF,GAAG;EAAC;EAAU;EAAe;EAAO;EAAM;EAAO;EAAiB;CAAY,CAAC,GAG/E,QAAyB;EACnB,WAAY,CAAC,IAIjB,OADA,GAAe,CAAoB,SACtB;GACX,eAAe,CAA0C;EAC3D;CACF,GAAG,CAAC,GAAU,CAAoB,CAAC;CACnC,IAAM,KAAqB,CAAC,MAAa,MAAQ,CAAC,OAAwC,MAAkB;CAC5G,OAAoB,iBAAMF,EAAM,UAAU,EACxC,UAAU;EAAC,MAAmC,iBAAK,IAAY;GAC7D,aAAa;GACb,KAAK;GACL,UAAS,MAAS;IAChB,IAAI,GAAO;KACT,IAAM,IAAM,EAAmB;KAC/B,EAAa,EAAI,EAAI,SAAS,EAAE;IAClC,OAAO,AAAI,GAAe,eACxB,EAAsB,UAAU,IAC5B,GAAe,GAAO,EAAc,UAAU,IAEhD,GADqC,CAC1B,CAAC,EAAE,MAAM,IAEpB,EAAW,KAA4B,EAAc,gBAAgB,CAAC,EAAE,MAAM;GAGpF;EACF,CAAC;EAAG;EAAU,MAAmC,iBAAK,IAAY;GAChE,aAAa;GACb,KAAK;GACL,UAAS,MAAS;IAChB,AAAI,IACF,EAAa,EAAmB,CAAC,CAAC,EAAE,IAC3B,GAAe,eACpB,MACF,EAAsB,UAAU,KAE9B,GAAe,GAAO,EAAc,UAAU,IAEhD,GADyC,CAC9B,CAAC,EAAE,MAAM,IAEpB,EAAW,KAAwB,EAAc,eAAe,CAAC,EAAE,MAAM;GAG/E;EACF,CAAC;CAAC,EACJ,CAAC;AACH"}
1
+ {"version":3,"file":"index244.js","names":[],"sources":["../../../node_modules/@base-ui/react/utils/resolveRef.mjs"],"sourcesContent":["/**\n * If the provided argument is a ref object, returns its `current` value.\n * Otherwise, returns the argument itself.\n */\nexport function resolveRef(maybeRef) {\n if (maybeRef == null) {\n return maybeRef;\n }\n return 'current' in maybeRef ? maybeRef.current : maybeRef;\n}"],"x_google_ignoreList":[0],"mappings":";AAIA,SAAgB,EAAW,GAAU;CAInC,OAHI,KAAY,OACP,IAEF,aAAa,IAAW,EAAS,UAAU;AACpD"}
package/dist/index245.js CHANGED
@@ -1,71 +1,328 @@
1
1
  "use client";
2
- import { EMPTY_OBJECT as e } from "./index191.js";
3
- import { triggerPress as t } from "./index208.js";
4
- import { createChangeEventDetails as n } from "./index209.js";
5
- import { useTimeout as r } from "./index215.js";
6
- import { isMouseLikePointerType as i } from "./index221.js";
7
- import { getTarget as a } from "./index223.js";
8
- import { isTypeableElement as o } from "./index224.js";
9
- import { useAnimationFrame as s } from "./index228.js";
10
- import * as c from "react";
11
- //#region ../../node_modules/@base-ui/react/floating-ui-react/hooks/useClick.mjs
12
- function l(l, u = {}) {
13
- let { enabled: d = !0, event: f = "click", toggle: p = !0, ignoreMouse: m = !1, stickIfOpen: h = !0, touchOpenDelay: g = 0, reason: _ = t } = u, v = "rootStore" in l ? l.rootStore : l, y = v.context.dataRef, b = c.useRef(void 0), x = s(), S = r(), C = c.useMemo(() => {
14
- function e(e, t, r, i) {
15
- let a = n(_, t, r);
16
- e && i === "touch" && g > 0 ? S.start(g, () => {
17
- v.setOpen(!0, a);
18
- }) : v.setOpen(e, a);
2
+ import { useMergedRefs as e } from "./index186.js";
3
+ import { getNodeName as t, getWindow as n, isHTMLElement as r } from "./index200.js";
4
+ import { useStableCallback as i } from "./index202.js";
5
+ import { useIsoLayoutEffect as a } from "./index204.js";
6
+ import { ownerDocument as o } from "./index207.js";
7
+ import { focusOut as s } from "./index210.js";
8
+ import { createChangeEventDetails as c } from "./index211.js";
9
+ import { useTimeout as l } from "./index217.js";
10
+ import { webkit as ee } from "./index220.js";
11
+ import { isVirtualClick as u, isVirtualPointerEvent as te, stopEvent as ne } from "./index223.js";
12
+ import { activeElement as d, contains as f, getTarget as p } from "./index225.js";
13
+ import { getFloatingFocusElement as re, isTypeableCombobox as m, isTypeableElement as ie } from "./index226.js";
14
+ import { addEventListener as h } from "./index227.js";
15
+ import { mergeCleanups as g } from "./index228.js";
16
+ import { useValueAsRef as _ } from "./index229.js";
17
+ import { useAnimationFrame as ae } from "./index230.js";
18
+ import { FocusGuard as oe } from "./index232.js";
19
+ import { isElementVisible as se } from "./index234.js";
20
+ import { focusable as v, getNextTabbable as ce, getPreviousTabbable as le, isOutsideEvent as ue, isTabbable as y, tabbable as de } from "./index235.js";
21
+ import { getNodeAncestors as fe, getNodeChildren as pe } from "./index236.js";
22
+ import { createAttribute as me } from "./index237.js";
23
+ import { enqueueFocus as b } from "./index238.js";
24
+ import { markOthers as he } from "./index239.js";
25
+ import "./index240.js";
26
+ import { usePortalContext as ge } from "./index241.js";
27
+ import { useFloatingTree as _e } from "./index243.js";
28
+ import { resolveRef as x } from "./index244.js";
29
+ import * as S from "react";
30
+ import { jsx as ve, jsxs as ye } from "react/jsx-runtime";
31
+ //#region ../../node_modules/@base-ui/react/floating-ui-react/components/FloatingFocusManager.mjs
32
+ function be(e, t) {
33
+ let r = n(p(e));
34
+ return e instanceof r.KeyboardEvent ? "keyboard" : e instanceof r.FocusEvent ? t || "keyboard" : "pointerType" in e ? e.pointerType || "keyboard" : "touches" in e ? "touch" : e instanceof r.MouseEvent ? t || (e.detail === 0 ? "keyboard" : "mouse") : "";
35
+ }
36
+ var xe = 20, C = [];
37
+ function w() {
38
+ C = C.filter((e) => e.deref()?.isConnected);
39
+ }
40
+ function Se(e) {
41
+ w(), e && t(e) !== "body" && (C.push(new WeakRef(e)), C.length > xe && (C = C.slice(-20)));
42
+ }
43
+ function Ce() {
44
+ return w(), C[C.length - 1]?.deref();
45
+ }
46
+ function we(e) {
47
+ return e ? y(e) ? e : de(e)[0] || e : null;
48
+ }
49
+ function Te(e) {
50
+ if (e.hasAttribute("tabindex") && !e.hasAttribute("data-tabindex") || !e.getAttribute("role")?.includes("dialog")) return;
51
+ let t = v(e).filter((e) => {
52
+ let t = e.getAttribute("data-tabindex") || "";
53
+ return y(e) || e.hasAttribute("data-tabindex") && !t.startsWith("-");
54
+ }), n = e.getAttribute("tabindex");
55
+ t.length === 0 ? n !== "0" && (e.setAttribute("tabindex", "0"), e.setAttribute("data-tabindex", "0")) : (n !== "-1" || e.hasAttribute("data-tabindex") && e.getAttribute("data-tabindex") !== "-1") && (e.setAttribute("tabindex", "-1"), e.setAttribute("data-tabindex", "-1"));
56
+ }
57
+ function T(n) {
58
+ let { context: v, children: xe, disabled: C = !1, initialFocus: T = !0, returnFocus: Ee = !0, restoreFocus: E = !1, modal: D = !0, closeOnFocusOut: O = !0, openInteractionType: De = "", nextFocusableElement: k, previousFocusableElement: A, beforeContentFocusGuardRef: Oe, externalTree: ke, getInsideElements: Ae } = n, j = "rootStore" in v ? v.rootStore : v, M = j.useState("open"), N = j.useState("domReferenceElement"), P = j.useState("floatingElement"), { events: F, dataRef: I } = j.context, L = i(() => I.current.floatingContext?.nodeId), je = T === !1, R = m(N) && je, Me = _(T), z = _(Ee), B = _(De), Ne = _(M), V = _e(ke), H = ge(), U = S.useRef(!1), W = S.useRef(!1), G = S.useRef(!1), Pe = S.useRef(null), K = S.useRef(""), q = S.useRef(""), J = S.useRef(null), Y = S.useRef(null), Fe = e(J, Oe, H?.beforeInsideRef), Ie = e(Y, H?.afterInsideRef), Le = l(), X = l(), Re = ae(), ze = H != null, Z = re(P), Q = i((e = Z) => e ? de(e) : []), $ = i(() => Ae?.().filter((e) => e != null) ?? []);
59
+ S.useEffect(() => {
60
+ if (C || !D) return;
61
+ function e(e) {
62
+ e.key === "Tab" && f(Z, d(o(Z))) && Q().length === 0 && !R && ne(e);
19
63
  }
20
- function t(e, t, n) {
21
- let r = y.current.openEvent, i = v.select("domReferenceElement") !== t;
22
- return e && i || !e || !p ? !0 : r && h ? !n(r.type) : !1;
64
+ let t = o(Z);
65
+ return h(t, "keydown", e);
66
+ }, [
67
+ C,
68
+ Z,
69
+ D,
70
+ R,
71
+ Q
72
+ ]), S.useEffect(() => {
73
+ if (C || !M) return;
74
+ let e = o(Z);
75
+ function t() {
76
+ G.current = !1;
23
77
  }
24
- return {
25
- onPointerDown(e) {
26
- b.current = e.pointerType;
27
- },
28
- onMouseDown(n) {
29
- let r = b.current, s = n.nativeEvent, c = v.select("open");
30
- if (n.button !== 0 || f === "click" || i(r, !0) && m) return;
31
- let l = t(c, n.currentTarget, (e) => e === "click" || e === "mousedown"), u = a(s);
32
- if (o(u)) {
33
- e(l, s, u, r);
34
- return;
78
+ function n(e) {
79
+ let t = p(e), n = $(), r = f(P, t) || f(N, t) || f(H?.portalNode, t) || n.some((e) => e === t || f(e, t));
80
+ G.current = !r, q.current = e.pointerType || "keyboard", t?.closest("[data-base-ui-click-trigger]") && (W.current = !0, X.start(0, () => {
81
+ W.current = !1;
82
+ }));
83
+ }
84
+ function r() {
85
+ q.current = "keyboard";
86
+ }
87
+ return g(h(e, "pointerdown", n, !0), h(e, "pointerup", t, !0), h(e, "pointercancel", t, !0), h(e, "keydown", r, !0), t);
88
+ }, [
89
+ C,
90
+ P,
91
+ N,
92
+ Z,
93
+ M,
94
+ H,
95
+ X,
96
+ $
97
+ ]), S.useEffect(() => {
98
+ if (C || !O) return;
99
+ let e = o(Z);
100
+ function t() {
101
+ W.current = !0, X.start(0, () => {
102
+ W.current = !1;
103
+ });
104
+ }
105
+ function n(e) {
106
+ let t = p(e);
107
+ y(t) && (Pe.current = t);
108
+ }
109
+ function i(t) {
110
+ let n = t.relatedTarget, i = t.currentTarget, a = p(t);
111
+ D && n == null && a != null && f(P, a) && Se(a), queueMicrotask(() => {
112
+ let o = L(), l = j.context.triggerElements, ee = $(), u = n?.hasAttribute(me("focus-guard")) && [
113
+ J.current,
114
+ Y.current,
115
+ H?.beforeInsideRef.current,
116
+ H?.afterInsideRef.current,
117
+ H?.beforeOutsideRef.current,
118
+ H?.afterOutsideRef.current,
119
+ x(A),
120
+ x(k)
121
+ ].includes(n), te = !(f(N, n) || f(P, n) || f(n, P) || f(H?.portalNode, n) || ee.some((e) => e === n || f(e, n)) || l.hasMatchingElement((e) => f(e, n)) || u || V && (pe(V.nodesRef.current, o).find((e) => f(e.context?.elements.floating, n) || f(e.context?.elements.domReference, n)) || fe(V.nodesRef.current, o).find((e) => [e.context?.elements.floating, re(e.context?.elements.floating)].includes(n) || e.context?.elements.domReference === n)));
122
+ if (i === N && Z && Te(Z), E && i !== N && !se(a) && d(e) === e.body) {
123
+ if (r(Z) && (Z.focus(), E === "popup")) {
124
+ Re.request(() => {
125
+ Z.focus();
126
+ });
127
+ return;
128
+ }
129
+ let e = Q(), t = Pe.current, n = (t && e.includes(t) ? t : null) || e[e.length - 1] || Z;
130
+ r(n) && n.focus();
35
131
  }
36
- let d = n.currentTarget;
37
- x.request(() => {
38
- e(l, s, d, r);
39
- });
40
- },
41
- onClick(n) {
42
- if (f === "mousedown-only") return;
43
- let r = b.current;
44
- if (f === "mousedown" && r) {
45
- b.current = void 0;
132
+ if (I.current.insideReactTree) {
133
+ I.current.insideReactTree = !1;
46
134
  return;
47
135
  }
48
- i(r, !0) && m || e(t(v.select("open"), n.currentTarget, (e) => e === "click" || e === "mousedown" || e === "keydown" || e === "keyup"), n.nativeEvent, n.currentTarget, r);
49
- },
50
- onKeyDown() {
51
- b.current = void 0;
136
+ (R || !D) && n && te && !W.current && (R || n !== Ce()) && (U.current = !0, j.setOpen(!1, c(s, t)));
137
+ });
138
+ }
139
+ function a() {
140
+ G.current || (I.current.insideReactTree = !0, Le.start(0, () => {
141
+ I.current.insideReactTree = !1;
142
+ }));
143
+ }
144
+ let l = r(N) ? N : null;
145
+ if (!(!P && !l)) return g(l && h(l, "focusout", i), l && h(l, "pointerdown", t), P && h(P, "focusin", n), P && h(P, "focusout", i), P && H && h(P, "focusout", a, !0));
146
+ }, [
147
+ C,
148
+ N,
149
+ P,
150
+ Z,
151
+ D,
152
+ V,
153
+ H,
154
+ j,
155
+ O,
156
+ E,
157
+ Q,
158
+ R,
159
+ L,
160
+ I,
161
+ Le,
162
+ X,
163
+ Re,
164
+ k,
165
+ A,
166
+ $
167
+ ]), S.useEffect(() => {
168
+ if (C || !P || !M) return;
169
+ let e = Array.from(H?.portalNode?.querySelectorAll(`[${me("portal")}]`) || []), t = (V ? fe(V.nodesRef.current, L()) : []).find((e) => m(e.context?.elements.domReference || null))?.context?.elements.domReference, n = [
170
+ P,
171
+ ...e,
172
+ J.current,
173
+ Y.current,
174
+ H?.beforeOutsideRef.current,
175
+ H?.afterOutsideRef.current,
176
+ ...$(),
177
+ t,
178
+ x(A),
179
+ x(k),
180
+ R ? N : null
181
+ ].filter((e) => e != null), r = he(n, {
182
+ ariaHidden: D || R,
183
+ mark: !1
184
+ }), i = [P, ...e].filter((e) => e != null), a = he(i);
185
+ return () => {
186
+ a(), r();
187
+ };
188
+ }, [
189
+ M,
190
+ C,
191
+ N,
192
+ P,
193
+ D,
194
+ H,
195
+ R,
196
+ V,
197
+ L,
198
+ k,
199
+ A,
200
+ $
201
+ ]), a(() => {
202
+ if (!M || C || !r(Z)) return;
203
+ K.current = "", q.current = "";
204
+ let e = o(Z), t = d(e);
205
+ queueMicrotask(() => {
206
+ let n = Me.current, r = typeof n == "function" ? n(B.current || "") : n;
207
+ if (r === void 0 || r === !1 || f(Z, t)) return;
208
+ let i = null, a = () => (i ??= Q(Z), i[0] || Z), o;
209
+ o = r === !0 || r === null ? a() : x(r), o ||= a();
210
+ let s = f(Z, d(e));
211
+ b(o, {
212
+ preventScroll: o === Z,
213
+ shouldFocus() {
214
+ if (!Ne.current) return !1;
215
+ if (s) return !0;
216
+ let t = d(e);
217
+ return !(t !== o && f(Z, t));
218
+ }
219
+ });
220
+ });
221
+ }, [
222
+ C,
223
+ M,
224
+ Z,
225
+ Q,
226
+ Me,
227
+ B,
228
+ Ne
229
+ ]), a(() => {
230
+ if (C || !Z) return;
231
+ let e = o(Z), n = d(e), i = B.current == null;
232
+ Se(n);
233
+ function a(e) {
234
+ if (e.open || (K.current = be(e.nativeEvent, q.current)), e.reason === "trigger-hover" && e.nativeEvent.type === "mouseleave" && (U.current = !0), e.reason === "outside-press") {
235
+ if (e.nested) U.current = !1;
236
+ else if (u(e.nativeEvent) || te(e.nativeEvent)) U.current = !1;
237
+ else {
238
+ let e = !1;
239
+ o(Z).createElement("div").focus({ get preventScroll() {
240
+ return e = !0, !1;
241
+ } }), e ? U.current = !1 : U.current = !0;
242
+ }
52
243
  }
244
+ }
245
+ F.on("openchange", a);
246
+ function s(e) {
247
+ let r = z.current, a = typeof r == "function" ? r(e) : r;
248
+ if (a === void 0 || a === !1) return null;
249
+ a === null && (a = !0);
250
+ let o = N?.isConnected ? N : null, s = n?.isConnected && t(n) !== "body" ? n : null, c = i ? s || o : o || s;
251
+ return c ||= Ce() || null, typeof a == "boolean" ? c : x(a) || c || null;
252
+ }
253
+ return () => {
254
+ F.off("openchange", a);
255
+ let t = d(e), n = $(), i = f(P, t) || n.some((e) => e === t || f(e, t)) || V && pe(V.nodesRef.current, L(), !1).some((e) => f(e.context?.elements.floating, t)), o = z.current, c = K.current, l = s(c);
256
+ queueMicrotask(() => {
257
+ let n = we(l), a = typeof o != "boolean";
258
+ if (o && !U.current && r(n) && (!(!a && n !== t && t !== e.body) || i)) {
259
+ let e = { preventScroll: !0 };
260
+ c === "keyboard" && (e.focusVisible = !0), n.focus(e);
261
+ }
262
+ U.current = !1;
263
+ });
264
+ };
265
+ }, [
266
+ C,
267
+ P,
268
+ Z,
269
+ z,
270
+ B,
271
+ F,
272
+ V,
273
+ N,
274
+ L,
275
+ $
276
+ ]), a(() => {
277
+ if (!ee || M || !P) return;
278
+ let e = d(o(P));
279
+ !r(e) || !ie(e) || f(P, e) && e.blur();
280
+ }, [M, P]), a(() => {
281
+ if (!(C || !H)) return H.setFocusManagerState({
282
+ modal: D,
283
+ closeOnFocusOut: O,
284
+ open: M,
285
+ onOpenChange: j.setOpen,
286
+ domReference: N
287
+ }), () => {
288
+ H.setFocusManagerState(null);
53
289
  };
54
290
  }, [
55
- y,
56
- f,
57
- m,
58
- _,
59
- v,
60
- h,
61
- p,
62
- x,
63
- S,
64
- g
65
- ]);
66
- return c.useMemo(() => d ? { reference: C } : e, [d, C]);
291
+ C,
292
+ H,
293
+ D,
294
+ M,
295
+ j,
296
+ O,
297
+ N
298
+ ]), a(() => {
299
+ if (!(C || !Z)) return Te(Z), () => {
300
+ queueMicrotask(w);
301
+ };
302
+ }, [C, Z]);
303
+ let Be = !C && (!D || !R) && (ze || D);
304
+ return /*#__PURE__*/ ye(S.Fragment, { children: [
305
+ Be && /*#__PURE__*/ ve(oe, {
306
+ "data-type": "inside",
307
+ ref: Fe,
308
+ onFocus: (e) => {
309
+ if (D) {
310
+ let e = Q();
311
+ b(e[e.length - 1]);
312
+ } else H?.portalNode && (U.current = !1, ue(e, H.portalNode) ? ce(N)?.focus() : x(A ?? H.beforeOutsideRef)?.focus());
313
+ }
314
+ }),
315
+ xe,
316
+ Be && /*#__PURE__*/ ve(oe, {
317
+ "data-type": "inside",
318
+ ref: Ie,
319
+ onFocus: (e) => {
320
+ D ? b(Q()[0]) : H?.portalNode && (O && (U.current = !0), ue(e, H.portalNode) ? le(N)?.focus() : x(k ?? H.afterOutsideRef)?.focus());
321
+ }
322
+ })
323
+ ] });
67
324
  }
68
325
  //#endregion
69
- export { l as useClick };
326
+ export { T as FloatingFocusManager };
70
327
 
71
328
  //# sourceMappingURL=index245.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index245.js","names":["REASONS.triggerPress","React"],"sources":["../../../node_modules/@base-ui/react/floating-ui-react/hooks/useClick.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useAnimationFrame } from '@base-ui/utils/useAnimationFrame';\nimport { useTimeout } from '@base-ui/utils/useTimeout';\nimport { EMPTY_OBJECT } from '@base-ui/utils/empty';\nimport { getTarget, isTypeableElement } from \"../utils/element.mjs\";\nimport { isMouseLikePointerType } from \"../utils/event.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\n/**\n * Opens or closes the floating element when clicking the reference element.\n * @see https://floating-ui.com/docs/useClick\n */\nexport function useClick(context, props = {}) {\n const {\n enabled = true,\n event: eventOption = 'click',\n toggle = true,\n ignoreMouse = false,\n stickIfOpen = true,\n touchOpenDelay = 0,\n reason = REASONS.triggerPress\n } = props;\n const store = 'rootStore' in context ? context.rootStore : context;\n const dataRef = store.context.dataRef;\n const pointerTypeRef = React.useRef(undefined);\n const frame = useAnimationFrame();\n const touchOpenTimeout = useTimeout();\n const reference = React.useMemo(() => {\n function setOpenWithTouchDelay(nextOpen, nativeEvent, target, pointerType) {\n const details = createChangeEventDetails(reason, nativeEvent, target);\n if (nextOpen && pointerType === 'touch' && touchOpenDelay > 0) {\n touchOpenTimeout.start(touchOpenDelay, () => {\n store.setOpen(true, details);\n });\n } else {\n store.setOpen(nextOpen, details);\n }\n }\n function getNextOpen(open, currentTarget, isClickLikeOpenEvent) {\n const openEvent = dataRef.current.openEvent;\n const hasClickedOnInactiveTrigger = store.select('domReferenceElement') !== currentTarget;\n if (open && hasClickedOnInactiveTrigger) {\n // Moving between triggers should always open the newly active one.\n return true;\n }\n if (!open) {\n // A closed popup should open on the next press.\n return true;\n }\n if (!toggle) {\n // Non-toggle mode never closes on a repeated trigger press.\n return true;\n }\n if (openEvent && stickIfOpen) {\n // Preserve hover/focus-opened popups until the matching click-like event closes them.\n return !isClickLikeOpenEvent(openEvent.type);\n }\n\n // Otherwise, a repeated click toggles the popup closed.\n return false;\n }\n return {\n onPointerDown(event) {\n pointerTypeRef.current = event.pointerType;\n },\n onMouseDown(event) {\n const pointerType = pointerTypeRef.current;\n const nativeEvent = event.nativeEvent;\n const open = store.select('open');\n\n // Ignore all buttons except for the \"main\" button.\n // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button\n if (event.button !== 0 || eventOption === 'click' || isMouseLikePointerType(pointerType, true) && ignoreMouse) {\n return;\n }\n const nextOpen = getNextOpen(open, event.currentTarget, openEventType => openEventType === 'click' || openEventType === 'mousedown');\n\n // Animations sometimes won't run on a typeable element if using a rAF.\n // Focus is always set on these elements. For touch, we may delay opening.\n const target = getTarget(nativeEvent);\n if (isTypeableElement(target)) {\n setOpenWithTouchDelay(nextOpen, nativeEvent, target, pointerType);\n return;\n }\n\n // Capture the currentTarget before the rAF.\n // as React sets it to null after the event handler completes.\n const eventCurrentTarget = event.currentTarget;\n\n // Wait until focus is set on the element. This is an alternative to\n // `event.preventDefault()` to avoid :focus-visible from appearing when using a pointer.\n frame.request(() => {\n setOpenWithTouchDelay(nextOpen, nativeEvent, eventCurrentTarget, pointerType);\n });\n },\n onClick(event) {\n if (eventOption === 'mousedown-only') {\n return;\n }\n const pointerType = pointerTypeRef.current;\n if (eventOption === 'mousedown' && pointerType) {\n pointerTypeRef.current = undefined;\n return;\n }\n if (isMouseLikePointerType(pointerType, true) && ignoreMouse) {\n return;\n }\n const open = store.select('open');\n const nextOpen = getNextOpen(open, event.currentTarget, openEventType => openEventType === 'click' || openEventType === 'mousedown' || openEventType === 'keydown' || openEventType === 'keyup');\n setOpenWithTouchDelay(nextOpen, event.nativeEvent, event.currentTarget, pointerType);\n },\n onKeyDown() {\n pointerTypeRef.current = undefined;\n }\n };\n }, [dataRef, eventOption, ignoreMouse, reason, store, stickIfOpen, toggle, frame, touchOpenTimeout, touchOpenDelay]);\n return React.useMemo(() => enabled ? {\n reference\n } : EMPTY_OBJECT, [enabled, reference]);\n}"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;AAcA,SAAgB,EAAS,GAAS,IAAQ,CAAC,GAAG;CAC5C,IAAM,EACJ,aAAU,IACV,OAAO,IAAc,SACrB,YAAS,IACT,iBAAc,IACd,iBAAc,IACd,oBAAiB,GACjB,YAASA,MACP,GACE,IAAQ,eAAe,IAAU,EAAQ,YAAY,GACrD,IAAU,EAAM,QAAQ,SACxB,IAAiBC,EAAM,OAAO,KAAA,CAAS,GACvC,IAAQ,EAAkB,GAC1B,IAAmB,EAAW,GAC9B,IAAYA,EAAM,cAAc;EACpC,SAAS,EAAsB,GAAU,GAAa,GAAQ,GA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,CAAW;GACrF;GACA,YAAY;IACV,EAAe,UAAU,KAAA;GAC3B;EACF;CACF,GAAG;EAAC;EAAS;EAAa;EAAa;EAAQ;EAAO;EAAa;EAAQ;EAAO;EAAkB;CAAc,CAAC;CACnH,OAAOA,EAAM,cAAc,IAAU,EACnC,aACF,IAAI,GAAc,CAAC,GAAS,CAAS,CAAC;AACxC"}
1
+ {"version":3,"file":"index245.js","names":["ownerWindow","React","REASONS.focusOut","platform.engine.webkit"],"sources":["../../../node_modules/@base-ui/react/floating-ui-react/components/FloatingFocusManager.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getNodeName, isHTMLElement } from '@floating-ui/utils/dom';\nimport { addEventListener } from '@base-ui/utils/addEventListener';\nimport { mergeCleanups } from '@base-ui/utils/mergeCleanups';\nimport { useMergedRefs } from '@base-ui/utils/useMergedRefs';\nimport { useValueAsRef } from '@base-ui/utils/useValueAsRef';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useTimeout } from '@base-ui/utils/useTimeout';\nimport { platform } from '@base-ui/utils/platform';\nimport { useAnimationFrame } from '@base-ui/utils/useAnimationFrame';\nimport { ownerDocument, ownerWindow } from '@base-ui/utils/owner';\nimport { FocusGuard } from \"../../utils/FocusGuard.mjs\";\nimport { activeElement, contains, getTarget, isTypeableCombobox, getFloatingFocusElement, isTypeableElement } from \"../utils/element.mjs\";\nimport { isVirtualClick, isVirtualPointerEvent, stopEvent } from \"../utils/event.mjs\";\nimport { tabbable, focusable, isOutsideEvent, isTabbable, getNextTabbable, getPreviousTabbable } from \"../utils/tabbable.mjs\";\nimport { getNodeAncestors, getNodeChildren } from \"../utils/nodes.mjs\";\nimport { isElementVisible } from \"../utils/composite.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { createAttribute } from \"../utils/createAttribute.mjs\";\nimport { enqueueFocus } from \"../utils/enqueueFocus.mjs\";\nimport { markOthers } from \"../utils/markOthers.mjs\";\nimport { usePortalContext } from \"./FloatingPortal.mjs\";\nimport { useFloatingTree } from \"./FloatingTree.mjs\";\nimport { CLICK_TRIGGER_IDENTIFIER } from \"../../internals/constants.mjs\";\nimport { resolveRef } from \"../../utils/resolveRef.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction getEventType(event, lastInteractionType) {\n const win = ownerWindow(getTarget(event));\n if (event instanceof win.KeyboardEvent) {\n return 'keyboard';\n }\n if (event instanceof win.FocusEvent) {\n // Focus events can be caused by a preceding pointer interaction (e.g., focusout on outside press).\n // Prefer the last known pointer type if provided, else treat as keyboard.\n return lastInteractionType || 'keyboard';\n }\n if ('pointerType' in event) {\n return event.pointerType || 'keyboard';\n }\n if ('touches' in event) {\n return 'touch';\n }\n if (event instanceof win.MouseEvent) {\n // onClick events may not contain pointer events, and will fall through to here\n return lastInteractionType || (event.detail === 0 ? 'keyboard' : 'mouse');\n }\n return '';\n}\nconst LIST_LIMIT = 20;\nlet previouslyFocusedElements = [];\nfunction clearDisconnectedPreviouslyFocusedElements() {\n previouslyFocusedElements = previouslyFocusedElements.filter(entry => {\n return entry.deref()?.isConnected;\n });\n}\nfunction addPreviouslyFocusedElement(element) {\n clearDisconnectedPreviouslyFocusedElements();\n if (element && getNodeName(element) !== 'body') {\n previouslyFocusedElements.push(new WeakRef(element));\n if (previouslyFocusedElements.length > LIST_LIMIT) {\n previouslyFocusedElements = previouslyFocusedElements.slice(-LIST_LIMIT);\n }\n }\n}\nfunction getPreviouslyFocusedElement() {\n clearDisconnectedPreviouslyFocusedElements();\n return previouslyFocusedElements[previouslyFocusedElements.length - 1]?.deref();\n}\nfunction getFirstTabbableElement(container) {\n if (!container) {\n return null;\n }\n if (isTabbable(container)) {\n return container;\n }\n return tabbable(container)[0] || container;\n}\nfunction handleTabIndex(floatingFocusElement) {\n if (floatingFocusElement.hasAttribute('tabindex') && !floatingFocusElement.hasAttribute('data-tabindex')) {\n return;\n }\n if (!floatingFocusElement.getAttribute('role')?.includes('dialog')) {\n return;\n }\n const focusableElements = focusable(floatingFocusElement);\n const tabbableContent = focusableElements.filter(element => {\n const dataTabIndex = element.getAttribute('data-tabindex') || '';\n return isTabbable(element) || element.hasAttribute('data-tabindex') && !dataTabIndex.startsWith('-');\n });\n const tabIndex = floatingFocusElement.getAttribute('tabindex');\n if (tabbableContent.length === 0) {\n if (tabIndex !== '0') {\n floatingFocusElement.setAttribute('tabindex', '0');\n // Mark our own write so the externally-managed early-return above doesn't\n // mistake it for a user-authored `tabindex` and freeze management.\n floatingFocusElement.setAttribute('data-tabindex', '0');\n }\n } else if (tabIndex !== '-1' || floatingFocusElement.hasAttribute('data-tabindex') && floatingFocusElement.getAttribute('data-tabindex') !== '-1') {\n floatingFocusElement.setAttribute('tabindex', '-1');\n floatingFocusElement.setAttribute('data-tabindex', '-1');\n }\n}\n/**\n * Provides focus management for the floating element.\n * @see https://floating-ui.com/docs/FloatingFocusManager\n * @internal\n */\nexport function FloatingFocusManager(props) {\n const {\n context,\n children,\n disabled = false,\n initialFocus = true,\n returnFocus = true,\n restoreFocus = false,\n modal = true,\n closeOnFocusOut = true,\n openInteractionType = '',\n nextFocusableElement,\n previousFocusableElement,\n beforeContentFocusGuardRef,\n externalTree,\n getInsideElements\n } = props;\n const store = 'rootStore' in context ? context.rootStore : context;\n const open = store.useState('open');\n const domReference = store.useState('domReferenceElement');\n const floating = store.useState('floatingElement');\n const {\n events,\n dataRef\n } = store.context;\n const getNodeId = useStableCallback(() => dataRef.current.floatingContext?.nodeId);\n const ignoreInitialFocus = initialFocus === false;\n // A typeable combobox reference (e.g. input/textarea) with `initialFocus={false}`\n // has different focus semantics: focus is not trapped inside the floating element,\n // so in the modal case the guards are not rendered, but `aria-hidden` is still\n // applied to the outside nodes.\n const isUntrappedTypeableCombobox = isTypeableCombobox(domReference) && ignoreInitialFocus;\n const initialFocusRef = useValueAsRef(initialFocus);\n const returnFocusRef = useValueAsRef(returnFocus);\n const openInteractionTypeRef = useValueAsRef(openInteractionType);\n const openRef = useValueAsRef(open);\n const tree = useFloatingTree(externalTree);\n const portalContext = usePortalContext();\n const preventReturnFocusRef = React.useRef(false);\n const isPointerDownRef = React.useRef(false);\n const pointerDownOutsideRef = React.useRef(false);\n const lastFocusedTabbableRef = React.useRef(null);\n const closeTypeRef = React.useRef('');\n const lastInteractionTypeRef = React.useRef('');\n const beforeGuardRef = React.useRef(null);\n const afterGuardRef = React.useRef(null);\n const mergedBeforeGuardRef = useMergedRefs(beforeGuardRef, beforeContentFocusGuardRef, portalContext?.beforeInsideRef);\n const mergedAfterGuardRef = useMergedRefs(afterGuardRef, portalContext?.afterInsideRef);\n const blurTimeout = useTimeout();\n const pointerDownTimeout = useTimeout();\n const restoreFocusFrame = useAnimationFrame();\n const isInsidePortal = portalContext != null;\n const floatingFocusElement = getFloatingFocusElement(floating);\n const getTabbableContent = useStableCallback((container = floatingFocusElement) => {\n return container ? tabbable(container) : [];\n });\n const getResolvedInsideElements = useStableCallback(() => getInsideElements?.().filter(element => element != null) ?? []);\n\n // Prevent Tab from escaping the modal when there are no tabbable elements.\n React.useEffect(() => {\n if (disabled || !modal) {\n return undefined;\n }\n function onKeyDown(event) {\n if (event.key === 'Tab') {\n // The focus guards have nothing to focus, so we need to stop the event.\n if (contains(floatingFocusElement, activeElement(ownerDocument(floatingFocusElement))) && getTabbableContent().length === 0 && !isUntrappedTypeableCombobox) {\n stopEvent(event);\n }\n }\n }\n const doc = ownerDocument(floatingFocusElement);\n return addEventListener(doc, 'keydown', onKeyDown);\n }, [disabled, floatingFocusElement, modal, isUntrappedTypeableCombobox, getTabbableContent]);\n\n // Track pointer/keyboard interactions to disambiguate focus and outside presses.\n React.useEffect(() => {\n if (disabled || !open) {\n return undefined;\n }\n const doc = ownerDocument(floatingFocusElement);\n function clearPointerDownOutside() {\n pointerDownOutsideRef.current = false;\n }\n function onPointerDown(event) {\n const target = getTarget(event);\n const insideElements = getResolvedInsideElements();\n const pointerTargetInside = contains(floating, target) || contains(domReference, target) || contains(portalContext?.portalNode, target) || insideElements.some(element => element === target || contains(element, target));\n pointerDownOutsideRef.current = !pointerTargetInside;\n lastInteractionTypeRef.current = event.pointerType || 'keyboard';\n if (target?.closest(`[${CLICK_TRIGGER_IDENTIFIER}]`)) {\n isPointerDownRef.current = true;\n // Reset on the next tick so a single click on a click-trigger doesn't\n // permanently suppress focus-out closing for the lifetime of the instance.\n pointerDownTimeout.start(0, () => {\n isPointerDownRef.current = false;\n });\n }\n }\n function onKeyDown() {\n lastInteractionTypeRef.current = 'keyboard';\n }\n return mergeCleanups(addEventListener(doc, 'pointerdown', onPointerDown, true), addEventListener(doc, 'pointerup', clearPointerDownOutside, true), addEventListener(doc, 'pointercancel', clearPointerDownOutside, true), addEventListener(doc, 'keydown', onKeyDown, true),\n // Avoid a stale `true` leaking into the next open (e.g. keep-mounted popups)\n // if the popup dismissed between pointerdown and pointerup.\n clearPointerDownOutside);\n }, [disabled, floating, domReference, floatingFocusElement, open, portalContext, pointerDownTimeout, getResolvedInsideElements]);\n\n // Close on focus out and restore focus within the floating tree when needed.\n React.useEffect(() => {\n if (disabled || !closeOnFocusOut) {\n return undefined;\n }\n const doc = ownerDocument(floatingFocusElement);\n\n // In Safari, buttons lose focus when pressing them.\n function handlePointerDown() {\n isPointerDownRef.current = true;\n pointerDownTimeout.start(0, () => {\n isPointerDownRef.current = false;\n });\n }\n function handleFocusIn(event) {\n const target = getTarget(event);\n if (isTabbable(target)) {\n lastFocusedTabbableRef.current = target;\n }\n }\n function handleFocusOutside(event) {\n const relatedTarget = event.relatedTarget;\n const currentTarget = event.currentTarget;\n const target = getTarget(event);\n\n // When focus is lost to the body (e.g. on a backdrop press), record the element that\n // had focus so a confirmation dialog opened while the body is focused can return focus\n // to it. Scoped to `modal` to avoid non-modal popups polluting the shared stack.\n if (modal && relatedTarget == null && target != null && contains(floating, target)) {\n addPreviouslyFocusedElement(target);\n }\n queueMicrotask(() => {\n const nodeId = getNodeId();\n const triggers = store.context.triggerElements;\n const insideElements = getResolvedInsideElements();\n const isRelatedFocusGuard = relatedTarget?.hasAttribute(createAttribute('focus-guard')) && [beforeGuardRef.current, afterGuardRef.current, portalContext?.beforeInsideRef.current, portalContext?.afterInsideRef.current, portalContext?.beforeOutsideRef.current, portalContext?.afterOutsideRef.current, resolveRef(previousFocusableElement), resolveRef(nextFocusableElement)].includes(relatedTarget);\n const movedToUnrelatedNode = !(contains(domReference, relatedTarget) || contains(floating, relatedTarget) || contains(relatedTarget, floating) || contains(portalContext?.portalNode, relatedTarget) || insideElements.some(element => element === relatedTarget || contains(element, relatedTarget)) || triggers.hasMatchingElement(trigger => contains(trigger, relatedTarget)) || isRelatedFocusGuard || tree && (getNodeChildren(tree.nodesRef.current, nodeId).find(node => contains(node.context?.elements.floating, relatedTarget) || contains(node.context?.elements.domReference, relatedTarget)) || getNodeAncestors(tree.nodesRef.current, nodeId).find(node => [node.context?.elements.floating, getFloatingFocusElement(node.context?.elements.floating)].includes(relatedTarget) || node.context?.elements.domReference === relatedTarget)));\n if (currentTarget === domReference && floatingFocusElement) {\n handleTabIndex(floatingFocusElement);\n }\n\n // Restore focus to the previously focused tabbable element to prevent\n // focus from being lost outside the floating tree.\n if (restoreFocus && currentTarget !== domReference && !isElementVisible(target) && activeElement(doc) === doc.body) {\n // Let `FloatingPortal` effect knows that focus is still inside the\n // floating tree.\n if (isHTMLElement(floatingFocusElement)) {\n floatingFocusElement.focus();\n // If explicitly requested to restore focus to the popup container, do not search\n // for the next/previous tabbable element.\n if (restoreFocus === 'popup') {\n // If the focused element is removed on pointerdown, the browser\n // tries to move focus to it right after the `.focus()` call above,\n // but because it's removed in the same tick, focus is lost instead.\n // Re-focusing asynchronously (next frame) wins that race.\n restoreFocusFrame.request(() => {\n floatingFocusElement.focus();\n });\n return;\n }\n }\n const tabbableContent = getTabbableContent();\n const prevTabbable = lastFocusedTabbableRef.current;\n const nodeToFocus = (prevTabbable && tabbableContent.includes(prevTabbable) ? prevTabbable : null) || tabbableContent[tabbableContent.length - 1] || floatingFocusElement;\n if (isHTMLElement(nodeToFocus)) {\n nodeToFocus.focus();\n }\n }\n\n // https://github.com/floating-ui/floating-ui/issues/3060\n if (dataRef.current.insideReactTree) {\n dataRef.current.insideReactTree = false;\n return;\n }\n\n // Focus did not move inside the floating tree, and there are no tabbable\n // portal guards to handle closing.\n if ((isUntrappedTypeableCombobox ? true : !modal) && relatedTarget && movedToUnrelatedNode && !isPointerDownRef.current && (\n // Fix React 18 Strict Mode returnFocus due to double rendering.\n // For an \"untrapped\" typeable combobox (input role=combobox with\n // initialFocus=false), re-opening the popup and tabbing out should still close it even\n // when the previously focused element (e.g. the next tabbable outside the popup) is\n // focused again. Otherwise, the popup remains open on the second Tab sequence:\n // click input -> Tab (closes) -> click input -> Tab.\n // Allow closing when `isUntrappedTypeableCombobox` regardless of the previously focused element.\n isUntrappedTypeableCombobox || relatedTarget !== getPreviouslyFocusedElement())) {\n preventReturnFocusRef.current = true;\n store.setOpen(false, createChangeEventDetails(REASONS.focusOut, event));\n }\n });\n }\n function markInsideReactTree() {\n if (pointerDownOutsideRef.current) {\n return;\n }\n dataRef.current.insideReactTree = true;\n blurTimeout.start(0, () => {\n dataRef.current.insideReactTree = false;\n });\n }\n const domReferenceElement = isHTMLElement(domReference) ? domReference : null;\n if (!floating && !domReferenceElement) {\n return undefined;\n }\n return mergeCleanups(domReferenceElement && addEventListener(domReferenceElement, 'focusout', handleFocusOutside), domReferenceElement && addEventListener(domReferenceElement, 'pointerdown', handlePointerDown), floating && addEventListener(floating, 'focusin', handleFocusIn), floating && addEventListener(floating, 'focusout', handleFocusOutside), floating && portalContext && addEventListener(floating, 'focusout', markInsideReactTree, true));\n }, [disabled, domReference, floating, floatingFocusElement, modal, tree, portalContext, store, closeOnFocusOut, restoreFocus, getTabbableContent, isUntrappedTypeableCombobox, getNodeId, dataRef, blurTimeout, pointerDownTimeout, restoreFocusFrame, nextFocusableElement, previousFocusableElement, getResolvedInsideElements]);\n\n // Hide everything outside the floating tree from assistive tech while open.\n React.useEffect(() => {\n if (disabled || !floating || !open) {\n return undefined;\n }\n\n // Don't hide portals nested within the parent portal.\n const portalNodes = Array.from(portalContext?.portalNode?.querySelectorAll(`[${createAttribute('portal')}]`) || []);\n const ancestors = tree ? getNodeAncestors(tree.nodesRef.current, getNodeId()) : [];\n const rootAncestorComboboxDomReference = ancestors.find(node => isTypeableCombobox(node.context?.elements.domReference || null))?.context?.elements.domReference;\n const controlInsideElements = [floating, ...portalNodes, beforeGuardRef.current, afterGuardRef.current, portalContext?.beforeOutsideRef.current, portalContext?.afterOutsideRef.current, ...getResolvedInsideElements()];\n const insideElements = [...controlInsideElements, rootAncestorComboboxDomReference, resolveRef(previousFocusableElement), resolveRef(nextFocusableElement), isUntrappedTypeableCombobox ? domReference : null].filter(x => x != null);\n const ariaHiddenCleanup = markOthers(insideElements, {\n ariaHidden: modal || isUntrappedTypeableCombobox,\n mark: false\n });\n const markerInsideElements = [floating, ...portalNodes].filter(x => x != null);\n const markerCleanup = markOthers(markerInsideElements);\n return () => {\n markerCleanup();\n ariaHiddenCleanup();\n };\n }, [open, disabled, domReference, floating, modal, portalContext, isUntrappedTypeableCombobox, tree, getNodeId, nextFocusableElement, previousFocusableElement, getResolvedInsideElements]);\n\n // Focus the initial element when the floating element opens.\n useIsoLayoutEffect(() => {\n if (!open || disabled || !isHTMLElement(floatingFocusElement)) {\n return;\n }\n closeTypeRef.current = '';\n lastInteractionTypeRef.current = '';\n const doc = ownerDocument(floatingFocusElement);\n const previouslyFocusedElement = activeElement(doc);\n\n // Wait for any layout effect state setters to execute to set `tabIndex`.\n queueMicrotask(() => {\n const initialFocusValueOrFn = initialFocusRef.current;\n const resolvedInitialFocus = typeof initialFocusValueOrFn === 'function' ? initialFocusValueOrFn(openInteractionTypeRef.current || '') : initialFocusValueOrFn;\n\n // `null` should fallback to default behavior in case of an empty ref.\n if (resolvedInitialFocus === undefined || resolvedInitialFocus === false) {\n return;\n }\n const focusAlreadyInsideFloatingEl = contains(floatingFocusElement, previouslyFocusedElement);\n if (focusAlreadyInsideFloatingEl) {\n return;\n }\n let focusableElements = null;\n const getDefaultFocusElement = () => {\n if (focusableElements == null) {\n focusableElements = getTabbableContent(floatingFocusElement);\n }\n return focusableElements[0] || floatingFocusElement;\n };\n let elToFocus;\n if (resolvedInitialFocus === true || resolvedInitialFocus === null) {\n elToFocus = getDefaultFocusElement();\n } else {\n elToFocus = resolveRef(resolvedInitialFocus);\n }\n elToFocus = elToFocus || getDefaultFocusElement();\n const hadFocusInside = contains(floatingFocusElement, activeElement(doc));\n\n // enqueueFocus returns a rAF-cancel function; we intentionally don't cancel this focus.\n void enqueueFocus(elToFocus, {\n preventScroll: elToFocus === floatingFocusElement,\n shouldFocus() {\n // This focus is queued on the next animation frame. If the floating element has closed\n // before it runs — e.g. tabbing out of a kept-mounted popup — don't pull focus back\n // onto the initial element after it has legitimately moved elsewhere.\n if (!openRef.current) {\n return false;\n }\n if (hadFocusInside) {\n return true;\n }\n const currentActiveElement = activeElement(doc);\n const focusMovedInside = currentActiveElement !== elToFocus && contains(floatingFocusElement, currentActiveElement);\n return !focusMovedInside;\n }\n });\n });\n }, [disabled, open, floatingFocusElement, getTabbableContent, initialFocusRef, openInteractionTypeRef, openRef]);\n\n // Track return focus targets and restore focus on unmount/close.\n useIsoLayoutEffect(() => {\n if (disabled || !floatingFocusElement) {\n return undefined;\n }\n const doc = ownerDocument(floatingFocusElement);\n const elementFocusedBeforeOpen = activeElement(doc);\n // Only an explicit `null` interaction type represents a programmatic open.\n // `undefined` is normalized to `''` by the prop default, so it never reaches\n // here as nullish and is intentionally not treated as programmatic.\n const preferPreviousFocus = openInteractionTypeRef.current == null;\n addPreviouslyFocusedElement(elementFocusedBeforeOpen);\n function onOpenChangeLocal(details) {\n if (!details.open) {\n closeTypeRef.current = getEventType(details.nativeEvent, lastInteractionTypeRef.current);\n }\n if (details.reason === REASONS.triggerHover && details.nativeEvent.type === 'mouseleave') {\n preventReturnFocusRef.current = true;\n }\n if (details.reason !== REASONS.outsidePress) {\n return;\n }\n if (details.nested) {\n preventReturnFocusRef.current = false;\n } else if (isVirtualClick(details.nativeEvent) || isVirtualPointerEvent(details.nativeEvent)) {\n preventReturnFocusRef.current = false;\n } else {\n // On outside press, only return focus to the reference when the browser supports the\n // `focus({ preventScroll })` option; without it, restoring focus scrolls the page.\n // Chrome on Android and Samsung Internet still don't support `preventScroll`\n // (https://issues.chromium.org/issues/41453122), so the runtime check keeps return\n // focus disabled there to avoid the scroll jump.\n let isPreventScrollSupported = false;\n ownerDocument(floatingFocusElement).createElement('div').focus({\n get preventScroll() {\n isPreventScrollSupported = true;\n return false;\n }\n });\n if (isPreventScrollSupported) {\n preventReturnFocusRef.current = false;\n } else {\n preventReturnFocusRef.current = true;\n }\n }\n }\n events.on('openchange', onOpenChangeLocal);\n function getReturnElement(closeType) {\n const returnFocusValueOrFn = returnFocusRef.current;\n let resolvedReturnFocusValue = typeof returnFocusValueOrFn === 'function' ? returnFocusValueOrFn(closeType) : returnFocusValueOrFn;\n\n // `null` should fallback to default behavior in case of an empty ref.\n if (resolvedReturnFocusValue === undefined || resolvedReturnFocusValue === false) {\n return null;\n }\n if (resolvedReturnFocusValue === null) {\n resolvedReturnFocusValue = true;\n }\n const referenceReturnElement = domReference?.isConnected ? domReference : null;\n const previousReturnElement = elementFocusedBeforeOpen?.isConnected && getNodeName(elementFocusedBeforeOpen) !== 'body' ? elementFocusedBeforeOpen : null;\n let defaultReturnElement = preferPreviousFocus ? previousReturnElement || referenceReturnElement : referenceReturnElement || previousReturnElement;\n if (!defaultReturnElement) {\n defaultReturnElement = getPreviouslyFocusedElement() || null;\n }\n if (typeof resolvedReturnFocusValue === 'boolean') {\n return defaultReturnElement;\n }\n return resolveRef(resolvedReturnFocusValue) || defaultReturnElement || null;\n }\n return () => {\n events.off('openchange', onOpenChangeLocal);\n const activeEl = activeElement(doc);\n const insideElements = getResolvedInsideElements();\n const isFocusInsideFloatingTree = contains(floating, activeEl) || insideElements.some(element => element === activeEl || contains(element, activeEl)) || tree && getNodeChildren(tree.nodesRef.current, getNodeId(), false).some(node => contains(node.context?.elements.floating, activeEl));\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const returnFocusValueOrFn = returnFocusRef.current;\n const closeType = closeTypeRef.current;\n const returnElement = getReturnElement(closeType);\n queueMicrotask(() => {\n // `returnElement` if it is tabbable, otherwise its first tabbable child,\n // otherwise `returnElement` itself (which may not be tabbable at all).\n const tabbableReturnElement = getFirstTabbableElement(returnElement);\n const hasExplicitReturnFocus = typeof returnFocusValueOrFn !== 'boolean';\n if (returnFocusValueOrFn && !preventReturnFocusRef.current && isHTMLElement(tabbableReturnElement) && (\n // If the focus moved somewhere else after mount, avoid returning focus\n // since it likely entered a different element which should be\n // respected: https://github.com/floating-ui/floating-ui/issues/2607\n !hasExplicitReturnFocus && tabbableReturnElement !== activeEl && activeEl !== doc.body ? isFocusInsideFloatingTree : true)) {\n const focusOptions = {\n preventScroll: true\n };\n if (closeType === 'keyboard') {\n focusOptions.focusVisible = true;\n }\n tabbableReturnElement.focus(focusOptions);\n }\n preventReturnFocusRef.current = false;\n });\n };\n }, [disabled, floating, floatingFocusElement, returnFocusRef, openInteractionTypeRef, events, tree, domReference, getNodeId, getResolvedInsideElements]);\n\n // Safari may randomly scroll to the bottom of the page if an input inside a popup has focus\n // when the popup unmounts from the DOM.\n // By blurring it before the popup unmounts, we can prevent this behavior.\n useIsoLayoutEffect(() => {\n if (!platform.engine.webkit || open || !floating) {\n return;\n }\n const activeEl = activeElement(ownerDocument(floating));\n if (!isHTMLElement(activeEl) || !isTypeableElement(activeEl)) {\n return;\n }\n if (contains(floating, activeEl)) {\n activeEl.blur();\n }\n }, [open, floating]);\n\n // Synchronize the focus manager state (modal, closeOnFocusOut, open, etc.) to the\n // FloatingPortal context, which uses it to decide whether to render its own guards.\n useIsoLayoutEffect(() => {\n if (disabled || !portalContext) {\n return undefined;\n }\n portalContext.setFocusManagerState({\n modal,\n closeOnFocusOut,\n open,\n onOpenChange: store.setOpen,\n domReference\n });\n return () => {\n portalContext.setFocusManagerState(null);\n };\n }, [disabled, portalContext, modal, open, store, closeOnFocusOut, domReference]);\n\n // Keep the floating element tabIndex in sync and clear stale focus records.\n useIsoLayoutEffect(() => {\n if (disabled || !floatingFocusElement) {\n return undefined;\n }\n handleTabIndex(floatingFocusElement);\n return () => {\n queueMicrotask(clearDisconnectedPreviouslyFocusedElements);\n };\n }, [disabled, floatingFocusElement]);\n const shouldRenderGuards = !disabled && (modal ? !isUntrappedTypeableCombobox : true) && (isInsidePortal || modal);\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [shouldRenderGuards && /*#__PURE__*/_jsx(FocusGuard, {\n \"data-type\": \"inside\",\n ref: mergedBeforeGuardRef,\n onFocus: event => {\n if (modal) {\n const els = getTabbableContent();\n // enqueueFocus returns a rAF-cancel function we don't need here.\n void enqueueFocus(els[els.length - 1]);\n } else if (portalContext?.portalNode) {\n preventReturnFocusRef.current = false;\n if (isOutsideEvent(event, portalContext.portalNode)) {\n const nextTabbable = getNextTabbable(domReference);\n nextTabbable?.focus();\n } else {\n resolveRef(previousFocusableElement ?? portalContext.beforeOutsideRef)?.focus();\n }\n }\n }\n }), children, shouldRenderGuards && /*#__PURE__*/_jsx(FocusGuard, {\n \"data-type\": \"inside\",\n ref: mergedAfterGuardRef,\n onFocus: event => {\n if (modal) {\n // enqueueFocus returns a rAF-cancel function we don't need here.\n void enqueueFocus(getTabbableContent()[0]);\n } else if (portalContext?.portalNode) {\n if (closeOnFocusOut) {\n preventReturnFocusRef.current = true;\n }\n if (isOutsideEvent(event, portalContext.portalNode)) {\n const prevTabbable = getPreviousTabbable(domReference);\n prevTabbable?.focus();\n } else {\n resolveRef(nextFocusableElement ?? portalContext.afterOutsideRef)?.focus();\n }\n }\n }\n })]\n });\n}"],"x_google_ignoreList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