@rpcbase/ui 0.279.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
package/dist/index261.js CHANGED
@@ -1,46 +1,100 @@
1
- import { useStore as e } from "./index260.js";
2
- //#region ../../node_modules/@base-ui/utils/store/Store.mjs
3
- var t = class {
4
- constructor(e) {
5
- this.state = e, this.listeners = /* @__PURE__ */ new Set(), this.updateTick = 0;
6
- }
7
- subscribe = (e) => (this.listeners.add(e), () => {
8
- this.listeners.delete(e);
9
- });
10
- getSnapshot = () => this.state;
11
- setState(e) {
12
- if (this.state === e) return;
13
- this.state = e, this.updateTick += 1;
14
- let t = this.updateTick;
15
- for (let n of this.listeners) {
16
- if (t !== this.updateTick) return;
17
- n(e);
1
+ "use client";
2
+ import { NOOP as e } from "./index191.js";
3
+ import { useStableCallback as t } from "./index202.js";
4
+ import { useIsoLayoutEffect as n } from "./index204.js";
5
+ import { useStore as r } from "./index259.js";
6
+ import { Store as i } from "./index260.js";
7
+ import * as a from "react";
8
+ //#region ../../node_modules/@base-ui/utils/store/ReactStore.mjs
9
+ var o = class extends i {
10
+ constructor(e, t = {}, n) {
11
+ super(e), this.context = t, this.selectors = n;
12
+ }
13
+ useSyncedValue(e, t) {
14
+ a.useDebugValue(e);
15
+ let r = this;
16
+ n(() => {
17
+ r.state[e] !== t && r.set(e, t);
18
+ }, [
19
+ r,
20
+ e,
21
+ t
22
+ ]);
23
+ }
24
+ useSyncedValueWithCleanup(e, t) {
25
+ let r = this;
26
+ n(() => (r.state[e] !== t && r.set(e, t), () => {
27
+ r.set(e, void 0);
28
+ }), [
29
+ r,
30
+ e,
31
+ t
32
+ ]);
33
+ }
34
+ useSyncedValues(e) {
35
+ let t = this;
36
+ if (process.env.NODE_ENV !== "production") {
37
+ a.useDebugValue(e, (e) => Object.keys(e));
38
+ let t = a.useRef(Object.keys(e)).current, n = Object.keys(e);
39
+ (t.length !== n.length || t.some((e, t) => e !== n[t])) && console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.");
18
40
  }
41
+ let r = Object.values(e);
42
+ n(() => {
43
+ t.update(e);
44
+ }, [t, ...r]);
19
45
  }
20
- update(e) {
21
- for (let t in e) if (!Object.is(this.state[t], e[t])) {
22
- this.setState({
23
- ...this.state,
24
- ...e
46
+ useControlledProp(e, t) {
47
+ a.useDebugValue(e);
48
+ let r = this, i = t !== void 0;
49
+ if (n(() => {
50
+ i && !Object.is(r.state[e], t) && r.setState({
51
+ ...r.state,
52
+ [e]: t
25
53
  });
26
- return;
54
+ }, [
55
+ r,
56
+ e,
57
+ t,
58
+ i
59
+ ]), process.env.NODE_ENV !== "production") {
60
+ let t = this.controlledValues ??= /* @__PURE__ */ new Map();
61
+ t.has(e) || t.set(e, i);
62
+ let n = t.get(e);
63
+ n !== void 0 && n !== i && console.error(`A component is changing the ${i ? "" : "un"}controlled state of ${e.toString()} to be ${i ? "un" : ""}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`);
27
64
  }
28
65
  }
29
- set(e, t) {
30
- Object.is(this.state[e], t) || this.setState({
31
- ...this.state,
32
- [e]: t
33
- });
66
+ select(e, t, n, r) {
67
+ let i = this.selectors[e];
68
+ return i(this.state, t, n, r);
34
69
  }
35
- notifyAll() {
36
- let e = { ...this.state };
37
- this.setState(e);
70
+ useState(e, t, n, i) {
71
+ return a.useDebugValue(e), r(this, this.selectors[e], t, n, i);
38
72
  }
39
- use(t, n, r, i) {
40
- return e(this, t, n, r, i);
73
+ useContextCallback(n, r) {
74
+ a.useDebugValue(n);
75
+ let i = t(r ?? e);
76
+ this.context[n] = i;
77
+ }
78
+ useStateSetter(e) {
79
+ let t = a.useRef(void 0);
80
+ return t.current === void 0 && (t.current = (t) => {
81
+ this.set(e, t);
82
+ }), t.current;
83
+ }
84
+ observe(e, t) {
85
+ let n;
86
+ n = typeof e == "function" ? e : this.selectors[e];
87
+ let r = n(this.state);
88
+ return t(r, r, this), this.subscribe((e) => {
89
+ let i = n(e);
90
+ if (!Object.is(r, i)) {
91
+ let e = r;
92
+ r = i, t(i, e, this);
93
+ }
94
+ });
41
95
  }
42
96
  };
43
97
  //#endregion
44
- export { t as Store };
98
+ export { o as ReactStore };
45
99
 
46
100
  //# sourceMappingURL=index261.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index261.js","names":[],"sources":["../../../node_modules/@base-ui/utils/store/Store.mjs"],"sourcesContent":["import { useStore } from \"./useStore.mjs\";\n/**\n * A data store implementation that allows subscribing to state changes and updating the state.\n * It uses an observer pattern to notify subscribers when the state changes.\n */\nexport class Store {\n /**\n * The current state of the store.\n * This property is updated immediately when the state changes as a result of calling {@link setState}, {@link update}, or {@link set}.\n * To subscribe to state changes, use the {@link useState} method. The value returned by {@link useState} is updated after the component renders (similarly to React's useState).\n * The values can be used directly (to avoid subscribing to the store) in effects or event handlers.\n *\n * Do not modify properties in state directly. Instead, use the provided methods to ensure proper state management and listener notification.\n */\n\n // Internal state to handle recursive `setState()` calls\n\n constructor(state) {\n this.state = state;\n this.listeners = new Set();\n this.updateTick = 0;\n }\n\n /**\n * Registers a listener that will be called whenever the store's state changes.\n *\n * @param fn The listener function to be called on state changes.\n * @returns A function to unsubscribe the listener.\n */\n subscribe = fn => {\n this.listeners.add(fn);\n return () => {\n this.listeners.delete(fn);\n };\n };\n\n /**\n * Returns the current state of the store.\n */\n getSnapshot = () => {\n return this.state;\n };\n\n /**\n * Updates the entire store's state and notifies all registered listeners.\n *\n * @param newState The new state to set for the store.\n */\n setState(newState) {\n if (this.state === newState) {\n return;\n }\n this.state = newState;\n this.updateTick += 1;\n const currentTick = this.updateTick;\n for (const listener of this.listeners) {\n if (currentTick !== this.updateTick) {\n // If the tick has changed, a recursive `setState` call has been made,\n // and it has already notified all listeners.\n return;\n }\n listener(newState);\n }\n }\n\n /**\n * Merges the provided changes into the current state and notifies listeners if there are changes.\n *\n * @param changes An object containing the changes to apply to the current state.\n */\n update(changes) {\n for (const key in changes) {\n if (!Object.is(this.state[key], changes[key])) {\n this.setState({\n ...this.state,\n ...changes\n });\n return;\n }\n }\n }\n\n /**\n * Sets a specific key in the store's state to a new value and notifies listeners if the value has changed.\n *\n * @param key The key in the store's state to update.\n * @param value The new value to set for the specified key.\n */\n set(key, value) {\n if (!Object.is(this.state[key], value)) {\n this.setState({\n ...this.state,\n [key]: value\n });\n }\n }\n\n /**\n * Gives the state a new reference and updates all registered listeners.\n */\n notifyAll() {\n const newState = {\n ...this.state\n };\n this.setState(newState);\n }\n use(selector, a1, a2, a3) {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n return useStore(this, selector, a1, a2, a3);\n }\n}"],"x_google_ignoreList":[0],"mappings":";;AAKA,IAAa,IAAb,MAAmB;CAYjB,YAAY,GAAO;EAGjB,AAFA,KAAK,QAAQ,GACb,KAAK,4BAAY,IAAI,IAAI,GACzB,KAAK,aAAa;CACpB;CAQA,aAAY,OACV,KAAK,UAAU,IAAI,CAAE,SACR;EACX,KAAK,UAAU,OAAO,CAAE;CAC1B;CAMF,oBACS,KAAK;CAQd,SAAS,GAAU;EACjB,IAAI,KAAK,UAAU,GACjB;EAGF,AADA,KAAK,QAAQ,GACb,KAAK,cAAc;EACnB,IAAM,IAAc,KAAK;EACzB,KAAK,IAAM,KAAY,KAAK,WAAW;GACrC,IAAI,MAAgB,KAAK,YAGvB;GAEF,EAAS,CAAQ;EACnB;CACF;CAOA,OAAO,GAAS;EACd,KAAK,IAAM,KAAO,GAChB,IAAI,CAAC,OAAO,GAAG,KAAK,MAAM,IAAM,EAAQ,EAAI,GAAG;GAC7C,KAAK,SAAS;IACZ,GAAG,KAAK;IACR,GAAG;GACL,CAAC;GACD;EACF;CAEJ;CAQA,IAAI,GAAK,GAAO;EACd,AAAK,OAAO,GAAG,KAAK,MAAM,IAAM,CAAK,KACnC,KAAK,SAAS;GACZ,GAAG,KAAK;IACP,IAAM;EACT,CAAC;CAEL;CAKA,YAAY;EACV,IAAM,IAAW,EACf,GAAG,KAAK,MACV;EACA,KAAK,SAAS,CAAQ;CACxB;CACA,IAAI,GAAU,GAAI,GAAI,GAAI;EAExB,OAAO,EAAS,MAAM,GAAU,GAAI,GAAI,CAAE;CAC5C;AACF"}
1
+ {"version":3,"file":"index261.js","names":["React"],"sources":["../../../node_modules/@base-ui/utils/store/ReactStore.mjs"],"sourcesContent":["/* False positives - ESLint thinks we're calling a hook from a class component. */\n/* eslint-disable react-hooks/rules-of-hooks */\n'use client';\n\nimport * as React from 'react';\nimport { Store } from \"./Store.mjs\";\nimport { useStore } from \"./useStore.mjs\";\nimport { useStableCallback } from \"../useStableCallback.mjs\";\nimport { useIsoLayoutEffect } from \"../useIsoLayoutEffect.mjs\";\nimport { NOOP } from \"../empty.mjs\";\n\n/**\n * A Store that supports controlled state keys, non-reactive values and provides utility methods for React.\n */\nexport class ReactStore extends Store {\n /**\n * Creates a new ReactStore instance.\n *\n * @param state Initial state of the store.\n * @param context Non-reactive context values.\n * @param selectors Optional selectors for use with `useState`.\n */\n constructor(state, context = {}, selectors) {\n super(state);\n this.context = context;\n this.selectors = selectors;\n }\n\n /**\n * Non-reactive values such as refs, callbacks, etc.\n */\n\n /**\n * Synchronizes a single external value into the store.\n *\n * Note that the while the value in `state` is updated immediately, the value returned\n * by `useState` is updated before the next render (similarly to React's `useState`).\n */\n useSyncedValue(key, value) {\n React.useDebugValue(key);\n // eslint-disable-next-line consistent-this\n const store = this;\n useIsoLayoutEffect(() => {\n if (store.state[key] !== value) {\n store.set(key, value);\n }\n }, [store, key, value]);\n }\n\n /**\n * Synchronizes a single external value into the store and\n * cleans it up (sets to `undefined`) on unmount.\n *\n * Note that the while the value in `state` is updated immediately, the value returned\n * by `useState` is updated before the next render (similarly to React's `useState`).\n */\n useSyncedValueWithCleanup(key, value) {\n // eslint-disable-next-line consistent-this\n const store = this;\n useIsoLayoutEffect(() => {\n if (store.state[key] !== value) {\n store.set(key, value);\n }\n return () => {\n store.set(key, undefined);\n };\n }, [store, key, value]);\n }\n\n /**\n * Synchronizes multiple external values into the store.\n *\n * Note that the while the values in `state` are updated immediately, the values returned\n * by `useState` are updated before the next render (similarly to React's `useState`).\n */\n useSyncedValues(statePart) {\n // eslint-disable-next-line consistent-this\n const store = this;\n if (process.env.NODE_ENV !== 'production') {\n // Check that an object with the same shape is passed on every render\n React.useDebugValue(statePart, p => Object.keys(p));\n const keys = React.useRef(Object.keys(statePart)).current;\n const nextKeys = Object.keys(statePart);\n if (keys.length !== nextKeys.length || keys.some((key, index) => key !== nextKeys[index])) {\n console.error('ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.');\n }\n }\n const dependencies = Object.values(statePart);\n useIsoLayoutEffect(() => {\n store.update(statePart);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [store, ...dependencies]);\n }\n\n /**\n * Registers a controllable prop pair (`controlled`, `defaultValue`) for a specific key. If `controlled`\n * is non-undefined, the store's state at `key` is updated to match `controlled`.\n */\n useControlledProp(key, controlled) {\n React.useDebugValue(key);\n // eslint-disable-next-line consistent-this\n const store = this;\n const isControlled = controlled !== undefined;\n useIsoLayoutEffect(() => {\n if (isControlled && !Object.is(store.state[key], controlled)) {\n // Set the internal state to match the controlled value.\n store.setState({\n ...store.state,\n [key]: controlled\n });\n }\n }, [store, key, controlled, isControlled]);\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line\n const cache = this.controlledValues ??= new Map();\n if (!cache.has(key)) {\n cache.set(key, isControlled);\n }\n const previouslyControlled = cache.get(key);\n if (previouslyControlled !== undefined && previouslyControlled !== isControlled) {\n console.error(`A component is changing the ${isControlled ? '' : 'un'}controlled state of ${key.toString()} to be ${isControlled ? 'un' : ''}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`);\n }\n }\n }\n\n /** Gets the current value from the store using a selector with the provided key.\n *\n * @param key Key of the selector to use.\n */\n\n select(key, a1, a2, a3) {\n const selector = this.selectors[key];\n return selector(this.state, a1, a2, a3);\n }\n\n /**\n * Returns a value from the store's state using a selector function.\n * Used to subscribe to specific parts of the state.\n * This methods causes a rerender whenever the selected state changes.\n *\n * @param key Key of the selector to use.\n */\n\n useState(key, a1, a2, a3) {\n React.useDebugValue(key);\n return useStore(this, this.selectors[key], a1, a2, a3);\n }\n\n /**\n * Wraps a function with `useStableCallback` to ensure it has a stable reference\n * and assigns it to the context.\n *\n * @param key Key of the event callback. Must be a function in the context.\n * @param fn Function to assign.\n */\n useContextCallback(key, fn) {\n React.useDebugValue(key);\n const stableFunction = useStableCallback(fn ?? NOOP);\n this.context[key] = stableFunction;\n }\n\n /**\n * Returns a stable setter function for a specific key in the store's state.\n * It's commonly used to pass as a ref callback to React elements.\n *\n * @param key Key of the state to set.\n */\n useStateSetter(key) {\n const ref = React.useRef(undefined);\n if (ref.current === undefined) {\n ref.current = value => {\n this.set(key, value);\n };\n }\n return ref.current;\n }\n\n /**\n * Observes changes derived from the store's selectors and calls the listener when the selected value changes.\n *\n * @param key Key of the selector to observe.\n * @param listener Listener function called when the selector result changes.\n */\n\n observe(selector, listener) {\n let selectFn;\n if (typeof selector === 'function') {\n selectFn = selector;\n } else {\n selectFn = this.selectors[selector];\n }\n let prevValue = selectFn(this.state);\n listener(prevValue, prevValue, this);\n return this.subscribe(nextState => {\n const nextValue = selectFn(nextState);\n if (!Object.is(prevValue, nextValue)) {\n const oldValue = prevValue;\n prevValue = nextValue;\n listener(nextValue, oldValue, this);\n }\n });\n }\n}"],"x_google_ignoreList":[0],"mappings":"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"}
package/dist/index262.js CHANGED
@@ -1,99 +1,52 @@
1
- "use client";
2
- import { NOOP as e } from "./index191.js";
3
- import { useStableCallback as t } from "./index202.js";
4
- import { useIsoLayoutEffect as n } from "./index204.js";
5
- import { useStore as r } from "./index260.js";
6
- import { Store as i } from "./index261.js";
7
- import * as a from "react";
8
- //#region ../../node_modules/@base-ui/utils/store/ReactStore.mjs
9
- var o = class extends i {
10
- constructor(e, t = {}, n) {
11
- super(e), this.context = t, this.selectors = n;
12
- }
13
- useSyncedValue(e, t) {
14
- a.useDebugValue(e);
15
- let r = this;
16
- n(() => {
17
- r.state[e] !== t && r.set(e, t);
18
- }, [
19
- r,
20
- e,
21
- t
22
- ]);
23
- }
24
- useSyncedValueWithCleanup(e, t) {
25
- let r = this;
26
- n(() => (r.state[e] !== t && r.set(e, t), () => {
27
- r.set(e, void 0);
28
- }), [
29
- r,
30
- e,
31
- t
32
- ]);
33
- }
34
- useSyncedValues(e) {
35
- let t = this;
36
- if (process.env.NODE_ENV !== "production") {
37
- a.useDebugValue(e, (e) => Object.keys(e));
38
- let t = a.useRef(Object.keys(e)).current, n = Object.keys(e);
39
- (t.length !== n.length || t.some((e, t) => e !== n[t])) && console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.");
1
+ import { isClickLikeEvent as e } from "./index223.js";
2
+ import { createEventEmitter as t } from "./index242.js";
3
+ import { ReactStore as n } from "./index261.js";
4
+ //#region ../../node_modules/@base-ui/react/floating-ui-react/components/FloatingRootStore.mjs
5
+ var r = {
6
+ open: (e) => e.open,
7
+ transitionStatus: (e) => e.transitionStatus,
8
+ domReferenceElement: (e) => e.domReferenceElement,
9
+ referenceElement: (e) => e.positionReference ?? e.referenceElement,
10
+ floatingElement: (e) => e.floatingElement,
11
+ floatingId: (e) => e.floatingId
12
+ }, i = class extends n {
13
+ constructor(e) {
14
+ let { syncOnly: n, nested: i, onOpenChange: a, triggerElements: o, ...s } = e;
15
+ super({
16
+ ...s,
17
+ positionReference: s.referenceElement,
18
+ domReferenceElement: s.referenceElement
19
+ }, {
20
+ onOpenChange: a,
21
+ dataRef: { current: {} },
22
+ events: t(),
23
+ nested: i,
24
+ triggerElements: o
25
+ }, r), this.syncOnly = n;
26
+ }
27
+ syncOpenEvent = (t, n) => {
28
+ (!t || !this.state.open || n != null && e(n)) && (this.context.dataRef.current.openEvent = t ? n : void 0);
29
+ };
30
+ dispatchOpenChange = (e, t) => {
31
+ this.syncOpenEvent(e, t.event);
32
+ let n = {
33
+ open: e,
34
+ reason: t.reason,
35
+ nativeEvent: t.event,
36
+ nested: this.context.nested,
37
+ triggerElement: t.trigger
38
+ };
39
+ this.context.events.emit("openchange", n);
40
+ };
41
+ setOpen = (e, t) => {
42
+ if (this.syncOnly) {
43
+ this.context.onOpenChange?.(e, t);
44
+ return;
40
45
  }
41
- n(() => {
42
- t.update(e);
43
- }, [t, ...Object.values(e)]);
44
- }
45
- useControlledProp(e, t) {
46
- a.useDebugValue(e);
47
- let r = this, i = t !== void 0;
48
- if (n(() => {
49
- i && !Object.is(r.state[e], t) && r.setState({
50
- ...r.state,
51
- [e]: t
52
- });
53
- }, [
54
- r,
55
- e,
56
- t,
57
- i
58
- ]), process.env.NODE_ENV !== "production") {
59
- let t = this.controlledValues ??= /* @__PURE__ */ new Map();
60
- t.has(e) || t.set(e, i);
61
- let n = t.get(e);
62
- n !== void 0 && n !== i && console.error(`A component is changing the ${i ? "" : "un"}controlled state of ${e.toString()} to be ${i ? "un" : ""}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`);
63
- }
64
- }
65
- select(e, t, n, r) {
66
- let i = this.selectors[e];
67
- return i(this.state, t, n, r);
68
- }
69
- useState(e, t, n, i) {
70
- return a.useDebugValue(e), r(this, this.selectors[e], t, n, i);
71
- }
72
- useContextCallback(n, r) {
73
- a.useDebugValue(n);
74
- let i = t(r ?? e);
75
- this.context[n] = i;
76
- }
77
- useStateSetter(e) {
78
- let t = a.useRef(void 0);
79
- return t.current === void 0 && (t.current = (t) => {
80
- this.set(e, t);
81
- }), t.current;
82
- }
83
- observe(e, t) {
84
- let n;
85
- n = typeof e == "function" ? e : this.selectors[e];
86
- let r = n(this.state);
87
- return t(r, r, this), this.subscribe((e) => {
88
- let i = n(e);
89
- if (!Object.is(r, i)) {
90
- let e = r;
91
- r = i, t(i, e, this);
92
- }
93
- });
94
- }
46
+ this.dispatchOpenChange(e, t), this.context.onOpenChange?.(e, t);
47
+ };
95
48
  };
96
49
  //#endregion
97
- export { o as ReactStore };
50
+ export { i as FloatingRootStore };
98
51
 
99
52
  //# sourceMappingURL=index262.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index262.js","names":["React"],"sources":["../../../node_modules/@base-ui/utils/store/ReactStore.mjs"],"sourcesContent":["/* False positives - ESLint thinks we're calling a hook from a class component. */\n/* eslint-disable react-hooks/rules-of-hooks */\n'use client';\n\nimport * as React from 'react';\nimport { Store } from \"./Store.mjs\";\nimport { useStore } from \"./useStore.mjs\";\nimport { useStableCallback } from \"../useStableCallback.mjs\";\nimport { useIsoLayoutEffect } from \"../useIsoLayoutEffect.mjs\";\nimport { NOOP } from \"../empty.mjs\";\n\n/**\n * A Store that supports controlled state keys, non-reactive values and provides utility methods for React.\n */\nexport class ReactStore extends Store {\n /**\n * Creates a new ReactStore instance.\n *\n * @param state Initial state of the store.\n * @param context Non-reactive context values.\n * @param selectors Optional selectors for use with `useState`.\n */\n constructor(state, context = {}, selectors) {\n super(state);\n this.context = context;\n this.selectors = selectors;\n }\n\n /**\n * Non-reactive values such as refs, callbacks, etc.\n */\n\n /**\n * Synchronizes a single external value into the store.\n *\n * Note that the while the value in `state` is updated immediately, the value returned\n * by `useState` is updated before the next render (similarly to React's `useState`).\n */\n useSyncedValue(key, value) {\n React.useDebugValue(key);\n // eslint-disable-next-line consistent-this\n const store = this;\n useIsoLayoutEffect(() => {\n if (store.state[key] !== value) {\n store.set(key, value);\n }\n }, [store, key, value]);\n }\n\n /**\n * Synchronizes a single external value into the store and\n * cleans it up (sets to `undefined`) on unmount.\n *\n * Note that the while the value in `state` is updated immediately, the value returned\n * by `useState` is updated before the next render (similarly to React's `useState`).\n */\n useSyncedValueWithCleanup(key, value) {\n // eslint-disable-next-line consistent-this\n const store = this;\n useIsoLayoutEffect(() => {\n if (store.state[key] !== value) {\n store.set(key, value);\n }\n return () => {\n store.set(key, undefined);\n };\n }, [store, key, value]);\n }\n\n /**\n * Synchronizes multiple external values into the store.\n *\n * Note that the while the values in `state` are updated immediately, the values returned\n * by `useState` are updated before the next render (similarly to React's `useState`).\n */\n useSyncedValues(statePart) {\n // eslint-disable-next-line consistent-this\n const store = this;\n if (process.env.NODE_ENV !== 'production') {\n // Check that an object with the same shape is passed on every render\n React.useDebugValue(statePart, p => Object.keys(p));\n const keys = React.useRef(Object.keys(statePart)).current;\n const nextKeys = Object.keys(statePart);\n if (keys.length !== nextKeys.length || keys.some((key, index) => key !== nextKeys[index])) {\n console.error('ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.');\n }\n }\n const dependencies = Object.values(statePart);\n useIsoLayoutEffect(() => {\n store.update(statePart);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [store, ...dependencies]);\n }\n\n /**\n * Registers a controllable prop pair (`controlled`, `defaultValue`) for a specific key. If `controlled`\n * is non-undefined, the store's state at `key` is updated to match `controlled`.\n */\n useControlledProp(key, controlled) {\n React.useDebugValue(key);\n // eslint-disable-next-line consistent-this\n const store = this;\n const isControlled = controlled !== undefined;\n useIsoLayoutEffect(() => {\n if (isControlled && !Object.is(store.state[key], controlled)) {\n // Set the internal state to match the controlled value.\n store.setState({\n ...store.state,\n [key]: controlled\n });\n }\n }, [store, key, controlled, isControlled]);\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line\n const cache = this.controlledValues ??= new Map();\n if (!cache.has(key)) {\n cache.set(key, isControlled);\n }\n const previouslyControlled = cache.get(key);\n if (previouslyControlled !== undefined && previouslyControlled !== isControlled) {\n console.error(`A component is changing the ${isControlled ? '' : 'un'}controlled state of ${key.toString()} to be ${isControlled ? 'un' : ''}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`);\n }\n }\n }\n\n /** Gets the current value from the store using a selector with the provided key.\n *\n * @param key Key of the selector to use.\n */\n\n select(key, a1, a2, a3) {\n const selector = this.selectors[key];\n return selector(this.state, a1, a2, a3);\n }\n\n /**\n * Returns a value from the store's state using a selector function.\n * Used to subscribe to specific parts of the state.\n * This methods causes a rerender whenever the selected state changes.\n *\n * @param key Key of the selector to use.\n */\n\n useState(key, a1, a2, a3) {\n React.useDebugValue(key);\n return useStore(this, this.selectors[key], a1, a2, a3);\n }\n\n /**\n * Wraps a function with `useStableCallback` to ensure it has a stable reference\n * and assigns it to the context.\n *\n * @param key Key of the event callback. Must be a function in the context.\n * @param fn Function to assign.\n */\n useContextCallback(key, fn) {\n React.useDebugValue(key);\n const stableFunction = useStableCallback(fn ?? NOOP);\n this.context[key] = stableFunction;\n }\n\n /**\n * Returns a stable setter function for a specific key in the store's state.\n * It's commonly used to pass as a ref callback to React elements.\n *\n * @param key Key of the state to set.\n */\n useStateSetter(key) {\n const ref = React.useRef(undefined);\n if (ref.current === undefined) {\n ref.current = value => {\n this.set(key, value);\n };\n }\n return ref.current;\n }\n\n /**\n * Observes changes derived from the store's selectors and calls the listener when the selected value changes.\n *\n * @param key Key of the selector to observe.\n * @param listener Listener function called when the selector result changes.\n */\n\n observe(selector, listener) {\n let selectFn;\n if (typeof selector === 'function') {\n selectFn = selector;\n } else {\n selectFn = this.selectors[selector];\n }\n let prevValue = selectFn(this.state);\n listener(prevValue, prevValue, this);\n return this.subscribe(nextState => {\n const nextValue = selectFn(nextState);\n if (!Object.is(prevValue, nextValue)) {\n const oldValue = prevValue;\n prevValue = nextValue;\n listener(nextValue, oldValue, this);\n }\n });\n }\n}"],"x_google_ignoreList":[0],"mappings":"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"}
1
+ {"version":3,"file":"index262.js","names":[],"sources":["../../../node_modules/@base-ui/react/floating-ui-react/components/FloatingRootStore.mjs"],"sourcesContent":["import { ReactStore } from '@base-ui/utils/store';\nimport { createEventEmitter } from \"../utils/createEventEmitter.mjs\";\nimport { isClickLikeEvent } from \"../utils.mjs\";\nconst selectors = {\n open: state => state.open,\n transitionStatus: state => state.transitionStatus,\n domReferenceElement: state => state.domReferenceElement,\n referenceElement: state => state.positionReference ?? state.referenceElement,\n floatingElement: state => state.floatingElement,\n floatingId: state => state.floatingId\n};\nexport class FloatingRootStore extends ReactStore {\n constructor(options) {\n const {\n syncOnly,\n nested,\n onOpenChange,\n triggerElements,\n ...initialState\n } = options;\n super({\n ...initialState,\n positionReference: initialState.referenceElement,\n domReferenceElement: initialState.referenceElement\n }, {\n onOpenChange,\n dataRef: {\n current: {}\n },\n events: createEventEmitter(),\n nested,\n triggerElements\n }, selectors);\n this.syncOnly = syncOnly;\n }\n\n /**\n * Syncs the event used by hover logic to distinguish hover-open from click-like interaction.\n */\n syncOpenEvent = (newOpen, event) => {\n if (!newOpen || !this.state.open ||\n // Prevent a pending hover-open from overwriting a click-open event, while allowing\n // click events to upgrade a hover-open.\n event != null && isClickLikeEvent(event)) {\n this.context.dataRef.current.openEvent = newOpen ? event : undefined;\n }\n };\n\n /**\n * Runs the root-owned side effects for an open state change.\n */\n dispatchOpenChange = (newOpen, eventDetails) => {\n this.syncOpenEvent(newOpen, eventDetails.event);\n const details = {\n open: newOpen,\n reason: eventDetails.reason,\n nativeEvent: eventDetails.event,\n nested: this.context.nested,\n triggerElement: eventDetails.trigger\n };\n this.context.events.emit('openchange', details);\n };\n\n /**\n * Emits the `openchange` event through the internal event emitter and calls the `onOpenChange` handler with the provided arguments.\n *\n * @param newOpen The new open state.\n * @param eventDetails Details about the event that triggered the open state change.\n */\n setOpen = (newOpen, eventDetails) => {\n if (this.syncOnly) {\n this.context.onOpenChange?.(newOpen, eventDetails);\n return;\n }\n this.dispatchOpenChange(newOpen, eventDetails);\n this.context.onOpenChange?.(newOpen, eventDetails);\n };\n}"],"x_google_ignoreList":[0],"mappings":";;;;AAGA,IAAM,IAAY;CAChB,OAAM,MAAS,EAAM;CACrB,mBAAkB,MAAS,EAAM;CACjC,sBAAqB,MAAS,EAAM;CACpC,mBAAkB,MAAS,EAAM,qBAAqB,EAAM;CAC5D,kBAAiB,MAAS,EAAM;CAChC,aAAY,MAAS,EAAM;AAC7B,GACa,IAAb,cAAuC,EAAW;CAChD,YAAY,GAAS;EACnB,IAAM,EACJ,aACA,WACA,iBACA,oBACA,GAAG,MACD;EAcJ,AAbA,MAAM;GACJ,GAAG;GACH,mBAAmB,EAAa;GAChC,qBAAqB,EAAa;EACpC,GAAG;GACD;GACA,SAAS,EACP,SAAS,CAAC,EACZ;GACA,QAAQ,EAAmB;GAC3B;GACA;EACF,GAAG,CAAS,GACZ,KAAK,WAAW;CAClB;CAKA,iBAAiB,GAAS,MAAU;EAClC,CAAI,CAAC,KAAW,CAAC,KAAK,MAAM,QAG5B,KAAS,QAAQ,EAAiB,CAAK,OACrC,KAAK,QAAQ,QAAQ,QAAQ,YAAY,IAAU,IAAQ,KAAA;CAE/D;CAKA,sBAAsB,GAAS,MAAiB;EAC9C,KAAK,cAAc,GAAS,EAAa,KAAK;EAC9C,IAAM,IAAU;GACd,MAAM;GACN,QAAQ,EAAa;GACrB,aAAa,EAAa;GAC1B,QAAQ,KAAK,QAAQ;GACrB,gBAAgB,EAAa;EAC/B;EACA,KAAK,QAAQ,OAAO,KAAK,cAAc,CAAO;CAChD;CAQA,WAAW,GAAS,MAAiB;EACnC,IAAI,KAAK,UAAU;GACjB,KAAK,QAAQ,eAAe,GAAS,CAAY;GACjD;EACF;EAEA,AADA,KAAK,mBAAmB,GAAS,CAAY,GAC7C,KAAK,QAAQ,eAAe,GAAS,CAAY;CACnD;AACF"}
package/dist/index263.js CHANGED
@@ -1,53 +1,40 @@
1
- import { isClickLikeEvent as e } from "./index221.js";
2
- import { createEventEmitter as t } from "./index241.js";
3
- import { createSelector as n } from "./index251.js";
4
- import { ReactStore as r } from "./index262.js";
5
- //#region ../../node_modules/@base-ui/react/floating-ui-react/components/FloatingRootStore.mjs
6
- var i = {
7
- open: n((e) => e.open),
8
- transitionStatus: n((e) => e.transitionStatus),
9
- domReferenceElement: n((e) => e.domReferenceElement),
10
- referenceElement: n((e) => e.positionReference ?? e.referenceElement),
11
- floatingElement: n((e) => e.floatingElement),
12
- floatingId: n((e) => e.floatingId)
13
- }, a = class extends r {
14
- constructor(e) {
15
- let { syncOnly: n, nested: r, onOpenChange: a, triggerElements: o, ...s } = e;
16
- super({
17
- ...s,
18
- positionReference: s.referenceElement,
19
- domReferenceElement: s.referenceElement
20
- }, {
21
- onOpenChange: a,
22
- dataRef: { current: {} },
23
- events: t(),
24
- nested: r,
25
- triggerElements: o
26
- }, i), this.syncOnly = n;
27
- }
28
- syncOpenEvent = (t, n) => {
29
- (!t || !this.state.open || n != null && e(n)) && (this.context.dataRef.current.openEvent = t ? n : void 0);
30
- };
31
- dispatchOpenChange = (e, t) => {
32
- this.syncOpenEvent(e, t.event);
33
- let n = {
34
- open: e,
35
- reason: t.reason,
36
- nativeEvent: t.event,
37
- nested: this.context.nested,
38
- triggerElement: t.trigger
1
+ "use client";
2
+ import { isElement as e } from "./index200.js";
3
+ import { useIsoLayoutEffect as t } from "./index204.js";
4
+ import { FloatingRootStore as n } from "./index262.js";
5
+ import * as r from "react";
6
+ //#region ../../node_modules/@base-ui/react/floating-ui-react/hooks/useSyncedFloatingRootContext.mjs
7
+ function i(i) {
8
+ let { popupStore: a, treatPopupAsFloatingElement: o = !1, floatingRootContext: s, floatingId: c, nested: l, onOpenChange: u } = i, d = a.useState("open"), f = a.useState("activeTriggerElement"), p = a.useState(o ? "popupElement" : "positionerElement"), m = a.context.triggerElements, h = u, g = r.useRef(null);
9
+ s === void 0 && g.current === null && (g.current = new n({
10
+ open: d,
11
+ transitionStatus: void 0,
12
+ referenceElement: f,
13
+ floatingElement: p,
14
+ triggerElements: m,
15
+ onOpenChange: h,
16
+ floatingId: c,
17
+ syncOnly: !0,
18
+ nested: l
19
+ }));
20
+ let _ = s ?? g.current;
21
+ return a.useSyncedValue("floatingId", c), t(() => {
22
+ let t = {
23
+ open: d,
24
+ floatingId: c,
25
+ referenceElement: f,
26
+ floatingElement: p
39
27
  };
40
- this.context.events.emit("openchange", n);
41
- };
42
- setOpen = (e, t) => {
43
- if (this.syncOnly) {
44
- this.context.onOpenChange?.(e, t);
45
- return;
46
- }
47
- this.dispatchOpenChange(e, t), this.context.onOpenChange?.(e, t);
48
- };
49
- };
28
+ e(f) && (t.domReferenceElement = f), _.state.positionReference === _.state.referenceElement && (t.positionReference = f), _.update(t);
29
+ }, [
30
+ d,
31
+ c,
32
+ f,
33
+ p,
34
+ _
35
+ ]), _.context.onOpenChange = h, _.context.nested = l, _;
36
+ }
50
37
  //#endregion
51
- export { a as FloatingRootStore };
38
+ export { i as useSyncedFloatingRootContext };
52
39
 
53
40
  //# sourceMappingURL=index263.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index263.js","names":[],"sources":["../../../node_modules/@base-ui/react/floating-ui-react/components/FloatingRootStore.mjs"],"sourcesContent":["import { createSelector, ReactStore } from '@base-ui/utils/store';\nimport { createEventEmitter } from \"../utils/createEventEmitter.mjs\";\nimport { isClickLikeEvent } from \"../utils.mjs\";\nconst selectors = {\n open: createSelector(state => state.open),\n transitionStatus: createSelector(state => state.transitionStatus),\n domReferenceElement: createSelector(state => state.domReferenceElement),\n referenceElement: createSelector(state => state.positionReference ?? state.referenceElement),\n floatingElement: createSelector(state => state.floatingElement),\n floatingId: createSelector(state => state.floatingId)\n};\nexport class FloatingRootStore extends ReactStore {\n constructor(options) {\n const {\n syncOnly,\n nested,\n onOpenChange,\n triggerElements,\n ...initialState\n } = options;\n super({\n ...initialState,\n positionReference: initialState.referenceElement,\n domReferenceElement: initialState.referenceElement\n }, {\n onOpenChange,\n dataRef: {\n current: {}\n },\n events: createEventEmitter(),\n nested,\n triggerElements\n }, selectors);\n this.syncOnly = syncOnly;\n }\n\n /**\n * Syncs the event used by hover logic to distinguish hover-open from click-like interaction.\n */\n syncOpenEvent = (newOpen, event) => {\n if (!newOpen || !this.state.open ||\n // Prevent a pending hover-open from overwriting a click-open event, while allowing\n // click events to upgrade a hover-open.\n event != null && isClickLikeEvent(event)) {\n this.context.dataRef.current.openEvent = newOpen ? event : undefined;\n }\n };\n\n /**\n * Runs the root-owned side effects for an open state change.\n */\n dispatchOpenChange = (newOpen, eventDetails) => {\n this.syncOpenEvent(newOpen, eventDetails.event);\n const details = {\n open: newOpen,\n reason: eventDetails.reason,\n nativeEvent: eventDetails.event,\n nested: this.context.nested,\n triggerElement: eventDetails.trigger\n };\n this.context.events.emit('openchange', details);\n };\n\n /**\n * Emits the `openchange` event through the internal event emitter and calls the `onOpenChange` handler with the provided arguments.\n *\n * @param newOpen The new open state.\n * @param eventDetails Details about the event that triggered the open state change.\n */\n setOpen = (newOpen, eventDetails) => {\n if (this.syncOnly) {\n this.context.onOpenChange?.(newOpen, eventDetails);\n return;\n }\n this.dispatchOpenChange(newOpen, eventDetails);\n this.context.onOpenChange?.(newOpen, eventDetails);\n };\n}"],"x_google_ignoreList":[0],"mappings":";;;;;AAGA,IAAM,IAAY;CAChB,MAAM,GAAe,MAAS,EAAM,IAAI;CACxC,kBAAkB,GAAe,MAAS,EAAM,gBAAgB;CAChE,qBAAqB,GAAe,MAAS,EAAM,mBAAmB;CACtE,kBAAkB,GAAe,MAAS,EAAM,qBAAqB,EAAM,gBAAgB;CAC3F,iBAAiB,GAAe,MAAS,EAAM,eAAe;CAC9D,YAAY,GAAe,MAAS,EAAM,UAAU;AACtD,GACa,IAAb,cAAuC,EAAW;CAChD,YAAY,GAAS;EACnB,IAAM,EACJ,aACA,WACA,iBACA,oBACA,GAAG,MACD;EAcJ,AAbA,MAAM;GACJ,GAAG;GACH,mBAAmB,EAAa;GAChC,qBAAqB,EAAa;EACpC,GAAG;GACD;GACA,SAAS,EACP,SAAS,CAAC,EACZ;GACA,QAAQ,EAAmB;GAC3B;GACA;EACF,GAAG,CAAS,GACZ,KAAK,WAAW;CAClB;CAKA,iBAAiB,GAAS,MAAU;EAClC,CAAI,CAAC,KAAW,CAAC,KAAK,MAAM,QAG5B,KAAS,QAAQ,EAAiB,CAAK,OACrC,KAAK,QAAQ,QAAQ,QAAQ,YAAY,IAAU,IAAQ,KAAA;CAE/D;CAKA,sBAAsB,GAAS,MAAiB;EAC9C,KAAK,cAAc,GAAS,EAAa,KAAK;EAC9C,IAAM,IAAU;GACd,MAAM;GACN,QAAQ,EAAa;GACrB,aAAa,EAAa;GAC1B,QAAQ,KAAK,QAAQ;GACrB,gBAAgB,EAAa;EAC/B;EACA,KAAK,QAAQ,OAAO,KAAK,cAAc,CAAO;CAChD;CAQA,WAAW,GAAS,MAAiB;EACnC,IAAI,KAAK,UAAU;GACjB,KAAK,QAAQ,eAAe,GAAS,CAAY;GACjD;EACF;EAEA,AADA,KAAK,mBAAmB,GAAS,CAAY,GAC7C,KAAK,QAAQ,eAAe,GAAS,CAAY;CACnD;AACF"}
1
+ {"version":3,"file":"index263.js","names":["React"],"sources":["../../../node_modules/@base-ui/react/floating-ui-react/hooks/useSyncedFloatingRootContext.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { isElement } from '@floating-ui/utils/dom';\nimport { FloatingRootStore } from \"../components/FloatingRootStore.mjs\";\n/**\n * Keeps a FloatingRootStore in sync with the provided PopupStore.\n * Uses the provided FloatingRootStore when one exists, otherwise creates one once and updates it on every render.\n */\nexport function useSyncedFloatingRootContext(options) {\n const {\n popupStore,\n treatPopupAsFloatingElement = false,\n floatingRootContext: floatingRootContextProp,\n floatingId,\n nested,\n onOpenChange\n } = options;\n const open = popupStore.useState('open');\n const referenceElement = popupStore.useState('activeTriggerElement');\n const floatingElement = popupStore.useState(treatPopupAsFloatingElement ? 'popupElement' : 'positionerElement');\n const triggerElements = popupStore.context.triggerElements;\n const handleOpenChange = onOpenChange;\n const internalStoreRef = React.useRef(null);\n if (floatingRootContextProp === undefined && internalStoreRef.current === null) {\n internalStoreRef.current = new FloatingRootStore({\n open,\n transitionStatus: undefined,\n referenceElement,\n floatingElement,\n triggerElements,\n onOpenChange: handleOpenChange,\n floatingId,\n syncOnly: true,\n nested\n });\n }\n const store = floatingRootContextProp ?? internalStoreRef.current;\n popupStore.useSyncedValue('floatingId', floatingId);\n useIsoLayoutEffect(() => {\n const valuesToSync = {\n open,\n floatingId,\n referenceElement,\n floatingElement\n };\n if (isElement(referenceElement)) {\n valuesToSync.domReferenceElement = referenceElement;\n }\n if (store.state.positionReference === store.state.referenceElement) {\n valuesToSync.positionReference = referenceElement;\n }\n store.update(valuesToSync);\n }, [open, floatingId, referenceElement, floatingElement, store]);\n\n // Keep non-reactive context values fresh for interactions that call `store.setOpen`.\n store.context.onOpenChange = handleOpenChange;\n store.context.nested = nested;\n return store;\n}"],"x_google_ignoreList":[0],"mappings":";;;;;;AAUA,SAAgB,EAA6B,GAAS;CACpD,IAAM,EACJ,eACA,iCAA8B,IAC9B,qBAAqB,GACrB,eACA,WACA,oBACE,GACE,IAAO,EAAW,SAAS,MAAM,GACjC,IAAmB,EAAW,SAAS,sBAAsB,GAC7D,IAAkB,EAAW,SAAS,IAA8B,iBAAiB,mBAAmB,GACxG,IAAkB,EAAW,QAAQ,iBACrC,IAAmB,GACnB,IAAmBA,EAAM,OAAO,IAAI;CAC1C,AAAI,MAA4B,KAAA,KAAa,EAAiB,YAAY,SACxE,EAAiB,UAAU,IAAI,EAAkB;EAC/C;EACA,kBAAkB,KAAA;EAClB;EACA;EACA;EACA,cAAc;EACd;EACA,UAAU;EACV;CACF,CAAC;CAEH,IAAM,IAAQ,KAA2B,EAAiB;CAqB1D,OApBA,EAAW,eAAe,cAAc,CAAU,GAClD,QAAyB;EACvB,IAAM,IAAe;GACnB;GACA;GACA;GACA;EACF;EAOA,AANI,EAAU,CAAgB,MAC5B,EAAa,sBAAsB,IAEjC,EAAM,MAAM,sBAAsB,EAAM,MAAM,qBAChD,EAAa,oBAAoB,IAEnC,EAAM,OAAO,CAAY;CAC3B,GAAG;EAAC;EAAM;EAAY;EAAkB;EAAiB;CAAK,CAAC,GAG/D,EAAM,QAAQ,eAAe,GAC7B,EAAM,QAAQ,SAAS,GAChB;AACT"}
package/dist/index264.js CHANGED
@@ -1,40 +1,53 @@
1
1
  "use client";
2
- import { isElement as e } from "./index200.js";
3
- import { useIsoLayoutEffect as t } from "./index204.js";
4
- import { FloatingRootStore as n } from "./index263.js";
5
- import * as r from "react";
6
- //#region ../../node_modules/@base-ui/react/floating-ui-react/hooks/useSyncedFloatingRootContext.mjs
7
- function i(i) {
8
- let { popupStore: a, treatPopupAsFloatingElement: o = !1, floatingRootContext: s, floatingId: c, nested: l, onOpenChange: u } = i, d = a.useState("open"), f = a.useState("activeTriggerElement"), p = a.useState(o ? "popupElement" : "positionerElement"), m = a.context.triggerElements, h = u, g = r.useRef(null);
9
- s === void 0 && g.current === null && (g.current = new n({
10
- open: d,
11
- transitionStatus: void 0,
12
- referenceElement: f,
13
- floatingElement: p,
14
- triggerElements: m,
15
- onOpenChange: h,
16
- floatingId: c,
17
- syncOnly: !0,
18
- nested: l
19
- }));
20
- let _ = s ?? g.current;
21
- return a.useSyncedValue("floatingId", c), t(() => {
22
- let t = {
23
- open: d,
24
- floatingId: c,
25
- referenceElement: f,
26
- floatingElement: p
2
+ import { useIsoLayoutEffect as e } from "./index204.js";
3
+ import { AnimationFrame as t } from "./index230.js";
4
+ import * as n from "react";
5
+ //#region ../../node_modules/@base-ui/react/internals/useTransitionStatus.mjs
6
+ function r(r, i = !1, a = !1) {
7
+ let [o, s] = n.useState(r && i ? "idle" : void 0), [c, l] = n.useState(r);
8
+ return r && !c && (l(!0), s("starting")), !r && c && o !== "ending" && !a && s("ending"), !r && !c && o === "ending" && s(void 0), e(() => {
9
+ if (!r && c && o !== "ending" && a) {
10
+ let e = t.request(() => {
11
+ s("ending");
12
+ });
13
+ return () => {
14
+ t.cancel(e);
15
+ };
16
+ }
17
+ }, [
18
+ r,
19
+ c,
20
+ o,
21
+ a
22
+ ]), e(() => {
23
+ if (!r || i) return;
24
+ let e = t.request(() => {
25
+ s(void 0);
26
+ });
27
+ return () => {
28
+ t.cancel(e);
29
+ };
30
+ }, [i, r]), e(() => {
31
+ if (!r || !i) return;
32
+ r && c && o !== "idle" && s("starting");
33
+ let e = t.request(() => {
34
+ s("idle");
35
+ });
36
+ return () => {
37
+ t.cancel(e);
27
38
  };
28
- e(f) && (t.domReferenceElement = f), _.state.positionReference === _.state.referenceElement && (t.positionReference = f), _.update(t);
29
39
  }, [
30
- d,
40
+ i,
41
+ r,
31
42
  c,
32
- f,
33
- p,
34
- _
35
- ]), _.context.onOpenChange = h, _.context.nested = l, _;
43
+ o
44
+ ]), {
45
+ mounted: c,
46
+ setMounted: l,
47
+ transitionStatus: o
48
+ };
36
49
  }
37
50
  //#endregion
38
- export { i as useSyncedFloatingRootContext };
51
+ export { r as useTransitionStatus };
39
52
 
40
53
  //# sourceMappingURL=index264.js.map