@rpcbase/ui 0.243.0 → 0.245.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/index10.js +2 -2
  2. package/dist/index106.js +1 -1
  3. package/dist/index11.js +2 -2
  4. package/dist/index12.js +3 -3
  5. package/dist/index13.js +2 -2
  6. package/dist/index14.js +2 -2
  7. package/dist/index149.js +14 -5
  8. package/dist/index149.js.map +1 -1
  9. package/dist/index15.js +2 -2
  10. package/dist/index150.js +63 -63
  11. package/dist/index150.js.map +1 -1
  12. package/dist/index151.js +38 -2
  13. package/dist/index151.js.map +1 -1
  14. package/dist/index152.js +13 -385
  15. package/dist/index152.js.map +1 -1
  16. package/dist/index153.js +23 -261
  17. package/dist/index153.js.map +1 -1
  18. package/dist/index154.js +109 -58
  19. package/dist/index154.js.map +1 -1
  20. package/dist/index155.js +13 -47
  21. package/dist/index155.js.map +1 -1
  22. package/dist/index156.js +4 -169
  23. package/dist/index156.js.map +1 -1
  24. package/dist/index157.js +4 -110
  25. package/dist/index157.js.map +1 -1
  26. package/dist/index158.js +5 -25
  27. package/dist/index158.js.map +1 -1
  28. package/dist/index159.js +12 -8
  29. package/dist/index159.js.map +1 -1
  30. package/dist/index16.js +8 -8
  31. package/dist/index160.js +19 -4
  32. package/dist/index160.js.map +1 -1
  33. package/dist/index161.js +11 -6
  34. package/dist/index161.js.map +1 -1
  35. package/dist/index162.js +176 -4
  36. package/dist/index162.js.map +1 -1
  37. package/dist/index163.js +268 -476
  38. package/dist/index163.js.map +1 -1
  39. package/dist/index164.js +4 -189
  40. package/dist/index164.js.map +1 -1
  41. package/dist/index165.js +28 -14
  42. package/dist/index165.js.map +1 -1
  43. package/dist/index166.js +124 -105
  44. package/dist/index166.js.map +1 -1
  45. package/dist/index167.js +63 -262
  46. package/dist/index167.js.map +1 -1
  47. package/dist/index168.js +8 -6
  48. package/dist/index168.js.map +1 -1
  49. package/dist/index169.js +15 -40
  50. package/dist/index169.js.map +1 -1
  51. package/dist/index17.js +1 -1
  52. package/dist/index170.js +30 -4
  53. package/dist/index170.js.map +1 -1
  54. package/dist/index171.js +69 -14
  55. package/dist/index171.js.map +1 -1
  56. package/dist/index172.js +5 -68
  57. package/dist/index172.js.map +1 -1
  58. package/dist/index173.js +66 -35
  59. package/dist/index173.js.map +1 -1
  60. package/dist/index174.js +2 -14
  61. package/dist/index174.js.map +1 -1
  62. package/dist/index175.js +384 -22
  63. package/dist/index175.js.map +1 -1
  64. package/dist/index176.js +258 -108
  65. package/dist/index176.js.map +1 -1
  66. package/dist/index177.js +61 -13
  67. package/dist/index177.js.map +1 -1
  68. package/dist/index178.js +46 -4
  69. package/dist/index178.js.map +1 -1
  70. package/dist/index179.js +170 -4
  71. package/dist/index179.js.map +1 -1
  72. package/dist/index18.js +7 -7
  73. package/dist/index180.js +110 -5
  74. package/dist/index180.js.map +1 -1
  75. package/dist/index181.js +24 -11
  76. package/dist/index181.js.map +1 -1
  77. package/dist/index182.js +8 -20
  78. package/dist/index182.js.map +1 -1
  79. package/dist/index183.js +5 -11
  80. package/dist/index183.js.map +1 -1
  81. package/dist/index184.js +5 -176
  82. package/dist/index184.js.map +1 -1
  83. package/dist/index185.js +4 -279
  84. package/dist/index185.js.map +1 -1
  85. package/dist/index186.js +487 -4
  86. package/dist/index186.js.map +1 -1
  87. package/dist/index187.js +189 -27
  88. package/dist/index187.js.map +1 -1
  89. package/dist/index188.js +13 -126
  90. package/dist/index188.js.map +1 -1
  91. package/dist/index189.js +107 -63
  92. package/dist/index189.js.map +1 -1
  93. package/dist/index19.js +16 -16
  94. package/dist/index190.js +262 -8
  95. package/dist/index190.js.map +1 -1
  96. package/dist/index191.js +7 -16
  97. package/dist/index191.js.map +1 -1
  98. package/dist/index192.js +39 -29
  99. package/dist/index192.js.map +1 -1
  100. package/dist/index193.js +4 -69
  101. package/dist/index193.js.map +1 -1
  102. package/dist/index21.js +1 -1
  103. package/dist/index22.js +2 -2
  104. package/dist/index23.js +1 -1
  105. package/dist/index24.js +1 -1
  106. package/dist/index246.js +1 -1
  107. package/dist/index25.js +1 -1
  108. package/dist/index252.js +1 -1
  109. package/dist/index254.js +58 -146
  110. package/dist/index254.js.map +1 -1
  111. package/dist/index255.js +8 -32
  112. package/dist/index255.js.map +1 -1
  113. package/dist/index256.js +11 -11
  114. package/dist/index256.js.map +1 -1
  115. package/dist/index257.js +7 -48
  116. package/dist/index257.js.map +1 -1
  117. package/dist/index258.js +5 -9
  118. package/dist/index258.js.map +1 -1
  119. package/dist/index259.js +13 -11
  120. package/dist/index259.js.map +1 -1
  121. package/dist/index260.js +3 -43
  122. package/dist/index260.js.map +1 -1
  123. package/dist/index261.js +3 -97
  124. package/dist/index261.js.map +1 -1
  125. package/dist/index262.js +87 -74
  126. package/dist/index262.js.map +1 -1
  127. package/dist/index263.js +16 -104
  128. package/dist/index263.js.map +1 -1
  129. package/dist/index264.js +27 -50
  130. package/dist/index264.js.map +1 -1
  131. package/dist/index265.js +51 -11
  132. package/dist/index265.js.map +1 -1
  133. package/dist/index266.js +5 -4
  134. package/dist/index266.js.map +1 -1
  135. package/dist/index267.js +5 -37
  136. package/dist/index267.js.map +1 -1
  137. package/dist/index268.js +61 -8
  138. package/dist/index268.js.map +1 -1
  139. package/dist/index269.js +61 -130
  140. package/dist/index269.js.map +1 -1
  141. package/dist/index270.js +133 -17
  142. package/dist/index270.js.map +1 -1
  143. package/dist/index271.js +7 -14
  144. package/dist/index271.js.map +1 -1
  145. package/dist/index272.js +5 -4
  146. package/dist/index272.js.map +1 -1
  147. package/dist/index273.js +4 -37
  148. package/dist/index273.js.map +1 -1
  149. package/dist/index274.js +11 -20
  150. package/dist/index274.js.map +1 -1
  151. package/dist/index275.js +21 -8
  152. package/dist/index275.js.map +1 -1
  153. package/dist/index276.js +16 -9
  154. package/dist/index276.js.map +1 -1
  155. package/dist/index277.js +11 -24
  156. package/dist/index277.js.map +1 -1
  157. package/dist/index278.js +8 -29
  158. package/dist/index278.js.map +1 -1
  159. package/dist/index279.js +142 -14
  160. package/dist/index279.js.map +1 -1
  161. package/dist/index28.js +1 -1
  162. package/dist/index280.js +79 -19
  163. package/dist/index280.js.map +1 -1
  164. package/dist/index281.js +60 -65
  165. package/dist/index281.js.map +1 -1
  166. package/dist/index282.js +15 -7
  167. package/dist/index282.js.map +1 -1
  168. package/dist/index283.js +20 -6
  169. package/dist/index283.js.map +1 -1
  170. package/dist/index284.js +6 -11
  171. package/dist/index284.js.map +1 -1
  172. package/dist/index285.js +11 -3
  173. package/dist/index285.js.map +1 -1
  174. package/dist/index286.js +3 -50
  175. package/dist/index286.js.map +1 -1
  176. package/dist/index287.js +51 -4
  177. package/dist/index287.js.map +1 -1
  178. package/dist/index288.js +12 -25
  179. package/dist/index288.js.map +1 -1
  180. package/dist/index289.js +19 -14
  181. package/dist/index289.js.map +1 -1
  182. package/dist/index29.js +3 -56
  183. package/dist/index29.js.map +1 -1
  184. package/dist/index290.js +53 -5
  185. package/dist/index290.js.map +1 -1
  186. package/dist/index291.js +20 -21
  187. package/dist/index291.js.map +1 -1
  188. package/dist/index292.js +41 -53
  189. package/dist/index292.js.map +1 -1
  190. package/dist/index293.js +38 -19
  191. package/dist/index293.js.map +1 -1
  192. package/dist/index294.js +46 -42
  193. package/dist/index294.js.map +1 -1
  194. package/dist/index295.js +19 -38
  195. package/dist/index295.js.map +1 -1
  196. package/dist/index296.js +71 -46
  197. package/dist/index296.js.map +1 -1
  198. package/dist/index297.js +17 -20
  199. package/dist/index297.js.map +1 -1
  200. package/dist/index298.js +3 -70
  201. package/dist/index298.js.map +1 -1
  202. package/dist/index299.js +12 -16
  203. package/dist/index299.js.map +1 -1
  204. package/dist/index3.js +2 -2
  205. package/dist/index30.js +242 -3
  206. package/dist/index30.js.map +1 -1
  207. package/dist/index300.js +18 -3
  208. package/dist/index300.js.map +1 -1
  209. package/dist/index301.js +36 -11
  210. package/dist/index301.js.map +1 -1
  211. package/dist/index302.js +238 -12
  212. package/dist/index302.js.map +1 -1
  213. package/dist/index303.js +249 -15
  214. package/dist/index303.js.map +1 -1
  215. package/dist/index304.js +67 -35
  216. package/dist/index304.js.map +1 -1
  217. package/dist/index305.js +77 -233
  218. package/dist/index305.js.map +1 -1
  219. package/dist/index306.js +3 -252
  220. package/dist/index306.js.map +1 -1
  221. package/dist/index307.js +29 -68
  222. package/dist/index307.js.map +1 -1
  223. package/dist/index308.js +16 -99
  224. package/dist/index308.js.map +1 -1
  225. package/dist/index309.js +33 -82
  226. package/dist/index309.js.map +1 -1
  227. package/dist/index31.js +21 -239
  228. package/dist/index31.js.map +1 -1
  229. package/dist/index310.js +17 -3
  230. package/dist/index310.js.map +1 -1
  231. package/dist/index311.js +3 -29
  232. package/dist/index311.js.map +1 -1
  233. package/dist/index312.js +26 -16
  234. package/dist/index312.js.map +1 -1
  235. package/dist/index313.js +28 -34
  236. package/dist/index313.js.map +1 -1
  237. package/dist/index314.js +4 -18
  238. package/dist/index314.js.map +1 -1
  239. package/dist/index315.js +78 -3
  240. package/dist/index315.js.map +1 -1
  241. package/dist/index316.js +269 -23
  242. package/dist/index316.js.map +1 -1
  243. package/dist/index317.js +10 -27
  244. package/dist/index317.js.map +1 -1
  245. package/dist/index318.js +11 -4
  246. package/dist/index318.js.map +1 -1
  247. package/dist/index319.js +24 -77
  248. package/dist/index319.js.map +1 -1
  249. package/dist/index32.js +4 -23
  250. package/dist/index32.js.map +1 -1
  251. package/dist/index320.js +15 -271
  252. package/dist/index320.js.map +1 -1
  253. package/dist/index321.js +125 -11
  254. package/dist/index321.js.map +1 -1
  255. package/dist/index322.js +5 -10
  256. package/dist/index322.js.map +1 -1
  257. package/dist/index323.js +64 -24
  258. package/dist/index323.js.map +1 -1
  259. package/dist/index324.js +14 -17
  260. package/dist/index324.js.map +1 -1
  261. package/dist/index325.js +7 -125
  262. package/dist/index325.js.map +1 -1
  263. package/dist/index326.js +5 -5
  264. package/dist/index326.js.map +1 -1
  265. package/dist/index327.js +3 -65
  266. package/dist/index327.js.map +1 -1
  267. package/dist/index328.js +10 -13
  268. package/dist/index328.js.map +1 -1
  269. package/dist/index329.js +7 -7
  270. package/dist/index329.js.map +1 -1
  271. package/dist/index33.js +6 -3
  272. package/dist/index33.js.map +1 -1
  273. package/dist/index330.js +399 -5
  274. package/dist/index330.js.map +1 -1
  275. package/dist/index331.js +5 -4
  276. package/dist/index331.js.map +1 -1
  277. package/dist/index332.js +52 -10
  278. package/dist/index332.js.map +1 -1
  279. package/dist/index333.js +10 -6
  280. package/dist/index333.js.map +1 -1
  281. package/dist/index334.js +22 -128
  282. package/dist/index334.js.map +1 -1
  283. package/dist/index335.js +11 -399
  284. package/dist/index335.js.map +1 -1
  285. package/dist/index336.js +155 -5
  286. package/dist/index336.js.map +1 -1
  287. package/dist/index337.js +31 -51
  288. package/dist/index337.js.map +1 -1
  289. package/dist/index338.js +11 -11
  290. package/dist/index338.js.map +1 -1
  291. package/dist/index339.js +45 -23
  292. package/dist/index339.js.map +1 -1
  293. package/dist/index34.js +38 -8
  294. package/dist/index34.js.map +1 -1
  295. package/dist/index340.js +9 -11
  296. package/dist/index340.js.map +1 -1
  297. package/dist/index341.js +11 -8
  298. package/dist/index341.js.map +1 -1
  299. package/dist/index342.js +43 -11
  300. package/dist/index342.js.map +1 -1
  301. package/dist/index343.js +96 -7
  302. package/dist/index343.js.map +1 -1
  303. package/dist/index344.js +84 -11
  304. package/dist/index344.js.map +1 -1
  305. package/dist/index345.js +105 -3
  306. package/dist/index345.js.map +1 -1
  307. package/dist/index346.js +52 -3
  308. package/dist/index346.js.map +1 -1
  309. package/dist/index347.js +10 -16
  310. package/dist/index347.js.map +1 -1
  311. package/dist/index348.js +4 -61
  312. package/dist/index348.js.map +1 -1
  313. package/dist/index349.js +34 -63
  314. package/dist/index349.js.map +1 -1
  315. package/dist/index35.js +74 -35
  316. package/dist/index35.js.map +1 -1
  317. package/dist/index350.js +8 -51
  318. package/dist/index350.js.map +1 -1
  319. package/dist/index351.js +135 -5
  320. package/dist/index351.js.map +1 -1
  321. package/dist/index352.js +17 -8
  322. package/dist/index352.js.map +1 -1
  323. package/dist/index353.js +16 -5
  324. package/dist/index353.js.map +1 -1
  325. package/dist/index354.js +3 -11
  326. package/dist/index354.js.map +1 -1
  327. package/dist/index355.js +34 -19
  328. package/dist/index355.js.map +1 -1
  329. package/dist/index356.js +20 -16
  330. package/dist/index356.js.map +1 -1
  331. package/dist/index357.js +10 -8
  332. package/dist/index357.js.map +1 -1
  333. package/dist/index358.js +8 -144
  334. package/dist/index358.js.map +1 -1
  335. package/dist/index359.js +22 -77
  336. package/dist/index359.js.map +1 -1
  337. package/dist/index36.js +20 -74
  338. package/dist/index36.js.map +1 -1
  339. package/dist/index360.js +28 -61
  340. package/dist/index360.js.map +1 -1
  341. package/dist/index361.js +17 -15
  342. package/dist/index361.js.map +1 -1
  343. package/dist/index363.js +5 -5
  344. package/dist/index365.js +8 -4
  345. package/dist/index365.js.map +1 -1
  346. package/dist/index366.js +27 -21
  347. package/dist/index366.js.map +1 -1
  348. package/dist/index367.js +138 -4
  349. package/dist/index367.js.map +1 -1
  350. package/dist/index368.js +11 -10
  351. package/dist/index368.js.map +1 -1
  352. package/dist/index369.js +46 -5
  353. package/dist/index369.js.map +1 -1
  354. package/dist/index37.js +33 -18
  355. package/dist/index37.js.map +1 -1
  356. package/dist/index370.js +4 -3
  357. package/dist/index370.js.map +1 -1
  358. package/dist/index371.js +20 -19
  359. package/dist/index371.js.map +1 -1
  360. package/dist/index372.js +75 -44
  361. package/dist/index372.js.map +1 -1
  362. package/dist/index373.js +11 -17
  363. package/dist/index373.js.map +1 -1
  364. package/dist/index374.js +4 -5
  365. package/dist/index374.js.map +1 -1
  366. package/dist/index375.js +70 -197
  367. package/dist/index375.js.map +1 -1
  368. package/dist/index376.js +197 -70
  369. package/dist/index376.js.map +1 -1
  370. package/dist/index377.js +66 -118
  371. package/dist/index377.js.map +1 -1
  372. package/dist/index378.js +35 -8
  373. package/dist/index378.js.map +1 -1
  374. package/dist/index379.js +7 -27
  375. package/dist/index379.js.map +1 -1
  376. package/dist/index38.js +26 -36
  377. package/dist/index38.js.map +1 -1
  378. package/dist/index380.js +14 -136
  379. package/dist/index380.js.map +1 -1
  380. package/dist/index381.js +121 -10
  381. package/dist/index381.js.map +1 -1
  382. package/dist/index382.js +4 -47
  383. package/dist/index382.js.map +1 -1
  384. package/dist/index383.js +11 -3
  385. package/dist/index383.js.map +1 -1
  386. package/dist/index384.js +5 -21
  387. package/dist/index384.js.map +1 -1
  388. package/dist/index385.js +3 -76
  389. package/dist/index385.js.map +1 -1
  390. package/dist/index386.js +21 -12
  391. package/dist/index386.js.map +1 -1
  392. package/dist/index387.js +45 -4
  393. package/dist/index387.js.map +1 -1
  394. package/dist/index388.js +16 -70
  395. package/dist/index388.js.map +1 -1
  396. package/dist/index389.js +5 -36
  397. package/dist/index389.js.map +1 -1
  398. package/dist/index39.js +21 -26
  399. package/dist/index39.js.map +1 -1
  400. package/dist/index390.js +5 -7
  401. package/dist/index390.js.map +1 -1
  402. package/dist/index391.js +20 -15
  403. package/dist/index391.js.map +1 -1
  404. package/dist/index399.js +2 -2
  405. package/dist/index4.js +2 -2
  406. package/dist/index40.js +56 -20
  407. package/dist/index40.js.map +1 -1
  408. package/dist/index409.js +3 -3
  409. package/dist/index409.js.map +1 -1
  410. package/dist/index41.js +51 -59
  411. package/dist/index41.js.map +1 -1
  412. package/dist/index410.js +15 -3
  413. package/dist/index410.js.map +1 -1
  414. package/dist/index411.js +488 -11
  415. package/dist/index411.js.map +1 -1
  416. package/dist/index412.js +3 -3
  417. package/dist/index412.js.map +1 -1
  418. package/dist/index413.js +3 -492
  419. package/dist/index413.js.map +1 -1
  420. package/dist/index414.js +5 -68
  421. package/dist/index414.js.map +1 -1
  422. package/dist/index415.js +55 -30
  423. package/dist/index415.js.map +1 -1
  424. package/dist/index416.js +68 -9
  425. package/dist/index416.js.map +1 -1
  426. package/dist/index417.js +26 -148
  427. package/dist/index417.js.map +1 -1
  428. package/dist/index418.js +9 -108
  429. package/dist/index418.js.map +1 -1
  430. package/dist/index419.js +153 -5
  431. package/dist/index419.js.map +1 -1
  432. package/dist/index42.js +21 -50
  433. package/dist/index42.js.map +1 -1
  434. package/dist/index420.js +106 -54
  435. package/dist/index420.js.map +1 -1
  436. package/dist/index421.js +32 -7
  437. package/dist/index421.js.map +1 -1
  438. package/dist/index422.js +8 -2
  439. package/dist/index422.js.map +1 -1
  440. package/dist/index423.js +2 -44
  441. package/dist/index423.js.map +1 -1
  442. package/dist/index424.js +40 -52
  443. package/dist/index424.js.map +1 -1
  444. package/dist/index425.js +55 -7
  445. package/dist/index425.js.map +1 -1
  446. package/dist/index426.js +8 -2
  447. package/dist/index426.js.map +1 -1
  448. package/dist/index427.js +2 -55
  449. package/dist/index427.js.map +1 -1
  450. package/dist/index428.js +52 -53
  451. package/dist/index428.js.map +1 -1
  452. package/dist/index429.js +55 -32
  453. package/dist/index429.js.map +1 -1
  454. package/dist/index43.js +127 -18
  455. package/dist/index43.js.map +1 -1
  456. package/dist/index44.js +39 -122
  457. package/dist/index44.js.map +1 -1
  458. package/dist/index45.js +85 -42
  459. package/dist/index45.js.map +1 -1
  460. package/dist/index46.js +123 -87
  461. package/dist/index46.js.map +1 -1
  462. package/dist/index47.js +5 -126
  463. package/dist/index47.js.map +1 -1
  464. package/dist/index48.js +332 -5
  465. package/dist/index48.js.map +1 -1
  466. package/dist/index49.js +246 -321
  467. package/dist/index49.js.map +1 -1
  468. package/dist/index5.js +2 -2
  469. package/dist/index50.js +23 -254
  470. package/dist/index50.js.map +1 -1
  471. package/dist/index51.js +129 -25
  472. package/dist/index51.js.map +1 -1
  473. package/dist/index52.js +24 -129
  474. package/dist/index52.js.map +1 -1
  475. package/dist/index53.js +19 -22
  476. package/dist/index53.js.map +1 -1
  477. package/dist/index54.js +134 -19
  478. package/dist/index54.js.map +1 -1
  479. package/dist/index55.js +30 -133
  480. package/dist/index55.js.map +1 -1
  481. package/dist/index56.js +24 -30
  482. package/dist/index56.js.map +1 -1
  483. package/dist/index57.js +38 -26
  484. package/dist/index57.js.map +1 -1
  485. package/dist/index58.js +19 -39
  486. package/dist/index58.js.map +1 -1
  487. package/dist/index59.js +133 -18
  488. package/dist/index59.js.map +1 -1
  489. package/dist/index6.js +4 -4
  490. package/dist/index60.js +49 -134
  491. package/dist/index60.js.map +1 -1
  492. package/dist/index61.js +25 -48
  493. package/dist/index61.js.map +1 -1
  494. package/dist/index62.js +57 -28
  495. package/dist/index62.js.map +1 -1
  496. package/dist/index63.js +56 -57
  497. package/dist/index63.js.map +1 -1
  498. package/dist/index64.js +5 -5
  499. package/dist/index64.js.map +1 -1
  500. package/dist/index66.js +22 -10
  501. package/dist/index66.js.map +1 -1
  502. package/dist/index67.js +232 -17
  503. package/dist/index67.js.map +1 -1
  504. package/dist/index68.js +5 -5
  505. package/dist/index68.js.map +1 -1
  506. package/dist/index7.js +11 -11
  507. package/dist/index70.js +10 -22
  508. package/dist/index70.js.map +1 -1
  509. package/dist/index71.js +17 -232
  510. package/dist/index71.js.map +1 -1
  511. package/dist/index76.js +1 -1
  512. package/dist/index77.js +2 -2
  513. package/dist/index77.js.map +1 -1
  514. package/dist/index78.js +2 -2
  515. package/dist/index78.js.map +1 -1
  516. package/dist/index8.js +2 -2
  517. package/dist/index9.js +1 -1
  518. package/package.json +1 -1
