@rpcbase/ui 0.245.0 → 0.246.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 (448) hide show
  1. package/dist/index149.js +5 -14
  2. package/dist/index149.js.map +1 -1
  3. package/dist/index150.js +63 -63
  4. package/dist/index150.js.map +1 -1
  5. package/dist/index151.js +2 -38
  6. package/dist/index151.js.map +1 -1
  7. package/dist/index152.js +385 -13
  8. package/dist/index152.js.map +1 -1
  9. package/dist/index153.js +261 -23
  10. package/dist/index153.js.map +1 -1
  11. package/dist/index154.js +58 -109
  12. package/dist/index154.js.map +1 -1
  13. package/dist/index155.js +47 -13
  14. package/dist/index155.js.map +1 -1
  15. package/dist/index156.js +169 -4
  16. package/dist/index156.js.map +1 -1
  17. package/dist/index157.js +110 -4
  18. package/dist/index157.js.map +1 -1
  19. package/dist/index158.js +25 -5
  20. package/dist/index158.js.map +1 -1
  21. package/dist/index159.js +8 -12
  22. package/dist/index159.js.map +1 -1
  23. package/dist/index160.js +4 -19
  24. package/dist/index160.js.map +1 -1
  25. package/dist/index161.js +6 -11
  26. package/dist/index161.js.map +1 -1
  27. package/dist/index162.js +4 -176
  28. package/dist/index162.js.map +1 -1
  29. package/dist/index163.js +476 -268
  30. package/dist/index163.js.map +1 -1
  31. package/dist/index164.js +189 -4
  32. package/dist/index164.js.map +1 -1
  33. package/dist/index165.js +14 -28
  34. package/dist/index165.js.map +1 -1
  35. package/dist/index166.js +105 -124
  36. package/dist/index166.js.map +1 -1
  37. package/dist/index167.js +262 -63
  38. package/dist/index167.js.map +1 -1
  39. package/dist/index168.js +6 -8
  40. package/dist/index168.js.map +1 -1
  41. package/dist/index169.js +40 -15
  42. package/dist/index169.js.map +1 -1
  43. package/dist/index170.js +4 -30
  44. package/dist/index170.js.map +1 -1
  45. package/dist/index171.js +14 -69
  46. package/dist/index171.js.map +1 -1
  47. package/dist/index172.js +68 -5
  48. package/dist/index172.js.map +1 -1
  49. package/dist/index173.js +35 -66
  50. package/dist/index173.js.map +1 -1
  51. package/dist/index174.js +14 -2
  52. package/dist/index174.js.map +1 -1
  53. package/dist/index175.js +22 -384
  54. package/dist/index175.js.map +1 -1
  55. package/dist/index176.js +108 -258
  56. package/dist/index176.js.map +1 -1
  57. package/dist/index177.js +13 -61
  58. package/dist/index177.js.map +1 -1
  59. package/dist/index178.js +4 -46
  60. package/dist/index178.js.map +1 -1
  61. package/dist/index179.js +4 -170
  62. package/dist/index179.js.map +1 -1
  63. package/dist/index180.js +5 -110
  64. package/dist/index180.js.map +1 -1
  65. package/dist/index181.js +11 -24
  66. package/dist/index181.js.map +1 -1
  67. package/dist/index182.js +20 -8
  68. package/dist/index182.js.map +1 -1
  69. package/dist/index183.js +11 -5
  70. package/dist/index183.js.map +1 -1
  71. package/dist/index184.js +176 -5
  72. package/dist/index184.js.map +1 -1
  73. package/dist/index185.js +279 -4
  74. package/dist/index185.js.map +1 -1
  75. package/dist/index186.js +4 -487
  76. package/dist/index186.js.map +1 -1
  77. package/dist/index187.js +27 -189
  78. package/dist/index187.js.map +1 -1
  79. package/dist/index188.js +126 -13
  80. package/dist/index188.js.map +1 -1
  81. package/dist/index189.js +63 -107
  82. package/dist/index189.js.map +1 -1
  83. package/dist/index190.js +8 -262
  84. package/dist/index190.js.map +1 -1
  85. package/dist/index191.js +16 -7
  86. package/dist/index191.js.map +1 -1
  87. package/dist/index192.js +29 -39
  88. package/dist/index192.js.map +1 -1
  89. package/dist/index193.js +69 -4
  90. package/dist/index193.js.map +1 -1
  91. package/dist/index254.js +20 -67
  92. package/dist/index254.js.map +1 -1
  93. package/dist/index255.js +66 -8
  94. package/dist/index255.js.map +1 -1
  95. package/dist/index256.js +6 -11
  96. package/dist/index256.js.map +1 -1
  97. package/dist/index257.js +5 -8
  98. package/dist/index257.js.map +1 -1
  99. package/dist/index258.js +11 -5
  100. package/dist/index258.js.map +1 -1
  101. package/dist/index259.js +3 -13
  102. package/dist/index259.js.map +1 -1
  103. package/dist/index260.js +50 -3
  104. package/dist/index260.js.map +1 -1
  105. package/dist/index261.js +4 -4
  106. package/dist/index261.js.map +1 -1
  107. package/dist/index262.js +27 -97
  108. package/dist/index262.js.map +1 -1
  109. package/dist/index263.js +15 -16
  110. package/dist/index263.js.map +1 -1
  111. package/dist/index264.js +5 -29
  112. package/dist/index264.js.map +1 -1
  113. package/dist/index265.js +21 -51
  114. package/dist/index265.js.map +1 -1
  115. package/dist/index266.js +53 -5
  116. package/dist/index266.js.map +1 -1
  117. package/dist/index267.js +20 -5
  118. package/dist/index267.js.map +1 -1
  119. package/dist/index268.js +39 -59
  120. package/dist/index268.js.map +1 -1
  121. package/dist/index269.js +36 -63
  122. package/dist/index269.js.map +1 -1
  123. package/dist/index270.js +46 -134
  124. package/dist/index270.js.map +1 -1
  125. package/dist/index271.js +19 -7
  126. package/dist/index271.js.map +1 -1
  127. package/dist/index272.js +71 -5
  128. package/dist/index272.js.map +1 -1
  129. package/dist/index273.js +18 -4
  130. package/dist/index273.js.map +1 -1
  131. package/dist/index274.js +3 -11
  132. package/dist/index274.js.map +1 -1
  133. package/dist/index275.js +11 -21
  134. package/dist/index275.js.map +1 -1
  135. package/dist/index276.js +13 -16
  136. package/dist/index276.js.map +1 -1
  137. package/dist/index277.js +17 -10
  138. package/dist/index277.js.map +1 -1
  139. package/dist/index278.js +37 -8
  140. package/dist/index278.js.map +1 -1
  141. package/dist/index279.js +237 -142
  142. package/dist/index279.js.map +1 -1
  143. package/dist/index28.js +1 -1
  144. package/dist/index280.js +249 -76
  145. package/dist/index280.js.map +1 -1
  146. package/dist/index281.js +68 -61
  147. package/dist/index281.js.map +1 -1
  148. package/dist/index282.js +100 -15
  149. package/dist/index282.js.map +1 -1
  150. package/dist/index283.js +84 -20
  151. package/dist/index283.js.map +1 -1
  152. package/dist/index284.js +3 -6
  153. package/dist/index284.js.map +1 -1
  154. package/dist/index285.js +29 -11
  155. package/dist/index285.js.map +1 -1
  156. package/dist/index286.js +16 -3
  157. package/dist/index286.js.map +1 -1
  158. package/dist/index287.js +34 -50
  159. package/dist/index287.js.map +1 -1
  160. package/dist/index288.js +16 -15
  161. package/dist/index288.js.map +1 -1
  162. package/dist/index289.js +3 -21
  163. package/dist/index289.js.map +1 -1
  164. package/dist/index29.js +1 -1
  165. package/dist/index290.js +26 -53
  166. package/dist/index290.js.map +1 -1
  167. package/dist/index291.js +28 -20
  168. package/dist/index291.js.map +1 -1
  169. package/dist/index292.js +4 -42
  170. package/dist/index292.js.map +1 -1
  171. package/dist/index293.js +73 -34
  172. package/dist/index293.js.map +1 -1
  173. package/dist/index294.js +273 -46
  174. package/dist/index294.js.map +1 -1
  175. package/dist/index295.js +11 -20
  176. package/dist/index295.js.map +1 -1
  177. package/dist/index296.js +11 -71
  178. package/dist/index296.js.map +1 -1
  179. package/dist/index297.js +25 -17
  180. package/dist/index297.js.map +1 -1
  181. package/dist/index298.js +16 -3
  182. package/dist/index298.js.map +1 -1
  183. package/dist/index299.js +124 -12
  184. package/dist/index299.js.map +1 -1
  185. package/dist/index300.js +5 -18
  186. package/dist/index300.js.map +1 -1
  187. package/dist/index301.js +64 -35
  188. package/dist/index301.js.map +1 -1
  189. package/dist/index302.js +14 -240
  190. package/dist/index302.js.map +1 -1
  191. package/dist/index303.js +7 -252
  192. package/dist/index303.js.map +1 -1
  193. package/dist/index304.js +5 -68
  194. package/dist/index304.js.map +1 -1
  195. package/dist/index305.js +3 -83
  196. package/dist/index305.js.map +1 -1
  197. package/dist/index306.js +10 -3
  198. package/dist/index306.js.map +1 -1
  199. package/dist/index307.js +7 -29
  200. package/dist/index307.js.map +1 -1
  201. package/dist/index308.js +133 -16
  202. package/dist/index308.js.map +1 -1
  203. package/dist/index309.js +397 -32
  204. package/dist/index309.js.map +1 -1
  205. package/dist/index310.js +5 -18
  206. package/dist/index310.js.map +1 -1
  207. package/dist/index311.js +52 -3
  208. package/dist/index311.js.map +1 -1
  209. package/dist/index312.js +11 -26
  210. package/dist/index312.js.map +1 -1
  211. package/dist/index313.js +25 -26
  212. package/dist/index313.js.map +1 -1
  213. package/dist/index314.js +12 -4
  214. package/dist/index314.js.map +1 -1
  215. package/dist/index315.js +151 -75
  216. package/dist/index315.js.map +1 -1
  217. package/dist/index316.js +30 -270
  218. package/dist/index316.js.map +1 -1
  219. package/dist/index317.js +11 -11
  220. package/dist/index317.js.map +1 -1
  221. package/dist/index318.js +50 -11
  222. package/dist/index318.js.map +1 -1
  223. package/dist/index319.js +8 -24
  224. package/dist/index319.js.map +1 -1
  225. package/dist/index320.js +11 -16
  226. package/dist/index320.js.map +1 -1
  227. package/dist/index321.js +42 -124
  228. package/dist/index321.js.map +1 -1
  229. package/dist/index322.js +97 -5
  230. package/dist/index322.js.map +1 -1
  231. package/dist/index323.js +82 -61
  232. package/dist/index323.js.map +1 -1
  233. package/dist/index324.js +104 -12
  234. package/dist/index324.js.map +1 -1
  235. package/dist/index325.js +52 -7
  236. package/dist/index325.js.map +1 -1
  237. package/dist/index326.js +11 -5
  238. package/dist/index326.js.map +1 -1
  239. package/dist/index327.js +4 -3
  240. package/dist/index327.js.map +1 -1
  241. package/dist/index328.js +37 -10
  242. package/dist/index328.js.map +1 -1
  243. package/dist/index329.js +8 -7
  244. package/dist/index329.js.map +1 -1
  245. package/dist/index33.js +2 -2
  246. package/dist/index330.js +121 -385
  247. package/dist/index330.js.map +1 -1
  248. package/dist/index331.js +18 -5
  249. package/dist/index331.js.map +1 -1
  250. package/dist/index332.js +14 -51
  251. package/dist/index332.js.map +1 -1
  252. package/dist/index333.js +3 -11
  253. package/dist/index333.js.map +1 -1
  254. package/dist/index334.js +34 -25
  255. package/dist/index334.js.map +1 -1
  256. package/dist/index335.js +20 -11
  257. package/dist/index335.js.map +1 -1
  258. package/dist/index336.js +9 -154
  259. package/dist/index336.js.map +1 -1
  260. package/dist/index337.js +8 -32
  261. package/dist/index337.js.map +1 -1
  262. package/dist/index338.js +24 -11
  263. package/dist/index338.js.map +1 -1
  264. package/dist/index339.js +25 -46
  265. package/dist/index339.js.map +1 -1
  266. package/dist/index34.js +5 -5
  267. package/dist/index340.js +16 -9
  268. package/dist/index340.js.map +1 -1
  269. package/dist/index341.js +8 -11
  270. package/dist/index341.js.map +1 -1
  271. package/dist/index342.js +11 -43
  272. package/dist/index342.js.map +1 -1
  273. package/dist/index343.js +7 -96
  274. package/dist/index343.js.map +1 -1
  275. package/dist/index344.js +11 -84
  276. package/dist/index344.js.map +1 -1
  277. package/dist/index345.js +3 -105
  278. package/dist/index345.js.map +1 -1
  279. package/dist/index346.js +3 -52
  280. package/dist/index346.js.map +1 -1
  281. package/dist/index347.js +16 -10
  282. package/dist/index347.js.map +1 -1
  283. package/dist/index348.js +51 -4
  284. package/dist/index348.js.map +1 -1
  285. package/dist/index349.js +5 -37
  286. package/dist/index349.js.map +1 -1
  287. package/dist/index35.js +11 -11
  288. package/dist/index350.js +61 -8
  289. package/dist/index350.js.map +1 -1
  290. package/dist/index351.js +61 -130
  291. package/dist/index351.js.map +1 -1
  292. package/dist/index352.js +8 -17
  293. package/dist/index352.js.map +1 -1
  294. package/dist/index353.js +5 -16
  295. package/dist/index353.js.map +1 -1
  296. package/dist/index354.js +11 -3
  297. package/dist/index354.js.map +1 -1
  298. package/dist/index355.js +19 -34
  299. package/dist/index355.js.map +1 -1
  300. package/dist/index356.js +16 -20
  301. package/dist/index356.js.map +1 -1
  302. package/dist/index357.js +8 -10
  303. package/dist/index357.js.map +1 -1
  304. package/dist/index358.js +144 -8
  305. package/dist/index358.js.map +1 -1
  306. package/dist/index359.js +77 -22
  307. package/dist/index359.js.map +1 -1
  308. package/dist/index36.js +3 -3
  309. package/dist/index360.js +61 -28
  310. package/dist/index360.js.map +1 -1
  311. package/dist/index361.js +15 -17
  312. package/dist/index361.js.map +1 -1
  313. package/dist/index365.js +11 -8
  314. package/dist/index365.js.map +1 -1
  315. package/dist/index366.js +4 -27
  316. package/dist/index366.js.map +1 -1
  317. package/dist/index367.js +5 -137
  318. package/dist/index367.js.map +1 -1
  319. package/dist/index368.js +3 -13
  320. package/dist/index368.js.map +1 -1
  321. package/dist/index369.js +20 -46
  322. package/dist/index369.js.map +1 -1
  323. package/dist/index37.js +4 -4
  324. package/dist/index370.js +45 -4
  325. package/dist/index370.js.map +1 -1
  326. package/dist/index371.js +17 -21
  327. package/dist/index371.js.map +1 -1
  328. package/dist/index372.js +4 -75
  329. package/dist/index372.js.map +1 -1
  330. package/dist/index373.js +200 -11
  331. package/dist/index373.js.map +1 -1
  332. package/dist/index374.js +73 -3
  333. package/dist/index374.js.map +1 -1
  334. package/dist/index375.js +122 -72
  335. package/dist/index375.js.map +1 -1
  336. package/dist/index376.js +4 -200
  337. package/dist/index376.js.map +1 -1
  338. package/dist/index377.js +20 -71
  339. package/dist/index377.js.map +1 -1
  340. package/dist/index378.js +8 -35
  341. package/dist/index378.js.map +1 -1
  342. package/dist/index379.js +27 -7
  343. package/dist/index379.js.map +1 -1
  344. package/dist/index38.js +5 -5
  345. package/dist/index380.js +136 -14
  346. package/dist/index380.js.map +1 -1
  347. package/dist/index381.js +10 -121
  348. package/dist/index381.js.map +1 -1
  349. package/dist/index382.js +47 -4
  350. package/dist/index382.js.map +1 -1
  351. package/dist/index383.js +3 -11
  352. package/dist/index383.js.map +1 -1
  353. package/dist/index384.js +21 -5
  354. package/dist/index384.js.map +1 -1
  355. package/dist/index385.js +76 -3
  356. package/dist/index385.js.map +1 -1
  357. package/dist/index386.js +12 -21
  358. package/dist/index386.js.map +1 -1
  359. package/dist/index387.js +4 -45
  360. package/dist/index387.js.map +1 -1
  361. package/dist/index388.js +70 -16
  362. package/dist/index388.js.map +1 -1
  363. package/dist/index389.js +36 -5
  364. package/dist/index389.js.map +1 -1
  365. package/dist/index39.js +3 -3
  366. package/dist/index390.js +7 -5
  367. package/dist/index390.js.map +1 -1
  368. package/dist/index391.js +15 -20
  369. package/dist/index391.js.map +1 -1
  370. package/dist/index40.js +10 -10
  371. package/dist/index409.js +3 -3
  372. package/dist/index409.js.map +1 -1
  373. package/dist/index410.js +3 -15
  374. package/dist/index410.js.map +1 -1
  375. package/dist/index411.js +3 -492
  376. package/dist/index411.js.map +1 -1
  377. package/dist/index412.js +15 -3
  378. package/dist/index412.js.map +1 -1
  379. package/dist/index413.js +492 -3
  380. package/dist/index413.js.map +1 -1
  381. package/dist/index417.js +1 -1
  382. package/dist/index419.js +1 -1
  383. package/dist/index420.js +2 -2
  384. package/dist/index421.js +7 -32
  385. package/dist/index421.js.map +1 -1
  386. package/dist/index422.js +2 -8
  387. package/dist/index422.js.map +1 -1
  388. package/dist/index423.js +44 -2
  389. package/dist/index423.js.map +1 -1
  390. package/dist/index424.js +52 -40
  391. package/dist/index424.js.map +1 -1
  392. package/dist/index425.js +7 -55
  393. package/dist/index425.js.map +1 -1
  394. package/dist/index426.js +2 -8
  395. package/dist/index426.js.map +1 -1
  396. package/dist/index427.js +55 -2
  397. package/dist/index427.js.map +1 -1
  398. package/dist/index428.js +53 -52
  399. package/dist/index428.js.map +1 -1
  400. package/dist/index429.js +32 -55
  401. package/dist/index429.js.map +1 -1
  402. package/dist/index430.js +2 -16
  403. package/dist/index430.js.map +1 -1
  404. package/dist/index431.js +2 -29
  405. package/dist/index431.js.map +1 -1
  406. package/dist/index432.js +2 -13
  407. package/dist/index432.js.map +1 -1
  408. package/dist/index433.js +2 -7
  409. package/dist/index433.js.map +1 -1
  410. package/dist/index434.js +16 -2
  411. package/dist/index434.js.map +1 -1
  412. package/dist/index435.js +29 -2
  413. package/dist/index435.js.map +1 -1
  414. package/dist/index436.js +13 -2
  415. package/dist/index436.js.map +1 -1
  416. package/dist/index437.js +7 -2
  417. package/dist/index437.js.map +1 -1
  418. package/dist/index47.js +2 -2
  419. package/dist/index48.js +36 -36
  420. package/dist/index49.js +29 -29
  421. package/dist/index50.js +2 -2
  422. package/dist/index51.js +12 -12
  423. package/dist/index52.js +4 -4
  424. package/dist/index53.js +1 -1
  425. package/dist/index54.js +21 -21
  426. package/dist/index55.js +5 -5
  427. package/dist/index56.js +5 -5
  428. package/dist/index57.js +8 -8
  429. package/dist/index58.js +5 -5
  430. package/dist/index59.js +17 -17
  431. package/dist/index60.js +5 -5
  432. package/dist/index61.js +3 -3
  433. package/dist/index64.js +5 -5
  434. package/dist/index64.js.map +1 -1
  435. package/dist/index66.js +10 -22
  436. package/dist/index66.js.map +1 -1
  437. package/dist/index67.js +17 -232
  438. package/dist/index67.js.map +1 -1
  439. package/dist/index68.js +5 -5
  440. package/dist/index68.js.map +1 -1
  441. package/dist/index70.js +22 -10
  442. package/dist/index70.js.map +1 -1
  443. package/dist/index71.js +232 -17
  444. package/dist/index71.js.map +1 -1
  445. package/dist/index76.js +1 -1
  446. package/dist/index77.js +2 -2
  447. package/dist/index78.js +2 -2
  448. package/package.json +1 -1