package/dist/index380.js CHANGED
@@ -1,141 +1,19 @@
1
- import { isHTMLElement as s, getNodeName as i, isShadowRoot as T, getComputedStyle as A } from "./index334.js";
2
- import { ownerDocument as c } from "./index310.js";
3
- import { contains as f, activeElement as I } from "./index317.js";
4
- import { isElementVisible as C } from "./index382.js";
5
- const N = 'a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';
6
- function R(t) {
7
- const n = t.assignedSlot;
8
- if (n)
9
- return n;
10
- if (t.parentElement)
11
- return t.parentElement;
12
- const e = t.getRootNode();
13
- return T(e) ? e.host : null;
14
- }
15
- function d(t) {
16
- for (const n of Array.from(t.children))
17
- if (i(n) === "summary")
18
- return n;
19
- return null;
20
- }
21
- function S(t, n) {
22
- const e = d(n);
23
- return !!e && (t === e || f(e, t));
24
- }
25
- function b(t) {
26
- const n = t ? i(t) : "";
27
- return t != null && t.matches(N) && (n !== "summary" || t.parentElement != null && i(t.parentElement) === "details" && d(t.parentElement) === t) && (n !== "details" || d(t) == null) && (n !== "input" || t.type !== "hidden");
28
- }
29
- function l(t) {
30
- if (!b(t) || !t.isConnected || t.matches(":disabled"))
31
- return !1;
32
- for (let n = t; n; n = R(n)) {
33
- const e = n !== t, r = i(n) === "slot";
34
- if (n.hasAttribute("inert") || e && i(n) === "details" && !n.open && !S(t, n) || n.hasAttribute("hidden") || !r && !v(n, e))
35
- return !1;
36
- }
37
- return !0;
38
- }
39
- function v(t, n) {
40
- const e = A(t);
41
- return n ? e.display !== "none" : C(t, e);
42
- }
43
- function m(t) {
44
- const n = t.tabIndex;
45
- if (n < 0) {
46
- const e = i(t);
47
- if (e === "details" || e === "audio" || e === "video" || s(t) && t.isContentEditable)
48
- return 0;
49
- }
50
- return n;
51
- }
52
- function u(t) {
53
- if (i(t) !== "input")
54
- return null;
55
- const n = t;
56
- return n.type === "radio" && n.name !== "" ? n : null;
57
- }
58
- function D(t, n) {
59
- const e = u(t);
60
- if (!e)
61
- return !0;
62
- const r = n.find((a) => {
63
- const o = u(a);
64
- return o?.name === e.name && o.form === e.form && o.checked;
65
- });
66
- return r ? r === e : n.find((a) => {
67
- const o = u(a);
68
- return o?.name === e.name && o.form === e.form;
69
- }) === e;
70
- }
71
- function p(t) {
72
- if (s(t) && i(t) === "slot") {
73
- const n = t.assignedElements({
74
- flatten: !0
75
- });
76
- if (n.length > 0)
77
- return n;
78
- }
79
- return s(t) && t.shadowRoot ? Array.from(t.shadowRoot.children) : Array.from(t.children);
80
- }
81
- function h(t, n) {
82
- p(t).forEach((e) => {
83
- b(e) && n.push(e), h(e, n);
84
- });
85
- }
86
- function E(t, n, e) {
87
- p(t).forEach((r) => {
88
- s(r) && r.matches(n) && e.push(r), E(r, n, e);
89
- });
90
- }
91
- function M(t) {
92
- return l(t) && m(t) >= 0;
93
- }
94
- function w(t) {
95
- const n = [];
96
- return h(t, n), n.filter(l);
97
- }
98
- function g(t) {
99
- const n = w(t);
100
- return n.filter((e) => m(e) >= 0 && D(e, n));
101
- }
102
- function x(t, n) {
103
- const e = g(t), r = e.length;
104
- if (r === 0)
105
- return;
106
- const a = I(c(t)), o = e.indexOf(a), y = o === -1 ? n === 1 ? 0 : r - 1 : o + n;
107
- return e[y];
108
- }
109
- function P(t) {
110
- return x(c(t).body, 1) || t;
111
- }
112
- function V(t) {
113
- return x(c(t).body, -1) || t;
114
- }
115
- function j(t, n) {
116
- const e = n || t.currentTarget, r = t.relatedTarget;
117
- return !r || !f(e, r);
118
- }
119
- function H(t) {
120
- g(t).forEach((e) => {
121
- e.dataset.tabindex = e.getAttribute("tabindex") || "", e.setAttribute("tabindex", "-1");
122
- });
123
- }
124
- function W(t) {
125
- const n = [];
126
- E(t, "[data-tabindex]", n), n.forEach((e) => {
127
- const r = e.dataset.tabindex;
128
- delete e.dataset.tabindex, r ? e.setAttribute("tabindex", r) : e.removeAttribute("tabindex");
1
+ import { FloatingRootStore as e } from "./index377.js";
2
+ import { PopupTriggerMap as n } from "./index281.js";
3
+ function r() {
4
+ return new e({
5
+ open: !1,
6
+ transitionStatus: void 0,
7
+ floatingElement: null,
8
+ referenceElement: null,
9
+ triggerElements: new n(),
10
+ floatingId: void 0,
11
+ syncOnly: !1,
12
+ nested: !1,
13
+ onOpenChange: void 0
129
14
  });
130
15
  }
131
16
  export {
132
- H as disableFocusInside,
133
- W as enableFocusInside,
134
- w as focusable,
135
- P as getNextTabbable,
136
- V as getPreviousTabbable,
137
- j as isOutsideEvent,
138
- M as isTabbable,
139
- g as tabbable
17
+ r as getEmptyRootContext
140
18
  };
141
19
  //# sourceMappingURL=index380.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index380.js","sources":["../node_modules/@base-ui/react/floating-ui-react/utils/tabbable.mjs"],"sourcesContent":["import { getComputedStyle, getNodeName, isHTMLElement, isShadowRoot } from '@floating-ui/utils/dom';\nimport { ownerDocument } from '@base-ui/utils/owner';\nimport { activeElement, contains } from \"./element.mjs\";\nimport { isElementVisible } from \"./composite.mjs\";\nconst CANDIDATE_SELECTOR = 'a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable=\"false\"]),audio[controls],video[controls]';\nfunction getParentElement(element) {\n const assignedSlot = element.assignedSlot;\n if (assignedSlot) {\n return assignedSlot;\n }\n if (element.parentElement) {\n return element.parentElement;\n }\n const rootNode = element.getRootNode();\n return isShadowRoot(rootNode) ? rootNode.host : null;\n}\nfunction getDetailsSummary(details) {\n for (const child of Array.from(details.children)) {\n if (getNodeName(child) === 'summary') {\n return child;\n }\n }\n return null;\n}\nfunction isWithinOpenDetailsSummary(element, details) {\n const summary = getDetailsSummary(details);\n return !!summary && (element === summary || contains(summary, element));\n}\nfunction isFocusableCandidate(element) {\n const nodeName = element ? getNodeName(element) : '';\n return element != null && element.matches(CANDIDATE_SELECTOR) && (nodeName !== 'summary' || element.parentElement != null && getNodeName(element.parentElement) === 'details' && getDetailsSummary(element.parentElement) === element) && (nodeName !== 'details' || getDetailsSummary(element) == null) && (nodeName !== 'input' || element.type !== 'hidden');\n}\nfunction isFocusableElement(element) {\n if (!isFocusableCandidate(element) || !element.isConnected || element.matches(':disabled')) {\n return false;\n }\n for (let current = element; current; current = getParentElement(current)) {\n const isAncestor = current !== element;\n const isSlot = getNodeName(current) === 'slot';\n if (current.hasAttribute('inert')) {\n return false;\n }\n if (isAncestor && getNodeName(current) === 'details' && !current.open && !isWithinOpenDetailsSummary(element, current) || current.hasAttribute('hidden') || !isSlot && !isVisibleInTabbableTree(current, isAncestor)) {\n return false;\n }\n }\n return true;\n}\nfunction isVisibleInTabbableTree(element, isAncestor) {\n const styles = getComputedStyle(element);\n if (!isAncestor) {\n return isElementVisible(element, styles);\n }\n return styles.display !== 'none';\n}\nfunction getTabIndex(element) {\n const tabIndex = element.tabIndex;\n if (tabIndex < 0) {\n const nodeName = getNodeName(element);\n if (nodeName === 'details' || nodeName === 'audio' || nodeName === 'video' || isHTMLElement(element) && element.isContentEditable) {\n return 0;\n }\n }\n return tabIndex;\n}\nfunction getNamedRadioInput(element) {\n if (getNodeName(element) !== 'input') {\n return null;\n }\n const input = element;\n return input.type === 'radio' && input.name !== '' ? input : null;\n}\nfunction isTabbableRadio(element, candidates) {\n const input = getNamedRadioInput(element);\n if (!input) {\n return true;\n }\n const checkedRadio = candidates.find(candidate => {\n const radio = getNamedRadioInput(candidate);\n return radio?.name === input.name && radio.form === input.form && radio.checked;\n });\n if (checkedRadio) {\n return checkedRadio === input;\n }\n return candidates.find(candidate => {\n const radio = getNamedRadioInput(candidate);\n return radio?.name === input.name && radio.form === input.form;\n }) === input;\n}\nfunction getComposedChildren(container) {\n if (isHTMLElement(container) && getNodeName(container) === 'slot') {\n const assignedElements = container.assignedElements({\n flatten: true\n });\n if (assignedElements.length > 0) {\n return assignedElements;\n }\n }\n if (isHTMLElement(container) && container.shadowRoot) {\n return Array.from(container.shadowRoot.children);\n }\n return Array.from(container.children);\n}\nfunction appendCandidates(container, list) {\n getComposedChildren(container).forEach(child => {\n if (isFocusableCandidate(child)) {\n list.push(child);\n }\n appendCandidates(child, list);\n });\n}\nfunction appendMatchingElements(container, selector, list) {\n getComposedChildren(container).forEach(child => {\n if (isHTMLElement(child) && child.matches(selector)) {\n list.push(child);\n }\n appendMatchingElements(child, selector, list);\n });\n}\nexport function isTabbable(element) {\n return isFocusableElement(element) && getTabIndex(element) >= 0;\n}\nexport function focusable(container) {\n const candidates = [];\n appendCandidates(container, candidates);\n return candidates.filter(isFocusableElement);\n}\nexport function tabbable(container) {\n const candidates = focusable(container);\n return candidates.filter(element => getTabIndex(element) >= 0 && isTabbableRadio(element, candidates));\n}\nfunction getTabbableIn(container, dir) {\n const list = tabbable(container);\n const len = list.length;\n if (len === 0) {\n return undefined;\n }\n const active = activeElement(ownerDocument(container));\n const index = list.indexOf(active);\n // eslint-disable-next-line no-nested-ternary\n const nextIndex = index === -1 ? dir === 1 ? 0 : len - 1 : index + dir;\n return list[nextIndex];\n}\nexport function getNextTabbable(referenceElement) {\n return getTabbableIn(ownerDocument(referenceElement).body, 1) || referenceElement;\n}\nexport function getPreviousTabbable(referenceElement) {\n return getTabbableIn(ownerDocument(referenceElement).body, -1) || referenceElement;\n}\nfunction getTabbableNearElement(referenceElement, dir) {\n if (!referenceElement) {\n return null;\n }\n const list = tabbable(ownerDocument(referenceElement).body);\n const elementCount = list.length;\n if (elementCount === 0) {\n return null;\n }\n const index = list.indexOf(referenceElement);\n if (index === -1) {\n return null;\n }\n const nextIndex = (index + dir + elementCount) % elementCount;\n return list[nextIndex];\n}\nexport function getTabbableAfterElement(referenceElement) {\n return getTabbableNearElement(referenceElement, 1);\n}\nexport function getTabbableBeforeElement(referenceElement) {\n return getTabbableNearElement(referenceElement, -1);\n}\nexport function isOutsideEvent(event, container) {\n const containerElement = container || event.currentTarget;\n const relatedTarget = event.relatedTarget;\n return !relatedTarget || !contains(containerElement, relatedTarget);\n}\nexport function disableFocusInside(container) {\n const tabbableElements = tabbable(container);\n tabbableElements.forEach(element => {\n element.dataset.tabindex = element.getAttribute('tabindex') || '';\n element.setAttribute('tabindex', '-1');\n });\n}\nexport function enableFocusInside(container) {\n const elements = [];\n appendMatchingElements(container, '[data-tabindex]', elements);\n elements.forEach(element => {\n const tabindex = element.dataset.tabindex;\n delete element.dataset.tabindex;\n if (tabindex) {\n element.setAttribute('tabindex', tabindex);\n } else {\n element.removeAttribute('tabindex');\n }\n });\n}"],"names":["CANDIDATE_SELECTOR","getParentElement","element","assignedSlot","rootNode","isShadowRoot","getDetailsSummary","details","child","getNodeName","isWithinOpenDetailsSummary","summary","contains","isFocusableCandidate","nodeName","isFocusableElement","current","isAncestor","isSlot","isVisibleInTabbableTree","styles","getComputedStyle","isElementVisible","getTabIndex","tabIndex","isHTMLElement","getNamedRadioInput","input","isTabbableRadio","candidates","checkedRadio","candidate","radio","getComposedChildren","container","assignedElements","appendCandidates","list","appendMatchingElements","selector","isTabbable","focusable","tabbable","getTabbableIn","dir","len","active","activeElement","ownerDocument","index","nextIndex","getNextTabbable","referenceElement","getPreviousTabbable","isOutsideEvent","event","containerElement","relatedTarget","disableFocusInside","enableFocusInside","elements","tabindex"],"mappings":";;;;AAIA,MAAMA,IAAqB;AAC3B,SAASC,EAAiBC,GAAS;AACjC,QAAMC,IAAeD,EAAQ;AAC7B,MAAIC;AACF,WAAOA;AAET,MAAID,EAAQ;AACV,WAAOA,EAAQ;AAEjB,QAAME,IAAWF,EAAQ,YAAW;AACpC,SAAOG,EAAaD,CAAQ,IAAIA,EAAS,OAAO;AAClD;AACA,SAASE,EAAkBC,GAAS;AAClC,aAAWC,KAAS,MAAM,KAAKD,EAAQ,QAAQ;AAC7C,QAAIE,EAAYD,CAAK,MAAM;AACzB,aAAOA;AAGX,SAAO;AACT;AACA,SAASE,EAA2BR,GAASK,GAAS;AACpD,QAAMI,IAAUL,EAAkBC,CAAO;AACzC,SAAO,CAAC,CAACI,MAAYT,MAAYS,KAAWC,EAASD,GAAST,CAAO;AACvE;AACA,SAASW,EAAqBX,GAAS;AACrC,QAAMY,IAAWZ,IAAUO,EAAYP,CAAO,IAAI;AAClD,SAAOA,KAAW,QAAQA,EAAQ,QAAQF,CAAkB,MAAMc,MAAa,aAAaZ,EAAQ,iBAAiB,QAAQO,EAAYP,EAAQ,aAAa,MAAM,aAAaI,EAAkBJ,EAAQ,aAAa,MAAMA,OAAaY,MAAa,aAAaR,EAAkBJ,CAAO,KAAK,UAAUY,MAAa,WAAWZ,EAAQ,SAAS;AACxV;AACA,SAASa,EAAmBb,GAAS;AACnC,MAAI,CAACW,EAAqBX,CAAO,KAAK,CAACA,EAAQ,eAAeA,EAAQ,QAAQ,WAAW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file":"index380.js","sources":["../../../node_modules/@base-ui/react/floating-ui-react/utils/getEmptyRootContext.mjs"],"sourcesContent":["import { PopupTriggerMap } from \"../../utils/popups/index.mjs\";\nimport { FloatingRootStore } from \"../components/FloatingRootStore.mjs\";\nexport function getEmptyRootContext() {\n return new FloatingRootStore({\n open: false,\n transitionStatus: undefined,\n floatingElement: null,\n referenceElement: null,\n triggerElements: new PopupTriggerMap(),\n floatingId: undefined,\n syncOnly: false,\n nested: false,\n onOpenChange: undefined\n });\n}"],"names":["getEmptyRootContext","FloatingRootStore","PopupTriggerMap"],"mappings":";;AAEO,SAASA,IAAsB;AACpC,SAAO,IAAIC,EAAkB;AAAA,IAC3B,MAAM;AAAA,IACN,kBAAkB;AAAA,IAClB,iBAAiB;AAAA,IACjB,kBAAkB;AAAA,IAClB,iBAAiB,IAAIC,EAAe;AAAA,IACpC,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,QAAQ;AAAA,IACR,cAAc;AAAA,EAClB,CAAG;AACH;","x_google_ignoreList":[0]}
package/dist/index381.js CHANGED
@@ -1,16 +1,127 @@
1
- function c(r, d, e = !0) {
2
- return r.filter((t) => t.parentId === d).flatMap((t) => [...!e || t.context?.open ? [t] : [], ...c(r, t.id, e)]);
1
+ import { getWindow as d, isOverflowElement as m } from "./index270.js";
2
+ import { addEventListener as T } from "./index322.js";
3
+ import { ownerDocument as a } from "./index306.js";
4
+ import { useIsoLayoutEffect as E } from "./index273.js";
5
+ import { Timeout as k } from "./index307.js";
6
+ import { AnimationFrame as H } from "./index323.js";
7
+ import { NOOP as z } from "./index258.js";
8
+ import { ios as j } from "./index278.js";
9
+ import { webkit as F } from "./index331.js";
10
+ let Y = {}, C = {}, L = "";
11
+ function R(s) {
12
+ if (typeof document > "u")
13
+ return !1;
14
+ const e = a(s);
15
+ return d(e).innerWidth - e.documentElement.clientWidth > 0;
3
16
  }
4
- function o(r, d) {
5
- let e = [], n = r.find((t) => t.id === d)?.parentId;
6
- for (; n; ) {
7
- const t = r.find((i) => i.id === n);
8
- n = t?.parentId, t && (e = e.concat(t));
17
+ function V(s) {
18
+ if (!(typeof CSS < "u" && CSS.supports && CSS.supports("scrollbar-gutter", "stable")) || typeof document > "u")
19
+ return !1;
20
+ const t = a(s), o = t.documentElement, l = t.body, r = m(o) ? o : l, i = r.style.overflowY, c = o.style.scrollbarGutter;
21
+ o.style.scrollbarGutter = "stable", r.style.overflowY = "scroll";
22
+ const u = r.offsetWidth;
23
+ r.style.overflowY = "hidden";
24
+ const f = r.offsetWidth;
25
+ return r.style.overflowY = i, o.style.scrollbarGutter = c, u === f;
26
+ }
27
+ function q(s) {
28
+ const e = a(s), t = e.documentElement, o = e.body, l = m(t) ? t : o, r = {
29
+ overflowY: l.style.overflowY,
30
+ overflowX: l.style.overflowX
31
+ };
32
+ return Object.assign(l.style, {
33
+ overflowY: "hidden",
34
+ overflowX: "hidden"
35
+ }), () => {
36
+ Object.assign(l.style, r);
37
+ };
38
+ }
39
+ function A(s) {
40
+ const e = a(s), t = e.documentElement, o = e.body, l = d(t);
41
+ let r = 0, i = 0, c = !1;
42
+ const u = H.create();
43
+ if (F && (l.visualViewport?.scale ?? 1) !== 1)
44
+ return () => {
45
+ };
46
+ function f() {
47
+ const h = l.getComputedStyle(t), n = l.getComputedStyle(o), v = (h.scrollbarGutter || "").includes("both-edges") ? "stable both-edges" : "stable";
48
+ r = t.scrollTop, i = t.scrollLeft, Y = {
49
+ scrollbarGutter: t.style.scrollbarGutter,
50
+ overflowY: t.style.overflowY,
51
+ overflowX: t.style.overflowX
52
+ }, L = t.style.scrollBehavior, C = {
53
+ position: o.style.position,
54
+ height: o.style.height,
55
+ width: o.style.width,
56
+ boxSizing: o.style.boxSizing,
57
+ overflowY: o.style.overflowY,
58
+ overflowX: o.style.overflowX,
59
+ scrollBehavior: o.style.scrollBehavior
60
+ };
61
+ const G = t.scrollHeight > t.clientHeight, B = t.scrollWidth > t.clientWidth, W = h.overflowY === "scroll" || n.overflowY === "scroll", x = h.overflowX === "scroll" || n.overflowX === "scroll", b = Math.max(0, l.innerWidth - o.clientWidth), w = Math.max(0, l.innerHeight - o.clientHeight), p = parseFloat(n.marginTop) + parseFloat(n.marginBottom), g = parseFloat(n.marginLeft) + parseFloat(n.marginRight), S = m(t) ? t : o;
62
+ if (c = V(s), c) {
63
+ t.style.scrollbarGutter = v, S.style.overflowY = "hidden", S.style.overflowX = "hidden";
64
+ return;
65
+ }
66
+ Object.assign(t.style, {
67
+ scrollbarGutter: v,
68
+ overflowY: "hidden",
69
+ overflowX: "hidden"
70
+ }), (G || W) && (t.style.overflowY = "scroll"), (B || x) && (t.style.overflowX = "scroll"), Object.assign(o.style, {
71
+ position: "relative",
72
+ height: p || w ? `calc(100dvh - ${p + w}px)` : "100dvh",
73
+ width: g || b ? `calc(100vw - ${g + b}px)` : "100vw",
74
+ boxSizing: "border-box",
75
+ overflow: "hidden",
76
+ scrollBehavior: "unset"
77
+ }), o.scrollTop = r, o.scrollLeft = i, t.setAttribute("data-base-ui-scroll-locked", ""), t.style.scrollBehavior = "unset";
78
+ }
79
+ function y() {
80
+ Object.assign(t.style, Y), Object.assign(o.style, C), c || (t.scrollTop = r, t.scrollLeft = i, t.removeAttribute("data-base-ui-scroll-locked"), t.style.scrollBehavior = L);
81
+ }
82
+ function O() {
83
+ y(), u.request(f);
9
84
  }
10
- return e;
85
+ f();
86
+ const X = T(l, "resize", O);
87
+ return () => {
88
+ u.cancel(), y(), typeof l.removeEventListener == "function" && X();
89
+ };
90
+ }
91
+ class I {
92
+ lockCount = 0;
93
+ restore = null;
94
+ timeoutLock = k.create();
95
+ timeoutUnlock = k.create();
96
+ acquire(e) {
97
+ return this.lockCount += 1, this.lockCount === 1 && this.restore === null && this.timeoutLock.start(0, () => this.lock(e)), this.release;
98
+ }
99
+ release = () => {
100
+ this.lockCount -= 1, this.lockCount === 0 && this.restore && this.timeoutUnlock.start(0, this.unlock);
101
+ };
102
+ unlock = () => {
103
+ this.lockCount === 0 && this.restore && (this.restore?.(), this.restore = null);
104
+ };
105
+ lock(e) {
106
+ if (this.lockCount === 0 || this.restore !== null)
107
+ return;
108
+ const o = a(e).documentElement, l = d(o).getComputedStyle(o).overflowY;
109
+ if (l === "hidden" || l === "clip") {
110
+ this.restore = z;
111
+ return;
112
+ }
113
+ const r = j || !R(e);
114
+ this.restore = r ? q(e) : A(e);
115
+ }
116
+ }
117
+ const M = new I();
118
+ function ot(s = !0, e = null) {
119
+ E(() => {
120
+ if (s)
121
+ return M.acquire(e);
122
+ }, [s, e]);
11
123
  }
12
124
  export {
13
- o as getNodeAncestors,
14
- c as getNodeChildren
125
+ ot as useScrollLock
15
126
  };
16
127
  //# sourceMappingURL=index381.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index381.js","sources":["../node_modules/@base-ui/react/floating-ui-react/utils/nodes.mjs"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-loop-func */\n\nexport function getNodeChildren(nodes, id, onlyOpenChildren = true) {\n const directChildren = nodes.filter(node => node.parentId === id);\n return directChildren.flatMap(child => [...(!onlyOpenChildren || child.context?.open ? [child] : []), ...getNodeChildren(nodes, child.id, onlyOpenChildren)]);\n}\nexport function getDeepestNode(nodes, id) {\n let deepestNodeId;\n let maxDepth = -1;\n function findDeepest(nodeId, depth) {\n if (depth > maxDepth) {\n deepestNodeId = nodeId;\n maxDepth = depth;\n }\n const children = getNodeChildren(nodes, nodeId);\n children.forEach(child => {\n findDeepest(child.id, depth + 1);\n });\n }\n findDeepest(id, 0);\n return nodes.find(node => node.id === deepestNodeId);\n}\nexport function getNodeAncestors(nodes, id) {\n let allAncestors = [];\n let currentParentId = nodes.find(node => node.id === id)?.parentId;\n while (currentParentId) {\n const currentNode = nodes.find(node => node.id === currentParentId);\n currentParentId = currentNode?.parentId;\n if (currentNode) {\n allAncestors = allAncestors.concat(currentNode);\n }\n }\n return allAncestors;\n}"],"names":["getNodeChildren","nodes","id","onlyOpenChildren","node","child","getNodeAncestors","allAncestors","currentParentId","currentNode"],"mappings":"AAEO,SAASA,EAAgBC,GAAOC,GAAIC,IAAmB,IAAM;AAElE,SADuBF,EAAM,OAAO,CAAAG,MAAQA,EAAK,aAAaF,CAAE,EAC1C,QAAQ,CAAAG,MAAS,CAAC,GAAI,CAACF,KAAoBE,EAAM,SAAS,OAAO,CAACA,CAAK,IAAI,CAAA,GAAK,GAAGL,EAAgBC,GAAOI,EAAM,IAAIF,CAAgB,CAAC,CAAC;AAC9J;AAiBO,SAASG,EAAiBL,GAAOC,GAAI;AAC1C,MAAIK,IAAe,CAAA,GACfC,IAAkBP,EAAM,KAAK,CAAAG,MAAQA,EAAK,OAAOF,CAAE,GAAG;AAC1D,SAAOM,KAAiB;AACtB,UAAMC,IAAcR,EAAM,KAAK,CAAAG,MAAQA,EAAK,OAAOI,CAAe;AAClE,IAAAA,IAAkBC,GAAa,UAC3BA,MACFF,IAAeA,EAAa,OAAOE,CAAW;AAAA,EAElD;AACA,SAAOF;AACT;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index381.js","sources":["../../../node_modules/@base-ui/utils/useScrollLock.mjs"],"sourcesContent":["'use client';\n\nimport { isOverflowElement } from '@floating-ui/utils/dom';\nimport { addEventListener } from \"./addEventListener.mjs\";\nimport { platform } from \"./platform/index.mjs\";\nimport { ownerDocument, ownerWindow } from \"./owner.mjs\";\nimport { useIsoLayoutEffect } from \"./useIsoLayoutEffect.mjs\";\nimport { Timeout } from \"./useTimeout.mjs\";\nimport { AnimationFrame } from \"./useAnimationFrame.mjs\";\nimport { NOOP } from \"./empty.mjs\";\nlet originalHtmlStyles = {};\nlet originalBodyStyles = {};\nlet originalHtmlScrollBehavior = '';\nfunction hasInsetScrollbars(referenceElement) {\n if (typeof document === 'undefined') {\n return false;\n }\n const doc = ownerDocument(referenceElement);\n const win = ownerWindow(doc);\n return win.innerWidth - doc.documentElement.clientWidth > 0;\n}\nfunction supportsStableScrollbarGutter(referenceElement) {\n const supported = typeof CSS !== 'undefined' && CSS.supports && CSS.supports('scrollbar-gutter', 'stable');\n if (!supported || typeof document === 'undefined') {\n return false;\n }\n const doc = ownerDocument(referenceElement);\n const html = doc.documentElement;\n const body = doc.body;\n const scrollContainer = isOverflowElement(html) ? html : body;\n const originalScrollContainerOverflowY = scrollContainer.style.overflowY;\n const originalHtmlStyleGutter = html.style.scrollbarGutter;\n html.style.scrollbarGutter = 'stable';\n scrollContainer.style.overflowY = 'scroll';\n const before = scrollContainer.offsetWidth;\n scrollContainer.style.overflowY = 'hidden';\n const after = scrollContainer.offsetWidth;\n scrollContainer.style.overflowY = originalScrollContainerOverflowY;\n html.style.scrollbarGutter = originalHtmlStyleGutter;\n return before === after;\n}\nfunction preventScrollOverlayScrollbars(referenceElement) {\n const doc = ownerDocument(referenceElement);\n const html = doc.documentElement;\n const body = doc.body;\n\n // If an `overflow` style is present on <html>, we need to lock it, because a lock on <body>\n // won't have any effect.\n // But if <body> has an `overflow` style (like `overflow-x: hidden`), we need to lock it\n // instead, as sticky elements shift otherwise.\n const elementToLock = isOverflowElement(html) ? html : body;\n const originalElementToLockStyles = {\n overflowY: elementToLock.style.overflowY,\n overflowX: elementToLock.style.overflowX\n };\n Object.assign(elementToLock.style, {\n overflowY: 'hidden',\n overflowX: 'hidden'\n });\n return () => {\n Object.assign(elementToLock.style, originalElementToLockStyles);\n };\n}\nfunction preventScrollInsetScrollbars(referenceElement) {\n const doc = ownerDocument(referenceElement);\n const html = doc.documentElement;\n const body = doc.body;\n const win = ownerWindow(html);\n let scrollTop = 0;\n let scrollLeft = 0;\n let updateGutterOnly = false;\n const resizeFrame = AnimationFrame.create();\n\n // Pinch-zoom in Safari causes a shift. Just don't lock scroll if there's any pinch-zoom.\n if (platform.engine.webkit && (win.visualViewport?.scale ?? 1) !== 1) {\n return () => {};\n }\n function lockScroll() {\n /* DOM reads: */\n\n const htmlStyles = win.getComputedStyle(html);\n const bodyStyles = win.getComputedStyle(body);\n const htmlScrollbarGutterValue = htmlStyles.scrollbarGutter || '';\n const hasBothEdges = htmlScrollbarGutterValue.includes('both-edges');\n const scrollbarGutterValue = hasBothEdges ? 'stable both-edges' : 'stable';\n scrollTop = html.scrollTop;\n scrollLeft = html.scrollLeft;\n originalHtmlStyles = {\n scrollbarGutter: html.style.scrollbarGutter,\n overflowY: html.style.overflowY,\n overflowX: html.style.overflowX\n };\n originalHtmlScrollBehavior = html.style.scrollBehavior;\n originalBodyStyles = {\n position: body.style.position,\n height: body.style.height,\n width: body.style.width,\n boxSizing: body.style.boxSizing,\n overflowY: body.style.overflowY,\n overflowX: body.style.overflowX,\n scrollBehavior: body.style.scrollBehavior\n };\n const isScrollableY = html.scrollHeight > html.clientHeight;\n const isScrollableX = html.scrollWidth > html.clientWidth;\n const hasConstantOverflowY = htmlStyles.overflowY === 'scroll' || bodyStyles.overflowY === 'scroll';\n const hasConstantOverflowX = htmlStyles.overflowX === 'scroll' || bodyStyles.overflowX === 'scroll';\n\n // Values can be negative in Firefox\n const scrollbarWidth = Math.max(0, win.innerWidth - body.clientWidth);\n const scrollbarHeight = Math.max(0, win.innerHeight - body.clientHeight);\n\n // Avoid shift due to the default <body> margin. This does cause elements to be clipped\n // with whitespace. Warn if <body> has margins?\n const marginY = parseFloat(bodyStyles.marginTop) + parseFloat(bodyStyles.marginBottom);\n const marginX = parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight);\n const elementToLock = isOverflowElement(html) ? html : body;\n updateGutterOnly = supportsStableScrollbarGutter(referenceElement);\n\n /*\n * DOM writes:\n * Do not read the DOM past this point!\n */\n\n if (updateGutterOnly) {\n html.style.scrollbarGutter = scrollbarGutterValue;\n elementToLock.style.overflowY = 'hidden';\n elementToLock.style.overflowX = 'hidden';\n return;\n }\n Object.assign(html.style, {\n scrollbarGutter: scrollbarGutterValue,\n overflowY: 'hidden',\n overflowX: 'hidden'\n });\n if (isScrollableY || hasConstantOverflowY) {\n html.style.overflowY = 'scroll';\n }\n if (isScrollableX || hasConstantOverflowX) {\n html.style.overflowX = 'scroll';\n }\n Object.assign(body.style, {\n position: 'relative',\n height: marginY || scrollbarHeight ? `calc(100dvh - ${marginY + scrollbarHeight}px)` : '100dvh',\n width: marginX || scrollbarWidth ? `calc(100vw - ${marginX + scrollbarWidth}px)` : '100vw',\n boxSizing: 'border-box',\n overflow: 'hidden',\n scrollBehavior: 'unset'\n });\n body.scrollTop = scrollTop;\n body.scrollLeft = scrollLeft;\n html.setAttribute('data-base-ui-scroll-locked', '');\n html.style.scrollBehavior = 'unset';\n }\n function cleanup() {\n Object.assign(html.style, originalHtmlStyles);\n Object.assign(body.style, originalBodyStyles);\n if (!updateGutterOnly) {\n html.scrollTop = scrollTop;\n html.scrollLeft = scrollLeft;\n html.removeAttribute('data-base-ui-scroll-locked');\n html.style.scrollBehavior = originalHtmlScrollBehavior;\n }\n }\n function handleResize() {\n cleanup();\n resizeFrame.request(lockScroll);\n }\n lockScroll();\n const unsubscribeResize = addEventListener(win, 'resize', handleResize);\n return () => {\n resizeFrame.cancel();\n cleanup();\n // Sometimes this cleanup can run after test teardown because it is called\n // in a `setTimeout(fn, 0)`. Guard the returned cleanup to avoid calling\n // `removeEventListener` when it is no longer available in tests.\n if (typeof win.removeEventListener === 'function') {\n unsubscribeResize();\n }\n };\n}\nclass ScrollLocker {\n lockCount = 0;\n restore = null;\n timeoutLock = Timeout.create();\n timeoutUnlock = Timeout.create();\n acquire(referenceElement) {\n this.lockCount += 1;\n if (this.lockCount === 1 && this.restore === null) {\n this.timeoutLock.start(0, () => this.lock(referenceElement));\n }\n return this.release;\n }\n release = () => {\n this.lockCount -= 1;\n if (this.lockCount === 0 && this.restore) {\n this.timeoutUnlock.start(0, this.unlock);\n }\n };\n unlock = () => {\n if (this.lockCount === 0 && this.restore) {\n this.restore?.();\n this.restore = null;\n }\n };\n lock(referenceElement) {\n if (this.lockCount === 0 || this.restore !== null) {\n return;\n }\n const doc = ownerDocument(referenceElement);\n const html = doc.documentElement;\n const htmlOverflowY = ownerWindow(html).getComputedStyle(html).overflowY;\n\n // If the site author already hid overflow on <html>, respect it and bail out.\n if (htmlOverflowY === 'hidden' || htmlOverflowY === 'clip') {\n this.restore = NOOP;\n return;\n }\n const hasOverlayScrollbars = platform.os.ios || !hasInsetScrollbars(referenceElement);\n\n // On iOS, scroll locking does not work if the navbar is collapsed. Due to numerous\n // side effects and bugs that arise on iOS, it must be researched extensively before\n // being enabled to ensure it doesn't cause the following issues:\n // - Textboxes must scroll into view when focused, nor cause a glitchy scroll animation.\n // - The navbar must not force itself into view and cause layout shift.\n // - Scroll containers must not flicker upon closing a popup when it has an exit animation.\n this.restore = hasOverlayScrollbars ? preventScrollOverlayScrollbars(referenceElement) : preventScrollInsetScrollbars(referenceElement);\n }\n}\nconst SCROLL_LOCKER = new ScrollLocker();\n\n/**\n * Locks the scroll of the document when enabled.\n *\n * @param enabled - Whether to enable the scroll lock.\n * @param referenceElement - Element to use as a reference for lock calculations.\n */\nexport function useScrollLock(enabled = true, referenceElement = null) {\n useIsoLayoutEffect(() => {\n if (!enabled) {\n return undefined;\n }\n return SCROLL_LOCKER.acquire(referenceElement);\n }, [enabled, referenceElement]);\n}"],"names":["originalHtmlStyles","originalBodyStyles","originalHtmlScrollBehavior","hasInsetScrollbars","referenceElement","doc","ownerDocument","ownerWindow","supportsStableScrollbarGutter","html","body","scrollContainer","isOverflowElement","originalScrollContainerOverflowY","originalHtmlStyleGutter","before","after","preventScrollOverlayScrollbars","elementToLock","originalElementToLockStyles","preventScrollInsetScrollbars","win","scrollTop","scrollLeft","updateGutterOnly","resizeFrame","AnimationFrame","platform.engine.webkit","lockScroll","htmlStyles","bodyStyles","scrollbarGutterValue","isScrollableY","isScrollableX","hasConstantOverflowY","hasConstantOverflowX","scrollbarWidth","scrollbarHeight","marginY","marginX","cleanup","handleResize","unsubscribeResize","addEventListener","ScrollLocker","Timeout","htmlOverflowY","NOOP","hasOverlayScrollbars","platform.os.ios","SCROLL_LOCKER","useScrollLock","enabled","useIsoLayoutEffect"],"mappings":";;;;;;;;;AAUA,IAAIA,IA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index334.js";
2
- function a(t, i) {
3
- return i < 0 || i >= t.length;
4
- }
5
- function b(t, i) {
6
- return o(t.current, {
7
- disabledIndices: i
8
- });
9
- }
10
- function p(t, i) {
11
- return o(t.current, {
12
- decrement: !0,
13
- startingIndex: t.current.length,
14
- disabledIndices: i
15
- });
16
- }
17
- function o(t, {
18
- startingIndex: i = -1,
19
- decrement: e = !1,
20
- disabledIndices: u,
21
- amount: n = 1
22
- } = {}) {
23
- let r = i;
24
- do
25
- r += e ? -n : n;
26
- while (r >= 0 && r <= t.length - 1 && f(t, r, u));
27
- return r;
28
- }
29
- function f(t, i, e) {
30
- if (typeof e == "function" ? e(i) : e?.includes(i) ?? !1)
31
- return !0;
32
- const n = t[i];
33
- return n ? l(n) ? !e && (n.hasAttribute("disabled") || n.getAttribute("aria-disabled") === "true") : !0 : !1;
34
- }
35
- function s(t) {
36
- return t.visibility === "hidden" || t.visibility === "collapse";
37
- }
38
- function l(t, i = t ? c(t) : null) {
39
- return !t || !t.isConnected || !i || s(i) ? !1 : typeof t.checkVisibility == "function" ? t.checkVisibility() : i.display !== "none" && i.display !== "contents";
40
- }
1
+ let a = /* @__PURE__ */ (function(d) {
2
+ return d.disabled = "data-disabled", d.valid = "data-valid", d.invalid = "data-invalid", d.touched = "data-touched", d.dirty = "data-dirty", d.filled = "data-filled", d.focused = "data-focused", d;
3
+ })({});
41
4
  export {
42
- o as findNonDisabledListIndex,
43
- p as getMaxListIndex,
44
- b as getMinListIndex,
45
- l as isElementVisible,
46
- s as isHiddenByStyles,
47
- a as isIndexOutOfListBounds,
48
- f as isListIndexDisabled
5
+ a as FieldControlDataAttributes
49
6
  };
50
7
  //# sourceMappingURL=index382.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index382.js","sources":["../node_modules/@base-ui/react/floating-ui-react/utils/composite.mjs"],"sourcesContent":["import { floor } from '@floating-ui/utils';\nimport { getComputedStyle } from '@floating-ui/utils/dom';\nimport { stopEvent } from \"./event.mjs\";\nimport { ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT, ARROW_UP } from \"./constants.mjs\";\nexport function isDifferentGridRow(index, cols, prevRow) {\n return Math.floor(index / cols) !== prevRow;\n}\nexport function isIndexOutOfListBounds(list, index) {\n return index < 0 || index >= list.length;\n}\nexport function getMinListIndex(listRef, disabledIndices) {\n return findNonDisabledListIndex(listRef.current, {\n disabledIndices\n });\n}\nexport function getMaxListIndex(listRef, disabledIndices) {\n return findNonDisabledListIndex(listRef.current, {\n decrement: true,\n startingIndex: listRef.current.length,\n disabledIndices\n });\n}\nexport function findNonDisabledListIndex(list, {\n startingIndex = -1,\n decrement = false,\n disabledIndices,\n amount = 1\n} = {}) {\n let index = startingIndex;\n do {\n index += decrement ? -amount : amount;\n } while (index >= 0 && index <= list.length - 1 && isListIndexDisabled(list, index, disabledIndices));\n return index;\n}\nexport function getGridNavigatedIndex(list, {\n event,\n orientation,\n loopFocus,\n onLoop,\n rtl,\n cols,\n disabledIndices,\n minIndex,\n maxIndex,\n prevIndex,\n stopEvent: stop = false\n}) {\n let nextIndex = prevIndex;\n let verticalDirection;\n if (event.key === ARROW_UP) {\n verticalDirection = 'up';\n } else if (event.key === ARROW_DOWN) {\n verticalDirection = 'down';\n }\n if (verticalDirection) {\n // -------------------------------------------------------------------------\n // Detect row structure only when handling vertical navigation. This keeps\n // the non-vertical key paths free from row inference work.\n // -------------------------------------------------------------------------\n const rows = [];\n const rowIndexMap = [];\n let hasRoleRow = false;\n let visibleItemCount = 0;\n {\n let currentRowEl = null;\n let currentRowIndex = -1;\n list.forEach((el, idx) => {\n if (el == null) {\n return;\n }\n visibleItemCount += 1;\n const rowEl = el.closest('[role=\"row\"]');\n if (rowEl) {\n hasRoleRow = true;\n }\n if (rowEl !== currentRowEl || currentRowIndex === -1) {\n currentRowEl = rowEl;\n currentRowIndex += 1;\n rows[currentRowIndex] = [];\n }\n rows[currentRowIndex].push(idx);\n rowIndexMap[idx] = currentRowIndex;\n });\n }\n let hasDomRows = false;\n let inferredDomCols = 0;\n if (hasRoleRow) {\n for (const row of rows) {\n const rowLength = row.length;\n if (rowLength > inferredDomCols) {\n inferredDomCols = rowLength;\n }\n if (rowLength !== cols) {\n hasDomRows = true;\n }\n }\n }\n const hasVirtualizedGaps = hasDomRows && visibleItemCount < list.length;\n const verticalCols = inferredDomCols || cols;\n const navigateVertically = direction => {\n if (!hasDomRows || prevIndex === -1) {\n return undefined;\n }\n const currentRow = rowIndexMap[prevIndex];\n if (currentRow == null) {\n return undefined;\n }\n const colInRow = rows[currentRow].indexOf(prevIndex);\n const step = direction === 'up' ? -1 : 1;\n for (let nextRow = currentRow + step, i = 0; i < rows.length; i += 1, nextRow += step) {\n if (nextRow < 0 || nextRow >= rows.length) {\n if (!loopFocus || hasVirtualizedGaps) {\n return undefined;\n }\n nextRow = nextRow < 0 ? rows.length - 1 : 0;\n if (onLoop) {\n const clampedCol = Math.min(colInRow, rows[nextRow].length - 1);\n const targetItemIndex = rows[nextRow][clampedCol] ?? rows[nextRow][0];\n const returnedItemIndex = onLoop(event, prevIndex, targetItemIndex);\n nextRow = rowIndexMap[returnedItemIndex] ?? nextRow;\n }\n }\n const targetRow = rows[nextRow];\n for (let col = Math.min(colInRow, targetRow.length - 1); col >= 0; col -= 1) {\n const candidate = targetRow[col];\n if (!isListIndexDisabled(list, candidate, disabledIndices)) {\n return candidate;\n }\n }\n }\n return undefined;\n };\n const navigateVerticallyWithInferredRows = direction => {\n if (!hasVirtualizedGaps || prevIndex === -1) {\n return undefined;\n }\n const colInRow = prevIndex % verticalCols;\n const rowStep = direction === 'up' ? -verticalCols : verticalCols;\n const lastRowStart = maxIndex - maxIndex % verticalCols;\n const rowCount = floor(maxIndex / verticalCols) + 1;\n for (let rowStart = prevIndex - colInRow + rowStep, i = 0; i < rowCount; i += 1, rowStart += rowStep) {\n if (rowStart < 0 || rowStart > maxIndex) {\n if (!loopFocus) {\n return undefined;\n }\n rowStart = rowStart < 0 ? lastRowStart : 0;\n }\n const rowEnd = Math.min(rowStart + verticalCols - 1, maxIndex);\n for (let candidate = Math.min(rowStart + colInRow, rowEnd); candidate >= rowStart; candidate -= 1) {\n if (!isListIndexDisabled(list, candidate, disabledIndices)) {\n return candidate;\n }\n }\n }\n return undefined;\n };\n if (stop) {\n stopEvent(event);\n }\n const verticalCandidate = navigateVertically(verticalDirection) ?? navigateVerticallyWithInferredRows(verticalDirection);\n if (verticalCandidate !== undefined) {\n nextIndex = verticalCandidate;\n } else if (prevIndex === -1) {\n nextIndex = verticalDirection === 'up' ? maxIndex : minIndex;\n } else {\n nextIndex = findNonDisabledListIndex(list, {\n startingIndex: prevIndex,\n amount: verticalCols,\n decrement: verticalDirection === 'up',\n disabledIndices\n });\n if (loopFocus) {\n if (verticalDirection === 'up' && (prevIndex - verticalCols < minIndex || nextIndex < 0)) {\n const col = prevIndex % verticalCols;\n const maxCol = maxIndex % verticalCols;\n const offset = maxIndex - (maxCol - col);\n if (maxCol === col) {\n nextIndex = maxIndex;\n } else {\n nextIndex = maxCol > col ? offset : offset - verticalCols;\n }\n if (onLoop) {\n nextIndex = onLoop(event, prevIndex, nextIndex);\n }\n }\n if (verticalDirection === 'down' && prevIndex + verticalCols > maxIndex) {\n nextIndex = findNonDisabledListIndex(list, {\n startingIndex: prevIndex % verticalCols - verticalCols,\n amount: verticalCols,\n disabledIndices\n });\n if (onLoop) {\n nextIndex = onLoop(event, prevIndex, nextIndex);\n }\n }\n }\n }\n if (isIndexOutOfListBounds(list, nextIndex)) {\n nextIndex = prevIndex;\n }\n }\n\n // Remains on the same row/column.\n if (orientation === 'both') {\n const prevRow = floor(prevIndex / cols);\n if (event.key === (rtl ? ARROW_LEFT : ARROW_RIGHT)) {\n if (stop) {\n stopEvent(event);\n }\n if (prevIndex % cols !== cols - 1) {\n nextIndex = findNonDisabledListIndex(list, {\n startingIndex: prevIndex,\n disabledIndices\n });\n if (loopFocus && isDifferentGridRow(nextIndex, cols, prevRow)) {\n nextIndex = findNonDisabledListIndex(list, {\n startingIndex: prevIndex - prevIndex % cols - 1,\n disabledIndices\n });\n if (onLoop) {\n nextIndex = onLoop(event, prevIndex, nextIndex);\n }\n }\n } else if (loopFocus) {\n nextIndex = findNonDisabledListIndex(list, {\n startingIndex: prevIndex - prevIndex % cols - 1,\n disabledIndices\n });\n if (onLoop) {\n nextIndex = onLoop(event, prevIndex, nextIndex);\n }\n }\n if (isDifferentGridRow(nextIndex, cols, prevRow)) {\n nextIndex = prevIndex;\n }\n }\n if (event.key === (rtl ? ARROW_RIGHT : ARROW_LEFT)) {\n if (stop) {\n stopEvent(event);\n }\n if (prevIndex % cols !== 0) {\n nextIndex = findNonDisabledListIndex(list, {\n startingIndex: prevIndex,\n decrement: true,\n disabledIndices\n });\n if (loopFocus && isDifferentGridRow(nextIndex, cols, prevRow)) {\n nextIndex = findNonDisabledListIndex(list, {\n startingIndex: prevIndex + (cols - prevIndex % cols),\n decrement: true,\n disabledIndices\n });\n if (onLoop) {\n nextIndex = onLoop(event, prevIndex, nextIndex);\n }\n }\n } else if (loopFocus) {\n nextIndex = findNonDisabledListIndex(list, {\n startingIndex: prevIndex + (cols - prevIndex % cols),\n decrement: true,\n disabledIndices\n });\n if (onLoop) {\n nextIndex = onLoop(event, prevIndex, nextIndex);\n }\n }\n if (isDifferentGridRow(nextIndex, cols, prevRow)) {\n nextIndex = prevIndex;\n }\n }\n const lastRow = floor(maxIndex / cols) === prevRow;\n if (isIndexOutOfListBounds(list, nextIndex)) {\n if (loopFocus && lastRow) {\n nextIndex = event.key === (rtl ? ARROW_RIGHT : ARROW_LEFT) ? maxIndex : findNonDisabledListIndex(list, {\n startingIndex: prevIndex - prevIndex % cols - 1,\n disabledIndices\n });\n if (onLoop) {\n nextIndex = onLoop(event, prevIndex, nextIndex);\n }\n } else {\n nextIndex = prevIndex;\n }\n }\n }\n return nextIndex;\n}\n\n/** For each cell index, gets the item index that occupies that cell */\nexport function createGridCellMap(sizes, cols, dense) {\n const cellMap = [];\n let startIndex = 0;\n sizes.forEach(({\n width,\n height\n }, index) => {\n if (width > cols) {\n if (process.env.NODE_ENV !== 'production') {\n // TODO: fix mui/no-guarded-throw\n // eslint-disable-next-line mui/no-guarded-throw\n throw new Error(`[Floating UI]: Invalid grid - item width at index ${index} is greater than grid columns`);\n }\n }\n let itemPlaced = false;\n if (dense) {\n startIndex = 0;\n }\n while (!itemPlaced) {\n const targetCells = [];\n for (let i = 0; i < width; i += 1) {\n for (let j = 0; j < height; j += 1) {\n targetCells.push(startIndex + i + j * cols);\n }\n }\n if (startIndex % cols + width <= cols && targetCells.every(cell => cellMap[cell] == null)) {\n targetCells.forEach(cell => {\n cellMap[cell] = index;\n });\n itemPlaced = true;\n } else {\n startIndex += 1;\n }\n }\n });\n\n // convert into a non-sparse array\n return [...cellMap];\n}\n\n/** Gets cell index of an item's corner or -1 when index is -1. */\nexport function getGridCellIndexOfCorner(index, sizes, cellMap, cols, corner) {\n if (index === -1) {\n return -1;\n }\n const firstCellIndex = cellMap.indexOf(index);\n const sizeItem = sizes[index];\n switch (corner) {\n case 'tl':\n return firstCellIndex;\n case 'tr':\n if (!sizeItem) {\n return firstCellIndex;\n }\n return firstCellIndex + sizeItem.width - 1;\n case 'bl':\n if (!sizeItem) {\n return firstCellIndex;\n }\n return firstCellIndex + (sizeItem.height - 1) * cols;\n case 'br':\n return cellMap.lastIndexOf(index);\n default:\n return -1;\n }\n}\n\n/** Gets all cell indices that correspond to the specified indices */\nexport function getGridCellIndices(indices, cellMap) {\n return cellMap.flatMap((index, cellIndex) => indices.includes(index) ? [cellIndex] : []);\n}\nexport function isListIndexDisabled(list, index, disabledIndices) {\n const isExplicitlyDisabled = typeof disabledIndices === 'function' ? disabledIndices(index) : disabledIndices?.includes(index) ?? false;\n if (isExplicitlyDisabled) {\n return true;\n }\n const element = list[index];\n if (!element) {\n return false;\n }\n if (!isElementVisible(element)) {\n return true;\n }\n return !disabledIndices && (element.hasAttribute('disabled') || element.getAttribute('aria-disabled') === 'true');\n}\nexport function isHiddenByStyles(styles) {\n return styles.visibility === 'hidden' || styles.visibility === 'collapse';\n}\nexport function isElementVisible(element, styles = element ? getComputedStyle(element) : null) {\n if (!element || !element.isConnected || !styles || isHiddenByStyles(styles)) {\n return false;\n }\n if (typeof element.checkVisibility === 'function') {\n return element.checkVisibility();\n }\n return styles.display !== 'none' && styles.display !== 'contents';\n}"],"names":["isIndexOutOfListBounds","list","index","getMinListIndex","listRef","disabledIndices","findNonDisabledListIndex","getMaxListIndex","startingIndex","decrement","amount","isListIndexDisabled","element","isElementVisible","isHiddenByStyles","styles","getComputedStyle"],"mappings":";AAOO,SAASA,EAAuBC,GAAMC,GAAO;AAClD,SAAOA,IAAQ,KAAKA,KAASD,EAAK;AACpC;AACO,SAASE,EAAgBC,GAASC,GAAiB;AACxD,SAAOC,EAAyBF,EAAQ,SAAS;AAAA,IAC/C,iBAAAC;AAAA,EACJ,CAAG;AACH;AACO,SAASE,EAAgBH,GAASC,GAAiB;AACxD,SAAOC,EAAyBF,EAAQ,SAAS;AAAA,IAC/C,WAAW;AAAA,IACX,eAAeA,EAAQ,QAAQ;AAAA,IAC/B,iBAAAC;AAAA,EACJ,CAAG;AACH;AACO,SAASC,EAAyBL,GAAM;AAAA,EAC7C,eAAAO,IAAgB;AAAA,EAChB,WAAAC,IAAY;AAAA,EACZ,iBAAAJ;AAAA,EACA,QAAAK,IAAS;AACX,IAAI,IAAI;AACN,MAAIR,IAAQM;AACZ;AACE,IAAAN,KAASO,IAAY,CAACC,IAASA;AAAA,SACxBR,KAAS,KAAKA,KAASD,EAAK,SAAS,KAAKU,EAAoBV,GAAMC,GAAOG,CAAe;AACnG,SAAOH;AACT;AAuUO,SAASS,EAAoBV,GAAMC,GAAOG,GAAiB;AAEhE,MAD6B,OAAOA,KAAoB,aAAaA,EAAgBH,CAAK,IAAIG,GAAiB,SAASH,CAAK,KAAK;AAEhI,WAAO;AAET,QAAMU,IAAUX,EAAKC,CAAK;AAC1B,SAAKU,IAGAC,EAAiBD,CAAO,IAGtB,CAACP,MAAoBO,EAAQ,aAAa,UAAU,KAAKA,EAAQ,aAAa,eAAe,MAAM,UAFjG,KAHA;AAMX;AACO,SAASE,EAAiBC,GAAQ;AACvC,SAAOA,EAAO,eAAe,YAAYA,EAAO,eAAe;AACjE;AACO,SAASF,EAAiBD,GAASG,IAASH,IAAUI,EAAiBJ,CAAO,IAAI,MAAM;AAC7F,SAAI,CAACA,KAAW,CAACA,EAAQ,eAAe,CAACG,KAAUD,EAAiBC,CAAM,IACjE,KAEL,OAAOH,EAAQ,mBAAoB,aAC9BA,EAAQ,gBAAe,IAEzBG,EAAO,YAAY,UAAUA,EAAO,YAAY;AACzD;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index382.js","sources":["../../../node_modules/@base-ui/react/field/control/FieldControlDataAttributes.mjs"],"sourcesContent":["export let FieldControlDataAttributes = /*#__PURE__*/function (FieldControlDataAttributes) {\n /**\n * Present when the field is disabled.\n */\n FieldControlDataAttributes[\"disabled\"] = \"data-disabled\";\n /**\n * Present when the field is in a valid state.\n */\n FieldControlDataAttributes[\"valid\"] = \"data-valid\";\n /**\n * Present when the field is in an invalid state.\n */\n FieldControlDataAttributes[\"invalid\"] = \"data-invalid\";\n /**\n * Present when the field has been touched.\n */\n FieldControlDataAttributes[\"touched\"] = \"data-touched\";\n /**\n * Present when the field's value has changed.\n */\n FieldControlDataAttributes[\"dirty\"] = \"data-dirty\";\n /**\n * Present when the field is filled.\n */\n FieldControlDataAttributes[\"filled\"] = \"data-filled\";\n /**\n * Present when the field control is focused.\n */\n FieldControlDataAttributes[\"focused\"] = \"data-focused\";\n return FieldControlDataAttributes;\n}({});"],"names":["FieldControlDataAttributes"],"mappings":"AAAU,IAACA,IAA0C,0BAAUA,GAA4B;AAIzF,SAAAA,EAA2B,WAAc,iBAIzCA,EAA2B,QAAW,cAItCA,EAA2B,UAAa,gBAIxCA,EAA2B,UAAa,gBAIxCA,EAA2B,QAAW,cAItCA,EAA2B,SAAY,eAIvCA,EAA2B,UAAa,gBACjCA;AACT,GAAE,CAAA,CAAE;","x_google_ignoreList":[0]}
package/dist/index383.js CHANGED
@@ -1,7 +1,15 @@
1
- function e(t) {
2
- return `data-base-ui-${t}`;
1
+ function t(r) {
2
+ if (r == null)
3
+ return "";
4
+ if (typeof r == "string")
5
+ return r;
6
+ try {
7
+ return JSON.stringify(r);
8
+ } catch {
9
+ return String(r);
10
+ }
3
11
  }
4
12
  export {
5
- e as createAttribute
13
+ t as serializeValue
6
14
  };
7
15
  //# sourceMappingURL=index383.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index383.js","sources":["../node_modules/@base-ui/react/floating-ui-react/utils/createAttribute.mjs"],"sourcesContent":["export function createAttribute(name) {\n return `data-base-ui-${name}`;\n}"],"names":["createAttribute","name"],"mappings":"AAAO,SAASA,EAAgBC,GAAM;AACpC,SAAO,gBAAgBA,CAAI;AAC7B;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index383.js","sources":["../../../node_modules/@base-ui/react/internals/serializeValue.mjs"],"sourcesContent":["export function serializeValue(value) {\n if (value == null) {\n return '';\n }\n if (typeof value === 'string') {\n return value;\n }\n try {\n return JSON.stringify(value);\n } catch {\n return String(value);\n }\n}"],"names":["serializeValue","value"],"mappings":"AAAO,SAASA,EAAeC,GAAO;AACpC,MAAIA,KAAS;AACX,WAAO;AAET,MAAI,OAAOA,KAAU;AACnB,WAAOA;AAET,MAAI;AACF,WAAO,KAAK,UAAUA,CAAK;AAAA,EAC7B,QAAQ;AACN,WAAO,OAAOA,CAAK;AAAA,EACrB;AACF;","x_google_ignoreList":[0]}
package/dist/index384.js CHANGED
@@ -1,25 +1,9 @@
1
- import { NOOP as i } from "./index290.js";
2
- let e = 0;
3
- function s(c, o = {}) {
4
- const {
5
- preventScroll: u = !1,
6
- sync: a = !1,
7
- shouldFocus: r
8
- } = o;
9
- cancelAnimationFrame(e);
10
- function t() {
11
- r && !r() || c?.focus({
12
- preventScroll: u
13
- });
14
- }
15
- if (a)
16
- return t(), i;
17
- const n = requestAnimationFrame(t);
18
- return e = n, () => {
19
- e === n && (cancelAnimationFrame(n), e = 0);
20
- };
1
+ import * as o from "react";
2
+ const e = [];
3
+ function n(t) {
4
+ o.useEffect(t, e);
21
5
  }
22
6
  export {
23
- s as enqueueFocus
7
+ n as useOnMount
24
8
  };
25
9
  //# sourceMappingURL=index384.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index384.js","sources":["../node_modules/@base-ui/react/floating-ui-react/utils/enqueueFocus.mjs"],"sourcesContent":["import { NOOP } from '@base-ui/utils/empty';\nlet rafId = 0;\nexport function enqueueFocus(el, options = {}) {\n const {\n preventScroll = false,\n sync = false,\n shouldFocus\n } = options;\n cancelAnimationFrame(rafId);\n function exec() {\n if (shouldFocus && !shouldFocus()) {\n return;\n }\n el?.focus({\n preventScroll\n });\n }\n if (sync) {\n exec();\n return NOOP;\n }\n const currentRafId = requestAnimationFrame(exec);\n rafId = currentRafId;\n return () => {\n if (rafId === currentRafId) {\n cancelAnimationFrame(currentRafId);\n rafId = 0;\n }\n };\n}"],"names":["rafId","enqueueFocus","el","options","preventScroll","sync","shouldFocus","exec","NOOP","currentRafId"],"mappings":";AACA,IAAIA,IAAQ;AACL,SAASC,EAAaC,GAAIC,IAAU,IAAI;AAC7C,QAAM;AAAA,IACJ,eAAAC,IAAgB;AAAA,IAChB,MAAAC,IAAO;AAAA,IACP,aAAAC;AAAA,EACJ,IAAMH;AACJ,uBAAqBH,CAAK;AAC1B,WAASO,IAAO;AACd,IAAID,KAAe,CAACA,OAGpBJ,GAAI,MAAM;AAAA,MACR,eAAAE;AAAA,IACN,CAAK;AAAA,EACH;AACA,MAAIC;AACF,WAAAE,EAAI,GACGC;AAET,QAAMC,IAAe,sBAAsBF,CAAI;AAC/C,SAAAP,IAAQS,GACD,MAAM;AACX,IAAIT,MAAUS,MACZ,qBAAqBA,CAAY,GACjCT,IAAQ;AAAA,EAEZ;AACF;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index384.js","sources":["../../../node_modules/@base-ui/utils/useOnMount.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nconst EMPTY = [];\n\n/**\n * A React.useEffect equivalent that runs once, when the component is mounted.\n */\nexport function useOnMount(fn) {\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler -- no need to put `fn` in the dependency array\n /* eslint-disable react-hooks/exhaustive-deps */\n React.useEffect(fn, EMPTY);\n /* eslint-enable react-hooks/exhaustive-deps */\n}"],"names":["EMPTY","useOnMount","fn","React"],"mappings":";AAGA,MAAMA,IAAQ,CAAA;AAKP,SAASC,EAAWC,GAAI;AAG7B,EAAAC,EAAM,UAAUD,GAAIF,CAAK;AAE3B;","x_google_ignoreList":[0]}
package/dist/index385.js CHANGED
@@ -1,79 +1,6 @@
1
- import { isShadowRoot as C, getNodeName as y } from "./index334.js";
2
- import { ownerDocument as H } from "./index310.js";
3
- const d = {
4
- inert: /* @__PURE__ */ new WeakMap(),
5
- "aria-hidden": /* @__PURE__ */ new WeakMap()
6
- }, M = "data-base-ui-inert", k = {
7
- inert: /* @__PURE__ */ new WeakSet(),
8
- "aria-hidden": /* @__PURE__ */ new WeakSet()
9
- };
10
- let u = /* @__PURE__ */ new WeakMap(), p = 0;
11
- function O(t) {
12
- return k[t];
13
- }
14
- function T(t) {
15
- return t ? C(t) ? t.host : T(t.parentNode) : null;
16
- }
17
- const b = (t, n) => n.map((o) => {
18
- if (t.contains(o))
19
- return o;
20
- const a = T(o);
21
- return t.contains(a) ? a : null;
22
- }).filter((o) => o != null), V = (t) => {
23
- const n = /* @__PURE__ */ new Set();
24
- return t.forEach((o) => {
25
- let a = o;
26
- for (; a && !n.has(a); )
27
- n.add(a), a = a.parentNode;
28
- }), n;
29
- }, N = (t, n, o) => {
30
- const a = [], c = (r) => {
31
- !r || o.has(r) || Array.from(r.children).forEach((s) => {
32
- y(s) !== "script" && (n.has(s) ? c(s) : a.push(s));
33
- });
34
- };
35
- return c(t), a;
36
- };
37
- function U(t, n, o, a, {
38
- mark: c = !0
39
- }) {
40
- let r = null;
41
- a ? r = "inert" : o && (r = "aria-hidden");
42
- let s = null, h = null;
43
- const m = b(n, t), v = c ? N(n, V(m), new Set(m)) : [], w = [], E = [];
44
- if (r) {
45
- const e = d[r], i = O(r);
46
- h = i, s = e;
47
- const f = b(n, Array.from(n.querySelectorAll("[aria-live]"))), S = m.concat(f);
48
- N(n, V(S), new Set(S)).forEach((l) => {
49
- const A = l.getAttribute(r), W = A !== null && A !== "false", g = (e.get(l) || 0) + 1;
50
- e.set(l, g), w.push(l), g === 1 && W && i.add(l), W || l.setAttribute(r, r === "inert" ? "" : "true");
51
- });
52
- }
53
- return c && v.forEach((e) => {
54
- const i = (u.get(e) || 0) + 1;
55
- u.set(e, i), E.push(e), i === 1 && e.setAttribute(M, "");
56
- }), p += 1, () => {
57
- s && w.forEach((e) => {
58
- const f = (s.get(e) || 0) - 1;
59
- s.set(e, f), f || (!h?.has(e) && r && e.removeAttribute(r), h?.delete(e));
60
- }), c && E.forEach((e) => {
61
- const i = (u.get(e) || 0) - 1;
62
- u.set(e, i), i || e.removeAttribute(M);
63
- }), p -= 1, p || (d.inert = /* @__PURE__ */ new WeakMap(), d["aria-hidden"] = /* @__PURE__ */ new WeakMap(), k.inert = /* @__PURE__ */ new WeakSet(), k["aria-hidden"] = /* @__PURE__ */ new WeakSet(), u = /* @__PURE__ */ new WeakMap());
64
- };
65
- }
66
- function K(t, n = {}) {
67
- const {
68
- ariaHidden: o = !1,
69
- inert: a = !1,
70
- mark: c = !0
71
- } = n, r = H(t[0]).body;
72
- return U(t, r, o, a, {
73
- mark: c
74
- });
75
- }
1
+ import { lowerUserAgent as o } from "./index421.js";
2
+ const e = /jsdom|happydom/.test(o);
76
3
  export {
77
- K as markOthers
4
+ e as jsdom
78
5
  };
79
6
  //# sourceMappingURL=index385.js.map