package/dist/index376.js CHANGED
@@ -1,204 +1,8 @@
1
- import { flip as H, size as I, computePosition as J, hide as K, offset as N, shift as Q, limitShift as T } from "./index330.js";
2
- import { autoUpdate as ae, platform as me } from "./index330.js";
3
- import * as r from "react";
4
- import { useLayoutEffect as X } from "react";
5
- import * as Y from "react-dom";
6
- var Z = typeof document < "u", b = function() {
7
- }, R = Z ? X : b;
8
- function w(e, t) {
9
- if (e === t)
10
- return !0;
11
- if (typeof e != typeof t)
12
- return !1;
13
- if (typeof e == "function" && e.toString() === t.toString())
14
- return !0;
15
- let n, f, c;
16
- if (e && t && typeof e == "object") {
17
- if (Array.isArray(e)) {
18
- if (n = e.length, n !== t.length) return !1;
19
- for (f = n; f-- !== 0; )
20
- if (!w(e[f], t[f]))
21
- return !1;
22
- return !0;
23
- }
24
- if (c = Object.keys(e), n = c.length, n !== Object.keys(t).length)
25
- return !1;
26
- for (f = n; f-- !== 0; )
27
- if (!{}.hasOwnProperty.call(t, c[f]))
28
- return !1;
29
- for (f = n; f-- !== 0; ) {
30
- const p = c[f];
31
- if (!(p === "_owner" && e.$$typeof) && !w(e[p], t[p]))
32
- return !1;
33
- }
34
- return !0;
35
- }
36
- return e !== e && t !== t;
1
+ var e = /^[A-Z]{2}$/;
2
+ function r(t) {
3
+ return e.test(t);
37
4
  }
38
- function L(e) {
39
- return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
40
- }
41
- function z(e, t) {
42
- const n = L(e);
43
- return Math.round(t * n) / n;
44
- }
45
- function k(e) {
46
- const t = r.useRef(e);
47
- return R(() => {
48
- t.current = e;
49
- }), t;
50
- }
51
- function ne(e) {
52
- e === void 0 && (e = {});
53
- const {
54
- placement: t = "bottom",
55
- strategy: n = "absolute",
56
- middleware: f = [],
57
- platform: c,
58
- elements: {
59
- reference: p,
60
- floating: A
61
- } = {},
62
- transform: D = !0,
63
- whileElementsMounted: E,
64
- open: x
65
- } = e, [s, C] = r.useState({
66
- x: 0,
67
- y: 0,
68
- strategy: n,
69
- placement: t,
70
- middlewareData: {},
71
- isPositioned: !1
72
- }), [M, q] = r.useState(f);
73
- w(M, f) || q(f);
74
- const [B, U] = r.useState(null), [V, W] = r.useState(null), _ = r.useCallback((o) => {
75
- o !== a.current && (a.current = o, U(o));
76
- }, []), v = r.useCallback((o) => {
77
- o !== m.current && (m.current = o, W(o));
78
- }, []), i = p || B, u = A || V, a = r.useRef(null), m = r.useRef(null), y = r.useRef(s), G = E != null, S = k(E), P = k(c), F = k(x), g = r.useCallback(() => {
79
- if (!a.current || !m.current)
80
- return;
81
- const o = {
82
- placement: t,
83
- strategy: n,
84
- middleware: M
85
- };
86
- P.current && (o.platform = P.current), J(a.current, m.current, o).then((h) => {
87
- const d = {
88
- ...h,
89
- // The floating element's position may be recomputed while it's closed
90
- // but still mounted (such as when transitioning out). To ensure
91
- // `isPositioned` will be `false` initially on the next open, avoid
92
- // setting it to `true` when `open === false` (must be specified).
93
- isPositioned: F.current !== !1
94
- };
95
- $.current && !w(y.current, d) && (y.current = d, Y.flushSync(() => {
96
- C(d);
97
- }));
98
- });
99
- }, [M, t, n, P, F]);
100
- R(() => {
101
- x === !1 && y.current.isPositioned && (y.current.isPositioned = !1, C((o) => ({
102
- ...o,
103
- isPositioned: !1
104
- })));
105
- }, [x]);
106
- const $ = r.useRef(!1);
107
- R(() => ($.current = !0, () => {
108
- $.current = !1;
109
- }), []), R(() => {
110
- if (i && (a.current = i), u && (m.current = u), i && u) {
111
- if (S.current)
112
- return S.current(i, u, g);
113
- g();
114
- }
115
- }, [i, u, g, S, G]);
116
- const O = r.useMemo(() => ({
117
- reference: a,
118
- floating: m,
119
- setReference: _,
120
- setFloating: v
121
- }), [_, v]), l = r.useMemo(() => ({
122
- reference: i,
123
- floating: u
124
- }), [i, u]), j = r.useMemo(() => {
125
- const o = {
126
- position: n,
127
- left: 0,
128
- top: 0
129
- };
130
- if (!l.floating)
131
- return o;
132
- const h = z(l.floating, s.x), d = z(l.floating, s.y);
133
- return D ? {
134
- ...o,
135
- transform: "translate(" + h + "px, " + d + "px)",
136
- ...L(l.floating) >= 1.5 && {
137
- willChange: "transform"
138
- }
139
- } : {
140
- position: n,
141
- left: h,
142
- top: d
143
- };
144
- }, [n, D, l.floating, s.x, s.y]);
145
- return r.useMemo(() => ({
146
- ...s,
147
- update: g,
148
- refs: O,
149
- elements: l,
150
- floatingStyles: j
151
- }), [s, g, O, l, j]);
152
- }
153
- const re = (e, t) => {
154
- const n = N(e);
155
- return {
156
- name: n.name,
157
- fn: n.fn,
158
- options: [e, t]
159
- };
160
- }, oe = (e, t) => {
161
- const n = Q(e);
162
- return {
163
- name: n.name,
164
- fn: n.fn,
165
- options: [e, t]
166
- };
167
- }, fe = (e, t) => ({
168
- fn: T(e).fn,
169
- options: [e, t]
170
- }), se = (e, t) => {
171
- const n = H(e);
172
- return {
173
- name: n.name,
174
- fn: n.fn,
175
- options: [e, t]
176
- };
177
- }, ie = (e, t) => {
178
- const n = I(e);
179
- return {
180
- name: n.name,
181
- fn: n.fn,
182
- options: [e, t]
183
- };
184
- }, ue = (e, t) => {
185
- const n = K(e);
186
- return {
187
- name: n.name,
188
- fn: n.fn,
189
- options: [e, t]
190
- };
191
- };
192
5
  export {
193
- ae as autoUpdate,
194
- J as computePosition,
195
- se as flip,
196
- ue as hide,
197
- fe as limitShift,
198
- re as offset,
199
- me as platform,
200
- oe as shift,
201
- ie as size,
202
- ne as useFloating
6
+ r as default
203
7
  };
204
8
  //# sourceMappingURL=index376.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index376.js","sources":["../../../node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs"],"sourcesContent":["import { computePosition, arrow as arrow$2, autoPlacement as autoPlacement$1, flip as flip$1, hide as hide$1, inline as inline$1, limitShift as limitShift$1, offset as offset$1, shift as shift$1, size as size$1 } from '@floating-ui/dom';\nexport { autoUpdate, computePosition, detectOverflow, getOverflowAncestors, platform } from '@floating-ui/dom';\nimport * as React from 'react';\nimport { useLayoutEffect } from 'react';\nimport * as ReactDOM from 'react-dom';\n\nvar isClient = typeof document !== 'undefined';\n\nvar noop = function noop() {};\nvar index = isClient ? useLayoutEffect : noop;\n\n// Fork of `fast-deep-equal` that only does the comparisons we need and compares\n// functions\nfunction deepEqual(a, b) {\n if (a === b) {\n return true;\n }\n if (typeof a !== typeof b) {\n return false;\n }\n if (typeof a === 'function' && a.toString() === b.toString()) {\n return true;\n }\n let length;\n let i;\n let keys;\n if (a && b && typeof a === 'object') {\n if (Array.isArray(a)) {\n length = a.length;\n if (length !== b.length) return false;\n for (i = length; i-- !== 0;) {\n if (!deepEqual(a[i], b[i])) {\n return false;\n }\n }\n return true;\n }\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) {\n return false;\n }\n for (i = length; i-- !== 0;) {\n if (!{}.hasOwnProperty.call(b, keys[i])) {\n return false;\n }\n }\n for (i = length; i-- !== 0;) {\n const key = keys[i];\n if (key === '_owner' && a.$$typeof) {\n continue;\n }\n if (!deepEqual(a[key], b[key])) {\n return false;\n }\n }\n return true;\n }\n return a !== a && b !== b;\n}\n\nfunction getDPR(element) {\n if (typeof window === 'undefined') {\n return 1;\n }\n const win = element.ownerDocument.defaultView || window;\n return win.devicePixelRatio || 1;\n}\n\nfunction roundByDPR(element, value) {\n const dpr = getDPR(element);\n return Math.round(value * dpr) / dpr;\n}\n\nfunction useLatestRef(value) {\n const ref = React.useRef(value);\n index(() => {\n ref.current = value;\n });\n return ref;\n}\n\n/**\n * Provides data to position a floating element.\n * @see https://floating-ui.com/docs/useFloating\n */\nfunction useFloating(options) {\n if (options === void 0) {\n options = {};\n }\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform,\n elements: {\n reference: externalReference,\n floating: externalFloating\n } = {},\n transform = true,\n whileElementsMounted,\n open\n } = options;\n const [data, setData] = React.useState({\n x: 0,\n y: 0,\n strategy,\n placement,\n middlewareData: {},\n isPositioned: false\n });\n const [latestMiddleware, setLatestMiddleware] = React.useState(middleware);\n if (!deepEqual(latestMiddleware, middleware)) {\n setLatestMiddleware(middleware);\n }\n const [_reference, _setReference] = React.useState(null);\n const [_floating, _setFloating] = React.useState(null);\n const setReference = React.useCallback(node => {\n if (node !== referenceRef.current) {\n referenceRef.current = node;\n _setReference(node);\n }\n }, []);\n const setFloating = React.useCallback(node => {\n if (node !== floatingRef.current) {\n floatingRef.current = node;\n _setFloating(node);\n }\n }, []);\n const referenceEl = externalReference || _reference;\n const floatingEl = externalFloating || _floating;\n const referenceRef = React.useRef(null);\n const floatingRef = React.useRef(null);\n const dataRef = React.useRef(data);\n const hasWhileElementsMounted = whileElementsMounted != null;\n const whileElementsMountedRef = useLatestRef(whileElementsMounted);\n const platformRef = useLatestRef(platform);\n const openRef = useLatestRef(open);\n const update = React.useCallback(() => {\n if (!referenceRef.current || !floatingRef.current) {\n return;\n }\n const config = {\n placement,\n strategy,\n middleware: latestMiddleware\n };\n if (platformRef.current) {\n config.platform = platformRef.current;\n }\n computePosition(referenceRef.current, floatingRef.current, config).then(data => {\n const fullData = {\n ...data,\n // The floating element's position may be recomputed while it's closed\n // but still mounted (such as when transitioning out). To ensure\n // `isPositioned` will be `false` initially on the next open, avoid\n // setting it to `true` when `open === false` (must be specified).\n isPositioned: openRef.current !== false\n };\n if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {\n dataRef.current = fullData;\n ReactDOM.flushSync(() => {\n setData(fullData);\n });\n }\n });\n }, [latestMiddleware, placement, strategy, platformRef, openRef]);\n index(() => {\n if (open === false && dataRef.current.isPositioned) {\n dataRef.current.isPositioned = false;\n setData(data => ({\n ...data,\n isPositioned: false\n }));\n }\n }, [open]);\n const isMountedRef = React.useRef(false);\n index(() => {\n isMountedRef.current = true;\n return () => {\n isMountedRef.current = false;\n };\n }, []);\n index(() => {\n if (referenceEl) referenceRef.current = referenceEl;\n if (floatingEl) floatingRef.current = floatingEl;\n if (referenceEl && floatingEl) {\n if (whileElementsMountedRef.current) {\n return whileElementsMountedRef.current(referenceEl, floatingEl, update);\n }\n update();\n }\n }, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);\n const refs = React.useMemo(() => ({\n reference: referenceRef,\n floating: floatingRef,\n setReference,\n setFloating\n }), [setReference, setFloating]);\n const elements = React.useMemo(() => ({\n reference: referenceEl,\n floating: floatingEl\n }), [referenceEl, floatingEl]);\n const floatingStyles = React.useMemo(() => {\n const initialStyles = {\n position: strategy,\n left: 0,\n top: 0\n };\n if (!elements.floating) {\n return initialStyles;\n }\n const x = roundByDPR(elements.floating, data.x);\n const y = roundByDPR(elements.floating, data.y);\n if (transform) {\n return {\n ...initialStyles,\n transform: \"translate(\" + x + \"px, \" + y + \"px)\",\n ...(getDPR(elements.floating) >= 1.5 && {\n willChange: 'transform'\n })\n };\n }\n return {\n position: strategy,\n left: x,\n top: y\n };\n }, [strategy, transform, elements.floating, data.x, data.y]);\n return React.useMemo(() => ({\n ...data,\n update,\n refs,\n elements,\n floatingStyles\n }), [data, update, refs, elements, floatingStyles]);\n}\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * This wraps the core `arrow` middleware to allow React refs as the element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow$1 = options => {\n function isRef(value) {\n return {}.hasOwnProperty.call(value, 'current');\n }\n return {\n name: 'arrow',\n options,\n fn(state) {\n const {\n element,\n padding\n } = typeof options === 'function' ? options(state) : options;\n if (element && isRef(element)) {\n if (element.current != null) {\n return arrow$2({\n element: element.current,\n padding\n }).fn(state);\n }\n return {};\n }\n if (element) {\n return arrow$2({\n element,\n padding\n }).fn(state);\n }\n return {};\n }\n };\n};\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = (options, deps) => {\n const result = offset$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = (options, deps) => {\n const result = shift$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = (options, deps) => {\n const result = limitShift$1(options);\n return {\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = (options, deps) => {\n const result = flip$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = (options, deps) => {\n const result = size$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = (options, deps) => {\n const result = autoPlacement$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = (options, deps) => {\n const result = hide$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = (options, deps) => {\n const result = inline$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * This wraps the core `arrow` middleware to allow React refs as the element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = (options, deps) => {\n const result = arrow$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\nexport { arrow, autoPlacement, flip, hide, inline, limitShift, offset, shift, size, useFloating };\n"],"names":["isClient","noop","index","useLayoutEffect","deepEqual","a","b","length","i","keys","key","getDPR","element","roundByDPR","value","dpr","useLatestRef","ref","React","useFloating","options","placement","strategy","middleware","platform","externalReference","externalFloating","transform","whileElementsMounted","open","data","setData","latestMiddleware","setLatestMiddleware","_reference","_setReference","_floating","_setFloating","setReference","node","referenceRef","setFloating","floatingRef","referenceEl","floatingEl","dataRef","hasWhileElementsMounted","whileElementsMountedRef","platformRef","openRef","update","config","computePosition","fullData","isMountedRef","ReactDOM","refs","elements","floatingStyles","initialStyles","x","y","offset","deps","result","offset$1","shift","shift$1","limitShift","limitShift$1","flip","flip$1","size","size$1","hide","hide$1"],"mappings":";;;;;AAMA,IAAIA,IAAW,OAAO,WAAa,KAE/BC,IAAO,WAAgB;AAAC,GACxBC,IAAQF,IAAWG,IAAkBF;AAIzC,SAASG,EAAUC,GAAGC,GAAG;AACvB,MAAID,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;AA+CK,MAACI,KAAS,CAAC1C,GAAS2C,MAAS;AAChC,QAAMC,IAASC,EAAS7C,CAAO;AAC/B,SAAO;AAAA,IACL,MAAM4C,EAAO;AAAA,IACb,IAAIA,EAAO;AAAA,IACX,SAAS,CAAC5C,GAAS2C,CAAI;AAAA,EAC3B;AACA,GAOMG,KAAQ,CAAC9C,GAAS2C,MAAS;AAC/B,QAAMC,IAASG,EAAQ/C,CAAO;AAC9B,SAAO;AAAA,IACL,MAAM4C,EAAO;AAAA,IACb,IAAIA,EAAO;AAAA,IACX,SAAS,CAAC5C,GAAS2C,CAAI;AAAA,EAC3B;AACA,GAKMK,KAAa,CAAChD,GAAS2C,OAEpB;AAAA,EACL,IAFaM,EAAajD,CAAO,EAEtB;AAAA,EACX,SAAS,CAACA,GAAS2C,CAAI;AAC3B,IASMO,KAAO,CAAClD,GAAS2C,MAAS;AAC9B,QAAMC,IAASO,EAAOnD,CAAO;AAC7B,SAAO;AAAA,IACL,MAAM4C,EAAO;AAAA,IACb,IAAIA,EAAO;AAAA,IACX,SAAS,CAAC5C,GAAS2C,CAAI;AAAA,EAC3B;AACA,GAQMS,KAAO,CAACpD,GAAS2C,MAAS;AAC9B,QAAMC,IAASS,EAAOrD,CAAO;AAC7B,SAAO;AAAA,IACL,MAAM4C,EAAO;AAAA,IACb,IAAIA,EAAO;AAAA,IACX,SAAS,CAAC5C,GAAS2C,CAAI;AAAA,EAC3B;AACA,GAsBMW,KAAO,CAACtD,GAAS2C,MAAS;AAC9B,QAAMC,IAASW,EAAOvD,CAAO;AAC7B,SAAO;AAAA,IACL,MAAM4C,EAAO;AAAA,IACb,IAAIA,EAAO;AAAA,IACX,SAAS,CAAC5C,GAAS2C,CAAI;AAAA,EAC3B;AACA;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index376.js","sources":["../../../node_modules/libphonenumber-js/es6/helpers/isCountryCode.js"],"sourcesContent":["var COUNTRY_CODE_REG_EXP = /^[A-Z]{2}$/;\nexport default function isCountryCode(string) {\n return COUNTRY_CODE_REG_EXP.test(string);\n}\n//# sourceMappingURL=isCountryCode.js.map"],"names":["COUNTRY_CODE_REG_EXP","isCountryCode","string"],"mappings":"AAAA,IAAIA,IAAuB;AACZ,SAASC,EAAcC,GAAQ;AAC5C,SAAOF,EAAqB,KAAKE,CAAM;AACzC;","x_google_ignoreList":[0]}
package/dist/index377.js CHANGED
@@ -1,75 +1,24 @@
1
- import { createEventEmitter as a } from "./index410.js";
2
- import { ReactStore as m } from "./index279.js";
3
- import { isClickLikeEvent as f } from "./index334.js";
4
- import { createSelector as o } from "./index282.js";
5
- const l = {
6
- open: o((t) => t.open),
7
- transitionStatus: o((t) => t.transitionStatus),
8
- domReferenceElement: o((t) => t.domReferenceElement),
9
- referenceElement: o((t) => t.positionReference ?? t.referenceElement),
10
- floatingElement: o((t) => t.floatingElement),
11
- floatingId: o((t) => t.floatingId)
12
- };
13
- class d extends m {
14
- constructor(n) {
15
- const {
16
- syncOnly: e,
17
- nested: r,
18
- onOpenChange: s,
19
- triggerElements: c,
20
- ...i
21
- } = n;
22
- super({
23
- ...i,
24
- positionReference: i.referenceElement,
25
- domReferenceElement: i.referenceElement
26
- }, {
27
- onOpenChange: s,
28
- dataRef: {
29
- current: {}
30
- },
31
- events: a(),
32
- nested: r,
33
- triggerElements: c
34
- }, l), this.syncOnly = e;
35
- }
36
- /**
37
- * Syncs the event used by hover logic to distinguish hover-open from click-like interaction.
38
- */
39
- syncOpenEvent = (n, e) => {
40
- (!n || !this.state.open || // Prevent a pending hover-open from overwriting a click-open event, while allowing
41
- // click events to upgrade a hover-open.
42
- e != null && f(e)) && (this.context.dataRef.current.openEvent = n ? e : void 0);
43
- };
44
- /**
45
- * Runs the root-owned side effects for an open state change.
46
- */
47
- dispatchOpenChange = (n, e) => {
48
- this.syncOpenEvent(n, e.event);
49
- const r = {
50
- open: n,
51
- reason: e.reason,
52
- nativeEvent: e.event,
53
- nested: this.context.nested,
54
- triggerElement: e.trigger
55
- };
56
- this.context.events.emit("openchange", r);
57
- };
58
- /**
59
- * Emits the `openchange` event through the internal event emitter and calls the `onOpenChange` handler with the provided arguments.
60
- *
61
- * @param newOpen The new open state.
62
- * @param eventDetails Details about the event that triggered the open state change.
63
- */
64
- setOpen = (n, e) => {
65
- if (this.syncOnly) {
66
- this.context.onOpenChange?.(n, e);
67
- return;
68
- }
69
- this.dispatchOpenChange(n, e), this.context.onOpenChange?.(n, e);
70
- };
1
+ import { VALID_DIGITS as n } from "./index159.js";
2
+ var v = "+", I = "[\\-\\.\\(\\)]?", R = "([" + n + "]|" + I + ")", i = "^\\" + v + R + "*[" + n + "]" + R + "*$", N = new RegExp(i, "g"), r = n, C = "[" + r + "]+((\\-)*[" + r + "])*", L = "a-zA-Z", f = "[" + L + "]+((\\-)*[" + r + "])*", E = "^(" + C + "\\.)*" + f + "\\.?$", O = new RegExp(E, "g"), l = "tel:", a = ";phone-context=", u = ";isub=";
3
+ function D(_) {
4
+ var t = _.indexOf(a);
5
+ if (t < 0)
6
+ return null;
7
+ var e = t + a.length;
8
+ if (e >= _.length)
9
+ return "";
10
+ var A = _.indexOf(";", e);
11
+ return A >= 0 ? _.substring(e, A) : _.substring(e);
12
+ }
13
+ function S(_) {
14
+ return _ === null ? !0 : _.length === 0 ? !1 : N.test(_) || O.test(_);
71
15
  }
72
16
  export {
73
- d as FloatingRootStore
17
+ v as PLUS_SIGN,
18
+ u as RFC3966_ISDN_SUBADDRESS_,
19
+ a as RFC3966_PHONE_CONTEXT_,
20
+ l as RFC3966_PREFIX_,
21
+ D as default,
22
+ S as isPhoneContextValid
74
23
  };
75
24
  //# sourceMappingURL=index377.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index377.js","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}"],"names":["selectors","createSelector","state","FloatingRootStore","ReactStore","options","syncOnly","nested","onOpenChange","triggerElements","initialState","createEventEmitter","newOpen","event","isClickLikeEvent","eventDetails","details"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aAAaA,EAAa;AAAA,MAC1B,QAAQ,KAAK,QAAQ;AAAA,MACrB,gBAAgBA,EAAa;AAAA,IACnC;AACI,SAAK,QAAQ,OAAO,KAAK,cAAcC,CAAO;AAAA,EAChD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,UAAU,CAACJ,GAASG,MAAiB;AACnC,QAAI,KAAK,UAAU;AACjB,WAAK,QAAQ,eAAeH,GAASG,CAAY;AACjD;AAAA,IACF;AACA,SAAK,mBAAmBH,GAASG,CAAY,GAC7C,KAAK,QAAQ,eAAeH,GAASG,CAAY;AAAA,EACnD;AACF;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index377.js","sources":["../../../node_modules/libphonenumber-js/es6/helpers/extractPhoneContext.js"],"sourcesContent":["// When phone numbers are written in `RFC3966` format — `\"tel:+12133734253\"` —\n// they can have their \"calling code\" part written separately in a `phone-context` parameter.\n// Example: `\"tel:12133734253;phone-context=+1\"`.\n// This function parses the full phone number from the local number and the `phone-context`\n// when the `phone-context` contains a `+` sign.\n\nimport { VALID_DIGITS\n// PLUS_CHARS\n} from '../constants.js';\nexport var PLUS_SIGN = '+';\nvar RFC3966_VISUAL_SEPARATOR_ = '[\\\\-\\\\.\\\\(\\\\)]?';\nvar RFC3966_PHONE_DIGIT_ = '(' + '[' + VALID_DIGITS + ']' + '|' + RFC3966_VISUAL_SEPARATOR_ + ')';\nvar RFC3966_GLOBAL_NUMBER_DIGITS_ = '^' + '\\\\' + PLUS_SIGN + RFC3966_PHONE_DIGIT_ + '*' + '[' + VALID_DIGITS + ']' + RFC3966_PHONE_DIGIT_ + '*' + '$';\n\n/**\r\n * Regular expression of valid global-number-digits for the phone-context\r\n * parameter, following the syntax defined in RFC3966.\r\n */\nvar RFC3966_GLOBAL_NUMBER_DIGITS_PATTERN_ = new RegExp(RFC3966_GLOBAL_NUMBER_DIGITS_, 'g');\n\n// In this port of Google's library, we don't accept alpha characters in phone numbers.\n// const ALPHANUM_ = VALID_ALPHA_ + VALID_DIGITS\nvar ALPHANUM_ = VALID_DIGITS;\nvar RFC3966_DOMAINLABEL_ = '[' + ALPHANUM_ + ']+((\\\\-)*[' + ALPHANUM_ + '])*';\nvar VALID_ALPHA_ = 'a-zA-Z';\nvar RFC3966_TOPLABEL_ = '[' + VALID_ALPHA_ + ']+((\\\\-)*[' + ALPHANUM_ + '])*';\nvar RFC3966_DOMAINNAME_ = '^(' + RFC3966_DOMAINLABEL_ + '\\\\.)*' + RFC3966_TOPLABEL_ + '\\\\.?$';\n\n/**\r\n * Regular expression of valid domainname for the phone-context parameter,\r\n * following the syntax defined in RFC3966.\r\n */\nvar RFC3966_DOMAINNAME_PATTERN_ = new RegExp(RFC3966_DOMAINNAME_, 'g');\nexport var RFC3966_PREFIX_ = 'tel:';\nexport var RFC3966_PHONE_CONTEXT_ = ';phone-context=';\nexport var RFC3966_ISDN_SUBADDRESS_ = ';isub=';\n\n/**\r\n * Extracts the value of the phone-context parameter of `numberToExtractFrom`,\r\n * following the syntax defined in RFC3966.\r\n *\r\n * @param {string} numberToExtractFrom\r\n * @return {string|null} the extracted string (possibly empty), or `null` if no phone-context parameter is found.\r\n */\nexport default function extractPhoneContext(numberToExtractFrom) {\n var indexOfPhoneContext = numberToExtractFrom.indexOf(RFC3966_PHONE_CONTEXT_);\n // If no phone-context parameter is present\n if (indexOfPhoneContext < 0) {\n return null;\n }\n var phoneContextStart = indexOfPhoneContext + RFC3966_PHONE_CONTEXT_.length;\n // If phone-context parameter is empty\n if (phoneContextStart >= numberToExtractFrom.length) {\n return '';\n }\n var phoneContextEnd = numberToExtractFrom.indexOf(';', phoneContextStart);\n // If phone-context is not the last parameter\n if (phoneContextEnd >= 0) {\n return numberToExtractFrom.substring(phoneContextStart, phoneContextEnd);\n } else {\n return numberToExtractFrom.substring(phoneContextStart);\n }\n}\n\n/**\r\n * Returns whether the value of phoneContext follows the syntax defined in RFC3966.\r\n *\r\n * @param {string|null} phoneContext\r\n * @return {boolean}\r\n */\nexport function isPhoneContextValid(phoneContext) {\n if (phoneContext === null) {\n return true;\n }\n if (phoneContext.length === 0) {\n return false;\n }\n\n // Does phone-context value match pattern of global-number-digits or domainname.\n return RFC3966_GLOBAL_NUMBER_DIGITS_PATTERN_.test(phoneContext) || RFC3966_DOMAINNAME_PATTERN_.test(phoneContext);\n}\n//# sourceMappingURL=extractPhoneContext.js.map"],"names":["PLUS_SIGN","RFC3966_VISUAL_SEPARATOR_","RFC3966_PHONE_DIGIT_","VALID_DIGITS","RFC3966_GLOBAL_NUMBER_DIGITS_","RFC3966_GLOBAL_NUMBER_DIGITS_PATTERN_","ALPHANUM_","RFC3966_DOMAINLABEL_","VALID_ALPHA_","RFC3966_TOPLABEL_","RFC3966_DOMAINNAME_","RFC3966_DOMAINNAME_PATTERN_","RFC3966_PREFIX_","RFC3966_PHONE_CONTEXT_","RFC3966_ISDN_SUBADDRESS_","extractPhoneContext","numberToExtractFrom","indexOfPhoneContext","phoneContextStart","phoneContextEnd","isPhoneContextValid","phoneContext"],"mappings":";AASU,IAACA,IAAY,KACnBC,IAA4B,mBAC5BC,IAAuB,OAAYC,IAAe,OAAYF,IAA4B,KAC1FG,IAAgC,QAAaJ,IAAYE,IAAuB,OAAYC,IAAe,MAAMD,IAAuB,MAMxIG,IAAwC,IAAI,OAAOD,GAA+B,GAAG,GAIrFE,IAAYH,GACZI,IAAuB,MAAMD,IAAY,eAAeA,IAAY,OACpEE,IAAe,UACfC,IAAoB,MAAMD,IAAe,eAAeF,IAAY,OACpEI,IAAsB,OAAOH,IAAuB,UAAUE,IAAoB,SAMlFE,IAA8B,IAAI,OAAOD,GAAqB,GAAG,GAC1DE,IAAkB,QAClBC,IAAyB,mBACzBC,IAA2B;AASvB,SAASC,EAAoBC,GAAqB;AAC/D,MAAIC,IAAsBD,EAAoB,QAAQH,CAAsB;AAE5E,MAAII,IAAsB;AACxB,WAAO;AAET,MAAIC,IAAoBD,IAAsBJ,EAAuB;AAErE,MAAIK,KAAqBF,EAAoB;AAC3C,WAAO;AAET,MAAIG,IAAkBH,EAAoB,QAAQ,KAAKE,CAAiB;AAExE,SAAIC,KAAmB,IACdH,EAAoB,UAAUE,GAAmBC,CAAe,IAEhEH,EAAoB,UAAUE,CAAiB;AAE1D;AAQO,SAASE,EAAoBC,GAAc;AAChD,SAAIA,MAAiB,OACZ,KAELA,EAAa,WAAW,IACnB,KAIFhB,EAAsC,KAAKgB,CAAY,KAAKV,EAA4B,KAAKU,CAAY;AAClH;","x_google_ignoreList":[0]}
package/dist/index378.js CHANGED
@@ -1,39 +1,12 @@
1
- import * as d from "react";
2
- import { useIsoLayoutEffect as E } from "./index273.js";
3
- import { isElement as R } from "./index270.js";
4
- import { FloatingRootStore as S } from "./index377.js";
5
- function h(u) {
6
- const {
7
- popupStore: n,
8
- treatPopupAsFloatingElement: p = !1,
9
- floatingRootContext: l,
10
- floatingId: o,
11
- nested: c,
12
- onOpenChange: m
13
- } = u, r = n.useState("open"), t = n.useState("activeTriggerElement"), s = n.useState(p ? "popupElement" : "positionerElement"), g = n.context.triggerElements, f = m, i = d.useRef(null);
14
- l === void 0 && i.current === null && (i.current = new S({
15
- open: r,
16
- transitionStatus: void 0,
17
- referenceElement: t,
18
- floatingElement: s,
19
- triggerElements: g,
20
- onOpenChange: f,
21
- floatingId: o,
22
- syncOnly: !0,
23
- nested: c
24
- }));
25
- const e = l ?? i.current;
26
- return n.useSyncedValue("floatingId", o), E(() => {
27
- const a = {
28
- open: r,
29
- floatingId: o,
30
- referenceElement: t,
31
- floatingElement: s
32
- };
33
- R(t) && (a.domReferenceElement = t), e.state.positionReference === e.state.referenceElement && (a.positionReference = t), e.update(a);
34
- }, [r, o, t, s, e]), e.context.onOpenChange = f, e.context.nested = c, e;
1
+ function r(...n) {
2
+ return () => {
3
+ for (let e = 0; e < n.length; e += 1) {
4
+ const t = n[e];
5
+ t && t();
6
+ }
7
+ };
35
8
  }
36
9
  export {
37
- h as useSyncedFloatingRootContext
10
+ r as mergeCleanups
38
11
  };
39
12
  //# sourceMappingURL=index378.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index378.js","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}"],"names":["useSyncedFloatingRootContext","options","popupStore","treatPopupAsFloatingElement","floatingRootContextProp","floatingId","nested","onOpenChange","open","referenceElement","floatingElement","triggerElements","handleOpenChange","internalStoreRef","React","FloatingRootStore","store","useIsoLayoutEffect","valuesToSync","isElement"],"mappings":";;;;AAUO,SAASA,EAA6BC,GAAS;AACpD,QAAM;AAAA,IACJ,YAAAC;AAAA,IACA,6BAAAC,IAA8B;AAAA,IAC9B,qBAAqBC;AAAA,IACrB,YAAAC;AAAA,IACA,QAAAC;AAAA,IACA,cAAAC;AAAA,EACJ,IAAMN,GACEO,IAAON,EAAW,SAAS,MAAM,GACjCO,IAAmBP,EAAW,SAAS,sBAAsB,GAC7DQ,IAAkBR,EAAW,SAASC,IAA8B,iBAAiB,mBAAmB,GACxGQ,IAAkBT,EAAW,QAAQ,iBACrCU,IAAmBL,GACnBM,IAAmBC,EAAM,OAAO,IAAI;AAC1C,EAAIV,MAA4B,UAAaS,EAAiB,YAAY,SACxEA,EAAiB,UAAU,IAAIE,EAAkB;AAAA,IAC/C,MAAAP;AAAA,IACA,kBAAkB;AAAA,IAClB,kBAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,cAAcC;AAAA,IACd,YAAAP;AAAA,IACA,UAAU;AAAA,IACV,QAAAC;AAAA,EACN,CAAK;AAEH,QAAMU,IAAQZ,KAA2BS,EAAiB;AAC1D,SAAAX,EAAW,eAAe,cAAcG,CAAU,GAClDY,EAAmB,MAAM;AACvB,UAAMC,IAAe;AAAA,MACnB,MAAAV;AAAA,MACA,YAAAH;AAAA,MACA,kBAAAI;AAAA,MACA,iBAAAC;AAAA,IACN;AACI,IAAIS,EAAUV,CAAgB,MAC5BS,EAAa,sBAAsBT,IAEjCO,EAAM,MAAM,sBAAsBA,EAAM,MAAM,qBAChDE,EAAa,oBAAoBT,IAEnCO,EAAM,OAAOE,CAAY;AAAA,EAC3B,GAAG,CAACV,GAAMH,GAAYI,GAAkBC,GAAiBM,CAAK,CAAC,GAG/DA,EAAM,QAAQ,eAAeJ,GAC7BI,EAAM,QAAQ,SAASV,GAChBU;AACT;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index378.js","sources":["../../../node_modules/@base-ui/utils/mergeCleanups.mjs"],"sourcesContent":["/**\n * Combines multiple cleanup functions into a single cleanup function.\n */\nexport function mergeCleanups(...cleanups) {\n return () => {\n for (let i = 0; i < cleanups.length; i += 1) {\n const cleanup = cleanups[i];\n if (cleanup) {\n cleanup();\n }\n }\n };\n}"],"names":["mergeCleanups","cleanups","i","cleanup"],"mappings":"AAGO,SAASA,KAAiBC,GAAU;AACzC,SAAO,MAAM;AACX,aAASC,IAAI,GAAGA,IAAID,EAAS,QAAQC,KAAK,GAAG;AAC3C,YAAMC,IAAUF,EAASC,CAAC;AAC1B,MAAIC,KACFA,EAAO;AAAA,IAEX;AAAA,EACF;AACF;","x_google_ignoreList":[0]}
package/dist/index379.js CHANGED
@@ -1,10 +1,30 @@
1
- const t = "data-base-ui-focusable", o = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])", e = "ArrowLeft", n = "ArrowRight", R = "ArrowUp", a = "ArrowDown";
1
+ import * as r from "react";
2
+ import { useIsoLayoutEffect as i } from "./index261.js";
3
+ import { visuallyHidden as u } from "./index254.js";
4
+ import { j as f } from "./index28.js";
5
+ import { voiceOver as n } from "./index411.js";
6
+ import { webkit as d } from "./index310.js";
7
+ const m = /* @__PURE__ */ r.forwardRef(function(t, e) {
8
+ const [o, s] = r.useState();
9
+ i(() => {
10
+ n && d && s("button");
11
+ }, []);
12
+ const a = {
13
+ tabIndex: 0,
14
+ // Role is only for VoiceOver
15
+ role: o
16
+ };
17
+ return /* @__PURE__ */ f.jsx("span", {
18
+ ...t,
19
+ ref: e,
20
+ style: u,
21
+ "aria-hidden": o ? void 0 : !0,
22
+ ...a,
23
+ "data-base-ui-focus-guard": ""
24
+ });
25
+ });
26
+ process.env.NODE_ENV !== "production" && (m.displayName = "FocusGuard");
2
27
  export {
3
- a as ARROW_DOWN,
4
- e as ARROW_LEFT,
5
- n as ARROW_RIGHT,
6
- R as ARROW_UP,
7
- t as FOCUSABLE_ATTRIBUTE,
8
- o as TYPEABLE_SELECTOR
28
+ m as FocusGuard
9
29
  };
10
30
  //# sourceMappingURL=index379.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index379.js","sources":["../../../node_modules/@base-ui/react/floating-ui-react/utils/constants.mjs"],"sourcesContent":["export const FOCUSABLE_ATTRIBUTE = 'data-base-ui-focusable';\nexport const ACTIVE_KEY = 'active';\nexport const SELECTED_KEY = 'selected';\nexport const TYPEABLE_SELECTOR = \"input:not([type='hidden']):not([disabled]),\" + \"[contenteditable]:not([contenteditable='false']),textarea:not([disabled])\";\nexport const ARROW_LEFT = 'ArrowLeft';\nexport const ARROW_RIGHT = 'ArrowRight';\nexport const ARROW_UP = 'ArrowUp';\nexport const ARROW_DOWN = 'ArrowDown';"],"names":["FOCUSABLE_ATTRIBUTE","TYPEABLE_SELECTOR","ARROW_LEFT","ARROW_RIGHT","ARROW_UP","ARROW_DOWN"],"mappings":"AAAY,MAACA,IAAsB,0BAGtBC,IAAoB,wHACpBC,IAAa,aACbC,IAAc,cACdC,IAAW,WACXC,IAAa;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index379.js","sources":["../../../node_modules/@base-ui/react/utils/FocusGuard.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { platform } from '@base-ui/utils/platform';\nimport { visuallyHidden } from '@base-ui/utils/visuallyHidden';\n\n/**\n * @internal\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const FocusGuard = /*#__PURE__*/React.forwardRef(function FocusGuard(props, ref) {\n const [role, setRole] = React.useState();\n useIsoLayoutEffect(() => {\n // Unlike NVDA and JAWS, VoiceOver's virtual cursor triggers `onFocus` as\n // it moves — but only on focusable/role-button elements through WebKit's\n // NSAccessibility path. Setting `role=\"button\"` lets the focus trap catch\n // the cursor.\n if (platform.screenReader.voiceOver && platform.engine.webkit) {\n setRole('button');\n }\n }, []);\n const restProps = {\n tabIndex: 0,\n // Role is only for VoiceOver\n role\n };\n return /*#__PURE__*/_jsx(\"span\", {\n ...props,\n ref: ref,\n style: visuallyHidden,\n \"aria-hidden\": role ? undefined : true,\n ...restProps,\n \"data-base-ui-focus-guard\": \"\"\n });\n});\nif (process.env.NODE_ENV !== \"production\") FocusGuard.displayName = \"FocusGuard\";"],"names":["FocusGuard","React","props","ref","role","setRole","useIsoLayoutEffect","platform.screenReader.voiceOver","platform.engine.webkit","restProps","_jsx","visuallyHidden"],"mappings":";;;;;;AAWY,MAACA,IAA0B,gBAAAC,EAAM,WAAW,SAAoBC,GAAOC,GAAK;AACtF,QAAM,CAACC,GAAMC,CAAO,IAAIJ,EAAM,SAAQ;AACtC,EAAAK,EAAmB,MAAM;AAKvB,IAAIC,KAAmCC,KACrCH,EAAQ,QAAQ;AAAA,EAEpB,GAAG,CAAA,CAAE;AACL,QAAMI,IAAY;AAAA,IAChB,UAAU;AAAA;AAAA,IAEV,MAAAL;AAAA,EACJ;AACE,SAAoBM,gBAAAA,EAAAA,IAAK,QAAQ;AAAA,IAC/B,GAAGR;AAAA,IACH,KAAKC;AAAA,IACL,OAAOQ;AAAA,IACP,eAAeP,IAAO,SAAY;AAAA,IAClC,GAAGK;AAAA,IACH,4BAA4B;AAAA,EAChC,CAAG;AACH,CAAC;AACG,QAAQ,IAAI,aAAa,iBAAcT,EAAW,cAAc;","x_google_ignoreList":[0]}
package/dist/index38.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import * as m from "react";
2
- import { inertValue as d } from "./index164.js";
3
- import { useDialogRootContext as u } from "./index149.js";
4
- import { DialogPortalContext as c } from "./index159.js";
5
- import { InternalBackdrop as p } from "./index165.js";
2
+ import { inertValue as d } from "./index186.js";
3
+ import { useDialogRootContext as u } from "./index171.js";
4
+ import { DialogPortalContext as c } from "./index181.js";
5
+ import { InternalBackdrop as p } from "./index187.js";
6
6
  import { j as t } from "./index28.js";
7
- import { FloatingPortal as f } from "./index166.js";
7
+ import { FloatingPortal as f } from "./index188.js";
8
8
  const x = /* @__PURE__ */ m.forwardRef(function(r, a) {
9
9
  const {
10
10
  keepMounted: e = !1,