@rpcbase/ui 0.287.0 → 0.289.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 (738) hide show
  1. package/dist/assets/sha256.worker-DNtOSCbM.js.map +1 -0
  2. package/dist/components/FilesUploadField/index.d.ts.map +1 -1
  3. package/dist/index.js +12 -12
  4. package/dist/index10.js.map +1 -1
  5. package/dist/index100.js.map +1 -1
  6. package/dist/index101.js.map +1 -1
  7. package/dist/index102.js.map +1 -1
  8. package/dist/index103.js.map +1 -1
  9. package/dist/index104.js.map +1 -1
  10. package/dist/index105.js.map +1 -1
  11. package/dist/index106.js.map +1 -1
  12. package/dist/index107.js.map +1 -1
  13. package/dist/index108.js.map +1 -1
  14. package/dist/index109.js.map +1 -1
  15. package/dist/index11.js +96 -17
  16. package/dist/index11.js.map +1 -1
  17. package/dist/index110.js.map +1 -1
  18. package/dist/index111.js.map +1 -1
  19. package/dist/index112.js.map +1 -1
  20. package/dist/index113.js.map +1 -1
  21. package/dist/index114.js.map +1 -1
  22. package/dist/index115.js.map +1 -1
  23. package/dist/index116.js.map +1 -1
  24. package/dist/index117.js.map +1 -1
  25. package/dist/index118.js.map +1 -1
  26. package/dist/index119.js.map +1 -1
  27. package/dist/index12.js.map +1 -1
  28. package/dist/index120.js.map +1 -1
  29. package/dist/index121.js.map +1 -1
  30. package/dist/index122.js.map +1 -1
  31. package/dist/index123.js +1 -1
  32. package/dist/index123.js.map +1 -1
  33. package/dist/index124.js.map +1 -1
  34. package/dist/index125.js.map +1 -1
  35. package/dist/index126.js.map +1 -1
  36. package/dist/index127.js.map +1 -1
  37. package/dist/index128.js.map +1 -1
  38. package/dist/index129.js.map +1 -1
  39. package/dist/index13.js.map +1 -1
  40. package/dist/index130.js.map +1 -1
  41. package/dist/index131.js.map +1 -1
  42. package/dist/index132.js.map +1 -1
  43. package/dist/index133.js.map +1 -1
  44. package/dist/index134.js.map +1 -1
  45. package/dist/index135.js.map +1 -1
  46. package/dist/index136.js.map +1 -1
  47. package/dist/index137.js.map +1 -1
  48. package/dist/index138.js.map +1 -1
  49. package/dist/index139.js.map +1 -1
  50. package/dist/index14.js.map +1 -1
  51. package/dist/index140.js.map +1 -1
  52. package/dist/index141.js.map +1 -1
  53. package/dist/index142.js.map +1 -1
  54. package/dist/index143.js.map +1 -1
  55. package/dist/index144.js.map +1 -1
  56. package/dist/index145.js.map +1 -1
  57. package/dist/index146.js.map +1 -1
  58. package/dist/index147.js.map +1 -1
  59. package/dist/index148.js.map +1 -1
  60. package/dist/index149.js.map +1 -1
  61. package/dist/index15.js.map +1 -1
  62. package/dist/index150.js.map +1 -1
  63. package/dist/index151.js.map +1 -1
  64. package/dist/index152.js.map +1 -1
  65. package/dist/index153.js.map +1 -1
  66. package/dist/index154.js +4 -4
  67. package/dist/index154.js.map +1 -1
  68. package/dist/index155.js.map +1 -1
  69. package/dist/index156.js.map +1 -1
  70. package/dist/index157.js.map +1 -1
  71. package/dist/index158.js.map +1 -1
  72. package/dist/index159.js.map +1 -1
  73. package/dist/index16.js.map +1 -1
  74. package/dist/index160.js.map +1 -1
  75. package/dist/index161.js.map +1 -1
  76. package/dist/index162.js.map +1 -1
  77. package/dist/index163.js.map +1 -1
  78. package/dist/index164.js.map +1 -1
  79. package/dist/index165.js.map +1 -1
  80. package/dist/index166.js.map +1 -1
  81. package/dist/index167.js.map +1 -1
  82. package/dist/index168.js.map +1 -1
  83. package/dist/index169.js.map +1 -1
  84. package/dist/index17.js.map +1 -1
  85. package/dist/index170.js +18 -12
  86. package/dist/index170.js.map +1 -1
  87. package/dist/index171.js.map +1 -1
  88. package/dist/index172.js.map +1 -1
  89. package/dist/index173.js.map +1 -1
  90. package/dist/index174.js.map +1 -1
  91. package/dist/index175.js.map +1 -1
  92. package/dist/index176.js.map +1 -1
  93. package/dist/index177.js.map +1 -1
  94. package/dist/index178.js.map +1 -1
  95. package/dist/index179.js.map +1 -1
  96. package/dist/index18.js.map +1 -1
  97. package/dist/index180.js.map +1 -1
  98. package/dist/index181.js +1 -1
  99. package/dist/index181.js.map +1 -1
  100. package/dist/index182.js +3 -3
  101. package/dist/index182.js.map +1 -1
  102. package/dist/index183.js.map +1 -1
  103. package/dist/index184.js.map +1 -1
  104. package/dist/index185.js.map +1 -1
  105. package/dist/index186.js.map +1 -1
  106. package/dist/index187.js.map +1 -1
  107. package/dist/index188.js.map +1 -1
  108. package/dist/index189.js.map +1 -1
  109. package/dist/index19.js.map +1 -1
  110. package/dist/index190.js +9 -7
  111. package/dist/index190.js.map +1 -1
  112. package/dist/index191.js +4 -4
  113. package/dist/index191.js.map +1 -1
  114. package/dist/index192.js +4 -15
  115. package/dist/index192.js.map +1 -1
  116. package/dist/index193.js +13 -3
  117. package/dist/index193.js.map +1 -1
  118. package/dist/index194.js +2 -2
  119. package/dist/index194.js.map +1 -1
  120. package/dist/index195.js +4 -85
  121. package/dist/index195.js.map +1 -1
  122. package/dist/index196.js +79 -54
  123. package/dist/index196.js.map +1 -1
  124. package/dist/index197.js +68 -7
  125. package/dist/index197.js.map +1 -1
  126. package/dist/index198.js +3 -23
  127. package/dist/index198.js.map +1 -1
  128. package/dist/index199.js +6 -28
  129. package/dist/index199.js.map +1 -1
  130. package/dist/index20.js.map +1 -1
  131. package/dist/index200.js +4 -97
  132. package/dist/index200.js.map +1 -1
  133. package/dist/index201.js +3 -4
  134. package/dist/index201.js.map +1 -1
  135. package/dist/index202.js +23 -24
  136. package/dist/index202.js.map +1 -1
  137. package/dist/index203.js +28 -10
  138. package/dist/index203.js.map +1 -1
  139. package/dist/index204.js +97 -4
  140. package/dist/index204.js.map +1 -1
  141. package/dist/index205.js +4 -12
  142. package/dist/index205.js.map +1 -1
  143. package/dist/index206.js +22 -19
  144. package/dist/index206.js.map +1 -1
  145. package/dist/index207.js +4 -6
  146. package/dist/index207.js.map +1 -1
  147. package/dist/index208.js +4 -15
  148. package/dist/index208.js.map +1 -1
  149. package/dist/index209.js +10 -102
  150. package/dist/index209.js.map +1 -1
  151. package/dist/index210.js +21 -3
  152. package/dist/index210.js.map +1 -1
  153. package/dist/index211.js +5 -23
  154. package/dist/index211.js.map +1 -1
  155. package/dist/index212.js +15 -28
  156. package/dist/index212.js.map +1 -1
  157. package/dist/index213.js +101 -17
  158. package/dist/index213.js.map +1 -1
  159. package/dist/index214.js +3 -7
  160. package/dist/index214.js.map +1 -1
  161. package/dist/index215.js +24 -15
  162. package/dist/index215.js.map +1 -1
  163. package/dist/index216.js +27 -7
  164. package/dist/index216.js.map +1 -1
  165. package/dist/index217.js +17 -24
  166. package/dist/index217.js.map +1 -1
  167. package/dist/index218.js +6 -22
  168. package/dist/index218.js.map +1 -1
  169. package/dist/index219.js +15 -6
  170. package/dist/index219.js.map +1 -1
  171. package/dist/index220.js +8 -5
  172. package/dist/index220.js.map +1 -1
  173. package/dist/index221.js +27 -4
  174. package/dist/index221.js.map +1 -1
  175. package/dist/index222.js +23 -4
  176. package/dist/index222.js.map +1 -1
  177. package/dist/index223.js +6 -24
  178. package/dist/index223.js.map +1 -1
  179. package/dist/index224.js +5 -3
  180. package/dist/index224.js.map +1 -1
  181. package/dist/index225.js +4 -24
  182. package/dist/index225.js.map +1 -1
  183. package/dist/index226.js +4 -23
  184. package/dist/index226.js.map +1 -1
  185. package/dist/index227.js +23 -6
  186. package/dist/index227.js.map +1 -1
  187. package/dist/index228.js +22 -8
  188. package/dist/index228.js.map +1 -1
  189. package/dist/index229.js +3 -19
  190. package/dist/index229.js.map +1 -1
  191. package/dist/index23.js.map +1 -1
  192. package/dist/index230.js +22 -50
  193. package/dist/index230.js.map +1 -1
  194. package/dist/index231.js +7 -20
  195. package/dist/index231.js.map +1 -1
  196. package/dist/index232.js +9 -27
  197. package/dist/index232.js.map +1 -1
  198. package/dist/index233.js +17 -97
  199. package/dist/index233.js.map +1 -1
  200. package/dist/index234.js +50 -33
  201. package/dist/index234.js.map +1 -1
  202. package/dist/index235.js +20 -119
  203. package/dist/index235.js.map +1 -1
  204. package/dist/index236.js +28 -13
  205. package/dist/index236.js.map +1 -1
  206. package/dist/index237.js +98 -4
  207. package/dist/index237.js.map +1 -1
  208. package/dist/index238.js +33 -15
  209. package/dist/index238.js.map +1 -1
  210. package/dist/index239.js +116 -62
  211. package/dist/index239.js.map +1 -1
  212. package/dist/index24.js.map +1 -1
  213. package/dist/index240.js +13 -10
  214. package/dist/index240.js.map +1 -1
  215. package/dist/index241.js +4 -109
  216. package/dist/index241.js.map +1 -1
  217. package/dist/index242.js +14 -14
  218. package/dist/index242.js.map +1 -1
  219. package/dist/index243.js +64 -12
  220. package/dist/index243.js.map +1 -1
  221. package/dist/index244.js +10 -5
  222. package/dist/index244.js.map +1 -1
  223. package/dist/index245.js +104 -318
  224. package/dist/index245.js.map +1 -1
  225. package/dist/index246.js +14 -66
  226. package/dist/index246.js.map +1 -1
  227. package/dist/index247.js +12 -232
  228. package/dist/index247.js.map +1 -1
  229. package/dist/index248.js +4 -270
  230. package/dist/index248.js.map +1 -1
  231. package/dist/index249.js +313 -309
  232. package/dist/index249.js.map +1 -1
  233. package/dist/index25.js.map +1 -1
  234. package/dist/index250.js +60 -171
  235. package/dist/index250.js.map +1 -1
  236. package/dist/index251.js +252 -8
  237. package/dist/index251.js.map +1 -1
  238. package/dist/index252.js +268 -41
  239. package/dist/index252.js.map +1 -1
  240. package/dist/index253.js +316 -47
  241. package/dist/index253.js.map +1 -1
  242. package/dist/index254.js +179 -9
  243. package/dist/index254.js.map +1 -1
  244. package/dist/index255.js +6 -50
  245. package/dist/index255.js.map +1 -1
  246. package/dist/index256.js +41 -51
  247. package/dist/index256.js.map +1 -1
  248. package/dist/index257.js +50 -7
  249. package/dist/index257.js.map +1 -1
  250. package/dist/index258.js +9 -10
  251. package/dist/index258.js.map +1 -1
  252. package/dist/index259.js +51 -61
  253. package/dist/index259.js.map +1 -1
  254. package/dist/index26.js.map +1 -1
  255. package/dist/index260.js +53 -42
  256. package/dist/index260.js.map +1 -1
  257. package/dist/index261.js +9 -97
  258. package/dist/index261.js.map +1 -1
  259. package/dist/index262.js +31 -47
  260. package/dist/index262.js.map +1 -1
  261. package/dist/index263.js +61 -36
  262. package/dist/index263.js.map +1 -1
  263. package/dist/index264.js +43 -47
  264. package/dist/index264.js.map +1 -1
  265. package/dist/index265.js +92 -46
  266. package/dist/index265.js.map +1 -1
  267. package/dist/index266.js +48 -20
  268. package/dist/index266.js.map +1 -1
  269. package/dist/index267.js +33 -176
  270. package/dist/index267.js.map +1 -1
  271. package/dist/index268.js +49 -48
  272. package/dist/index268.js.map +1 -1
  273. package/dist/index269.js +68 -15
  274. package/dist/index269.js.map +1 -1
  275. package/dist/index27.js.map +1 -1
  276. package/dist/index270.js +20 -65
  277. package/dist/index270.js.map +1 -1
  278. package/dist/index271.js +202 -9
  279. package/dist/index271.js.map +1 -1
  280. package/dist/index272.js +48 -40
  281. package/dist/index272.js.map +1 -1
  282. package/dist/index273.js +60 -91
  283. package/dist/index273.js.map +1 -1
  284. package/dist/index274.js +9 -278
  285. package/dist/index274.js.map +1 -1
  286. package/dist/index275.js +38 -55
  287. package/dist/index275.js.map +1 -1
  288. package/dist/index276.js +91 -10
  289. package/dist/index276.js.map +1 -1
  290. package/dist/index277.js +278 -12
  291. package/dist/index277.js.map +1 -1
  292. package/dist/index278.js +58 -11
  293. package/dist/index278.js.map +1 -1
  294. package/dist/index279.js +11 -64
  295. package/dist/index279.js.map +1 -1
  296. package/dist/index28.js +5 -5
  297. package/dist/index28.js.map +1 -1
  298. package/dist/index280.js +12 -6
  299. package/dist/index280.js.map +1 -1
  300. package/dist/index281.js +3 -25
  301. package/dist/index281.js.map +1 -1
  302. package/dist/index282.js +3 -25
  303. package/dist/index282.js.map +1 -1
  304. package/dist/index283.js +12 -126
  305. package/dist/index283.js.map +1 -1
  306. package/dist/index284.js +63 -51
  307. package/dist/index284.js.map +1 -1
  308. package/dist/index285.js +5 -60
  309. package/dist/index285.js.map +1 -1
  310. package/dist/index286.js +24 -48
  311. package/dist/index286.js.map +1 -1
  312. package/dist/index287.js +24 -6
  313. package/dist/index287.js.map +1 -1
  314. package/dist/index288.js +125 -14
  315. package/dist/index288.js.map +1 -1
  316. package/dist/index289.js +51 -16
  317. package/dist/index289.js.map +1 -1
  318. package/dist/index29.js +5 -7
  319. package/dist/index29.js.map +1 -1
  320. package/dist/index290.js +56 -11
  321. package/dist/index290.js.map +1 -1
  322. package/dist/index291.js +47 -24
  323. package/dist/index291.js.map +1 -1
  324. package/dist/index292.js +7 -51
  325. package/dist/index292.js.map +1 -1
  326. package/dist/index293.js +15 -6
  327. package/dist/index293.js.map +1 -1
  328. package/dist/index294.js +18 -148
  329. package/dist/index294.js.map +1 -1
  330. package/dist/index295.js +12 -59
  331. package/dist/index295.js.map +1 -1
  332. package/dist/index296.js +25 -120
  333. package/dist/index296.js.map +1 -1
  334. package/dist/index297.js +54 -15
  335. package/dist/index297.js.map +1 -1
  336. package/dist/index298.js +5 -866
  337. package/dist/index298.js.map +1 -1
  338. package/dist/index299.js +148 -28
  339. package/dist/index299.js.map +1 -1
  340. package/dist/index3.js.map +1 -1
  341. package/dist/index30.js +6 -8
  342. package/dist/index30.js.map +1 -1
  343. package/dist/index300.js +55 -512
  344. package/dist/index300.js.map +1 -1
  345. package/dist/index301.js +111 -794
  346. package/dist/index301.js.map +1 -1
  347. package/dist/index302.js +14 -7436
  348. package/dist/index302.js.map +1 -1
  349. package/dist/index303.js +862 -6
  350. package/dist/index303.js.map +1 -1
  351. package/dist/index304.js +28 -12
  352. package/dist/index304.js.map +1 -1
  353. package/dist/index305.js +515 -5
  354. package/dist/index305.js.map +1 -1
  355. package/dist/index306.js +803 -5
  356. package/dist/index306.js.map +1 -1
  357. package/dist/index307.js +7426 -468
  358. package/dist/index307.js.map +1 -1
  359. package/dist/index308.js +6 -37
  360. package/dist/index308.js.map +1 -1
  361. package/dist/index309.js +12 -19
  362. package/dist/index309.js.map +1 -1
  363. package/dist/index31.js +5 -11
  364. package/dist/index31.js.map +1 -1
  365. package/dist/index310.js +5 -30
  366. package/dist/index310.js.map +1 -1
  367. package/dist/index311.js +5 -4
  368. package/dist/index311.js.map +1 -1
  369. package/dist/index312.js +461 -51
  370. package/dist/index312.js.map +1 -1
  371. package/dist/index313.js +36 -10
  372. package/dist/index313.js.map +1 -1
  373. package/dist/index314.js +19 -5
  374. package/dist/index314.js.map +1 -1
  375. package/dist/index315.js +29 -8
  376. package/dist/index315.js.map +1 -1
  377. package/dist/index316.js +4 -12
  378. package/dist/index316.js.map +1 -1
  379. package/dist/index317.js +60 -3
  380. package/dist/index317.js.map +1 -1
  381. package/dist/index318.js +10 -15
  382. package/dist/index318.js.map +1 -1
  383. package/dist/index319.js +5 -25
  384. package/dist/index319.js.map +1 -1
  385. package/dist/index32.js +5 -5
  386. package/dist/index32.js.map +1 -1
  387. package/dist/index320.js +9 -41
  388. package/dist/index320.js.map +1 -1
  389. package/dist/index321.js +11 -4
  390. package/dist/index321.js.map +1 -1
  391. package/dist/index322.js +3 -26
  392. package/dist/index322.js.map +1 -1
  393. package/dist/index323.js +15 -18
  394. package/dist/index323.js.map +1 -1
  395. package/dist/index324.js +22 -31
  396. package/dist/index324.js.map +1 -1
  397. package/dist/index325.js +41 -5
  398. package/dist/index325.js.map +1 -1
  399. package/dist/index326.js +4 -8
  400. package/dist/index326.js.map +1 -1
  401. package/dist/index327.js +25 -8
  402. package/dist/index327.js.map +1 -1
  403. package/dist/index328.js +19 -9
  404. package/dist/index328.js.map +1 -1
  405. package/dist/index329.js +34 -10
  406. package/dist/index329.js.map +1 -1
  407. package/dist/index33.js +9 -6
  408. package/dist/index33.js.map +1 -1
  409. package/dist/index330.js +5 -7
  410. package/dist/index330.js.map +1 -1
  411. package/dist/index331.js +9 -75
  412. package/dist/index331.js.map +1 -1
  413. package/dist/index332.js +8 -162
  414. package/dist/index332.js.map +1 -1
  415. package/dist/index333.js +9 -114
  416. package/dist/index333.js.map +1 -1
  417. package/dist/index334.js +10 -14
  418. package/dist/index334.js.map +1 -1
  419. package/dist/index335.js +7 -80
  420. package/dist/index335.js.map +1 -1
  421. package/dist/index336.js +68 -39
  422. package/dist/index336.js.map +1 -1
  423. package/dist/index337.js +160 -11
  424. package/dist/index337.js.map +1 -1
  425. package/dist/index338.js +113 -15
  426. package/dist/index338.js.map +1 -1
  427. package/dist/index339.js +13 -100
  428. package/dist/index339.js.map +1 -1
  429. package/dist/index34.js +6 -6
  430. package/dist/index34.js.map +1 -1
  431. package/dist/index340.js +73 -49
  432. package/dist/index340.js.map +1 -1
  433. package/dist/index341.js +34 -96
  434. package/dist/index341.js.map +1 -1
  435. package/dist/index342.js +12 -70
  436. package/dist/index342.js.map +1 -1
  437. package/dist/index343.js +14 -111
  438. package/dist/index343.js.map +1 -1
  439. package/dist/index344.js +94 -48
  440. package/dist/index344.js.map +1 -1
  441. package/dist/index345.js +50 -37
  442. package/dist/index345.js.map +1 -1
  443. package/dist/index346.js +89 -125
  444. package/dist/index346.js.map +1 -1
  445. package/dist/index347.js +52 -123
  446. package/dist/index347.js.map +1 -1
  447. package/dist/index348.js +54 -197
  448. package/dist/index348.js.map +1 -1
  449. package/dist/index349.js +44 -229
  450. package/dist/index349.js.map +1 -1
  451. package/dist/index35.js +9 -9
  452. package/dist/index35.js.map +1 -1
  453. package/dist/index350.js +42 -308
  454. package/dist/index350.js.map +1 -1
  455. package/dist/index351.js +144 -5
  456. package/dist/index351.js.map +1 -1
  457. package/dist/index352.js +142 -6
  458. package/dist/index352.js.map +1 -1
  459. package/dist/index353.js +257 -7
  460. package/dist/index353.js.map +1 -1
  461. package/dist/index354.js +241 -6
  462. package/dist/index354.js.map +1 -1
  463. package/dist/index355.js +309 -6
  464. package/dist/index355.js.map +1 -1
  465. package/dist/index356.js +5 -21
  466. package/dist/index356.js.map +1 -1
  467. package/dist/index357.js +6 -10
  468. package/dist/index357.js.map +1 -1
  469. package/dist/index358.js +7 -128
  470. package/dist/index358.js.map +1 -1
  471. package/dist/index359.js +6 -42
  472. package/dist/index359.js.map +1 -1
  473. package/dist/index36.js +12 -7
  474. package/dist/index36.js.map +1 -1
  475. package/dist/index360.js +6 -68
  476. package/dist/index360.js.map +1 -1
  477. package/dist/index361.js +20 -116
  478. package/dist/index361.js.map +1 -1
  479. package/dist/index362.js +10 -490
  480. package/dist/index362.js.map +1 -1
  481. package/dist/index363.js +128 -7
  482. package/dist/index363.js.map +1 -1
  483. package/dist/index364.js +42 -13
  484. package/dist/index364.js.map +1 -1
  485. package/dist/index365.js +67 -3
  486. package/dist/index365.js.map +1 -1
  487. package/dist/index366.js +115 -45
  488. package/dist/index366.js.map +1 -1
  489. package/dist/index367.js +490 -11
  490. package/dist/index367.js.map +1 -1
  491. package/dist/index368.js +8 -26
  492. package/dist/index368.js.map +1 -1
  493. package/dist/index369.js +12 -41
  494. package/dist/index369.js.map +1 -1
  495. package/dist/index37.js +13 -5
  496. package/dist/index37.js.map +1 -1
  497. package/dist/index370.js +4 -36
  498. package/dist/index370.js.map +1 -1
  499. package/dist/index371.js +45 -15
  500. package/dist/index371.js.map +1 -1
  501. package/dist/index372.js +24 -41
  502. package/dist/index372.js.map +1 -1
  503. package/dist/index373.js +3 -12
  504. package/dist/index373.js.map +1 -1
  505. package/dist/index374.js +27 -11
  506. package/dist/index374.js.map +1 -1
  507. package/dist/index375.js +40 -50
  508. package/dist/index375.js.map +1 -1
  509. package/dist/index376.js +37 -40
  510. package/dist/index376.js.map +1 -1
  511. package/dist/index377.js +12 -10
  512. package/dist/index377.js.map +1 -1
  513. package/dist/index378.js +40 -4
  514. package/dist/index378.js.map +1 -1
  515. package/dist/index379.js +7 -4
  516. package/dist/index379.js.map +1 -1
  517. package/dist/index38.js +5 -5
  518. package/dist/index38.js.map +1 -1
  519. package/dist/index380.js +29 -8
  520. package/dist/index380.js.map +1 -1
  521. package/dist/index381.js +9 -303
  522. package/dist/index381.js.map +1 -1
  523. package/dist/index382.js +57 -4
  524. package/dist/index382.js.map +1 -1
  525. package/dist/index383.js +40 -22
  526. package/dist/index383.js.map +1 -1
  527. package/dist/index384.js +15 -105
  528. package/dist/index384.js.map +1 -1
  529. package/dist/index385.js +5 -22
  530. package/dist/index385.js.map +1 -1
  531. package/dist/index386.js +10 -22
  532. package/dist/index386.js.map +1 -1
  533. package/dist/index387.js +289 -16
  534. package/dist/index387.js.map +1 -1
  535. package/dist/index388.js +4 -12
  536. package/dist/index388.js.map +1 -1
  537. package/dist/index389.js +20 -112
  538. package/dist/index389.js.map +1 -1
  539. package/dist/index39.js +6 -10
  540. package/dist/index39.js.map +1 -1
  541. package/dist/index390.js +3 -9
  542. package/dist/index390.js.map +1 -1
  543. package/dist/index391.js +104 -27
  544. package/dist/index391.js.map +1 -1
  545. package/dist/index392.js +20 -9
  546. package/dist/index392.js.map +1 -1
  547. package/dist/index393.js +20 -6
  548. package/dist/index393.js.map +1 -1
  549. package/dist/index394.js +14 -253
  550. package/dist/index394.js.map +1 -1
  551. package/dist/index395.js +12 -10
  552. package/dist/index395.js.map +1 -1
  553. package/dist/index396.js +117 -11
  554. package/dist/index396.js.map +1 -1
  555. package/dist/index397.js +8 -6
  556. package/dist/index397.js.map +1 -1
  557. package/dist/index398.js +32 -22
  558. package/dist/index398.js.map +1 -1
  559. package/dist/index399.js +9 -23
  560. package/dist/index399.js.map +1 -1
  561. package/dist/index4.js.map +1 -1
  562. package/dist/index40.js +8 -11
  563. package/dist/index40.js.map +1 -1
  564. package/dist/index400.js +6 -105
  565. package/dist/index400.js.map +1 -1
  566. package/dist/index401.js +3 -15
  567. package/dist/index401.js.map +1 -1
  568. package/dist/index402.js +251 -10
  569. package/dist/index402.js.map +1 -1
  570. package/dist/index403.js +9 -7
  571. package/dist/index403.js.map +1 -1
  572. package/dist/index404.js +11 -239
  573. package/dist/index404.js.map +1 -1
  574. package/dist/index405.js +7 -28
  575. package/dist/index405.js.map +1 -1
  576. package/dist/index406.js +21 -37
  577. package/dist/index406.js.map +1 -1
  578. package/dist/index407.js +21 -10
  579. package/dist/index407.js.map +1 -1
  580. package/dist/index408.js +97 -117
  581. package/dist/index408.js.map +1 -1
  582. package/dist/index409.js +15 -40
  583. package/dist/index409.js.map +1 -1
  584. package/dist/index41.js +6 -7
  585. package/dist/index41.js.map +1 -1
  586. package/dist/index410.js +11 -25
  587. package/dist/index410.js.map +1 -1
  588. package/dist/index411.js +7 -9
  589. package/dist/index411.js.map +1 -1
  590. package/dist/index412.js +3 -24
  591. package/dist/index412.js.map +1 -1
  592. package/dist/index413.js +226 -15
  593. package/dist/index413.js.map +1 -1
  594. package/dist/index414.js +24 -11
  595. package/dist/index414.js.map +1 -1
  596. package/dist/index415.js +38 -4
  597. package/dist/index415.js.map +1 -1
  598. package/dist/index416.js +11 -324
  599. package/dist/index416.js.map +1 -1
  600. package/dist/index417.js +119 -62
  601. package/dist/index417.js.map +1 -1
  602. package/dist/index418.js +42 -4
  603. package/dist/index418.js.map +1 -1
  604. package/dist/index419.js +25 -28
  605. package/dist/index419.js.map +1 -1
  606. package/dist/index42.js +6 -4
  607. package/dist/index42.js.map +1 -1
  608. package/dist/index420.js +11 -470
  609. package/dist/index420.js.map +1 -1
  610. package/dist/index421.js +23 -268
  611. package/dist/index421.js.map +1 -1
  612. package/dist/index422.js +24 -0
  613. package/dist/index422.js.map +1 -0
  614. package/dist/index423.js +17 -0
  615. package/dist/index423.js.map +1 -0
  616. package/dist/index424.js +8 -0
  617. package/dist/index424.js.map +1 -0
  618. package/dist/index425.js +328 -0
  619. package/dist/index425.js.map +1 -0
  620. package/dist/index426.js +66 -0
  621. package/dist/index426.js.map +1 -0
  622. package/dist/index427.js +7 -0
  623. package/dist/index427.js.map +1 -0
  624. package/dist/index428.js +31 -0
  625. package/dist/index428.js.map +1 -0
  626. package/dist/index429.js +474 -0
  627. package/dist/index429.js.map +1 -0
  628. package/dist/index43.js +68 -7
  629. package/dist/index43.js.map +1 -1
  630. package/dist/index430.js +272 -0
  631. package/dist/index430.js.map +1 -0
  632. package/dist/index44.js +7 -6
  633. package/dist/index44.js.map +1 -1
  634. package/dist/index45.js +31 -7
  635. package/dist/index45.js.map +1 -1
  636. package/dist/index46.js +10 -10
  637. package/dist/index46.js.map +1 -1
  638. package/dist/index47.js +15 -13
  639. package/dist/index47.js.map +1 -1
  640. package/dist/index48.js +201 -7
  641. package/dist/index48.js.map +1 -1
  642. package/dist/index49.js +20 -6
  643. package/dist/index49.js.map +1 -1
  644. package/dist/index5.js.map +1 -1
  645. package/dist/index50.js +16 -6
  646. package/dist/index50.js.map +1 -1
  647. package/dist/index51.js +123 -14
  648. package/dist/index51.js.map +1 -1
  649. package/dist/index52.js +19 -8
  650. package/dist/index52.js.map +1 -1
  651. package/dist/index53.js +5 -7
  652. package/dist/index53.js.map +1 -1
  653. package/dist/index54.js +9 -68
  654. package/dist/index54.js.map +1 -1
  655. package/dist/index55.js +7 -7
  656. package/dist/index55.js.map +1 -1
  657. package/dist/index56.js +9 -31
  658. package/dist/index56.js.map +1 -1
  659. package/dist/index57.js +13 -10
  660. package/dist/index57.js.map +1 -1
  661. package/dist/index58.js +8 -15
  662. package/dist/index58.js.map +1 -1
  663. package/dist/index59.js +10 -201
  664. package/dist/index59.js.map +1 -1
  665. package/dist/index6.js.map +1 -1
  666. package/dist/index60.js +13 -20
  667. package/dist/index60.js.map +1 -1
  668. package/dist/index61.js +9 -16
  669. package/dist/index61.js.map +1 -1
  670. package/dist/index62.js +10 -123
  671. package/dist/index62.js.map +1 -1
  672. package/dist/index63.js +5 -19
  673. package/dist/index63.js.map +1 -1
  674. package/dist/index64.js +42 -9
  675. package/dist/index64.js.map +1 -1
  676. package/dist/index65.js +387 -9
  677. package/dist/index65.js.map +1 -1
  678. package/dist/index66.js +37 -14
  679. package/dist/index66.js.map +1 -1
  680. package/dist/index67.js +21 -9
  681. package/dist/index67.js.map +1 -1
  682. package/dist/index68.js +4 -9
  683. package/dist/index68.js.map +1 -1
  684. package/dist/index69.js +6 -4
  685. package/dist/index69.js.map +1 -1
  686. package/dist/index7.js +3 -3
  687. package/dist/index7.js.map +1 -1
  688. package/dist/index70.js +57 -41
  689. package/dist/index70.js.map +1 -1
  690. package/dist/index71.js +5 -387
  691. package/dist/index71.js.map +1 -1
  692. package/dist/index72.js +6 -37
  693. package/dist/index72.js.map +1 -1
  694. package/dist/index73.js +5 -21
  695. package/dist/index73.js.map +1 -1
  696. package/dist/index74.js +4 -56
  697. package/dist/index74.js.map +1 -1
  698. package/dist/index75.js +7 -7
  699. package/dist/index75.js.map +1 -1
  700. package/dist/index76.js +6 -5
  701. package/dist/index76.js.map +1 -1
  702. package/dist/index77.js +6 -5
  703. package/dist/index77.js.map +1 -1
  704. package/dist/index78.js +11 -5
  705. package/dist/index78.js.map +1 -1
  706. package/dist/index79.js +11 -5
  707. package/dist/index79.js.map +1 -1
  708. package/dist/index8.js.map +1 -1
  709. package/dist/index80.js +7 -6
  710. package/dist/index80.js.map +1 -1
  711. package/dist/index81.js +10 -6
  712. package/dist/index81.js.map +1 -1
  713. package/dist/index82.js +5 -8
  714. package/dist/index82.js.map +1 -1
  715. package/dist/index83.js +6 -7
  716. package/dist/index83.js.map +1 -1
  717. package/dist/index84.js.map +1 -1
  718. package/dist/index85.js.map +1 -1
  719. package/dist/index86.js.map +1 -1
  720. package/dist/index87.js +2 -2
  721. package/dist/index87.js.map +1 -1
  722. package/dist/index88.js +31 -31
  723. package/dist/index88.js.map +1 -1
  724. package/dist/index89.js +1 -1
  725. package/dist/index89.js.map +1 -1
  726. package/dist/index9.js.map +1 -1
  727. package/dist/index90.js.map +1 -1
  728. package/dist/index91.js.map +1 -1
  729. package/dist/index92.js.map +1 -1
  730. package/dist/index93.js.map +1 -1
  731. package/dist/index94.js.map +1 -1
  732. package/dist/index95.js.map +1 -1
  733. package/dist/index96.js.map +1 -1
  734. package/dist/index97.js.map +1 -1
  735. package/dist/index98.js.map +1 -1
  736. package/dist/index99.js.map +1 -1
  737. package/package.json +13 -13
  738. package/dist/assets/sha256.worker-BEf4_Y9w.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index367.js","names":["React","_formatErrorMessage"],"sources":["../../../node_modules/@base-ui/react/select/root/SelectRootContext.mjs"],"sourcesContent":["'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const SelectRootContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") SelectRootContext.displayName = \"SelectRootContext\";\nexport function useSelectRootContext() {\n const context = React.useContext(SelectRootContext);\n if (context === null) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: SelectRootContext is missing. Select parts must be placed within <Select.Root>.' : _formatErrorMessage(60));\n }\n return context;\n}"],"x_google_ignoreList":[0],"mappings":";;;;AAIA,IAAa,IAAiC,gBAAM,cAAc,IAAI;AACtE,QAAA,IAAA,aAA6B,iBAAc,EAAkB,cAAc;AAC3E,SAAgB,IAAuB;CACrC,IAAM,IAAUA,EAAM,WAAW,CAAiB;CAClD,IAAI,MAAY,MACd,MAAU,MAAA,QAAA,IAAA,aAA+B,eAA4GC,EAAoB,EAAE,IAAnH,0FAAoH;CAE9K,OAAO;AACT"}
1
+ {"version":3,"file":"index367.js","names":["React","React$1","Select","INVISIBLE_FORMATTING_CHARACTERS","stripInvisibleFormatting","value","stripIddPrefix","prefix","COMMON_IDD_PREFIXES","digits","normalizeImplicitInternationalInput","candidate","formatWithAsYouType","phoneNumber","detectedCountry","normalizeExplicitInternationalInput","cleaned","sanitizeDigits","digitsWithoutIdd","normalizeInternationalInput","explicitInternational","getDialCode","parsedDialCode","country","getCountryCallingCode","getInputValueForSelectedCountry","option","normalizedInternational","options","normalizedDigits","currentDialCode","nationalDigits","preferSelectedCountry","parsed","getLengthIssue","parsePhoneInput","rawValue","baseCountry","normalized","hasInternationalPrefix","countryCallingCode","nationalNumber","stripPrefix","international","formatted","national","PhoneNumberInput","countryProp","messagesProp","restProps","props","onInputFocus","onInputBlur","onInputKeyDown","inputName","inputAutoComplete","restInputProps","controlledCountry","localeCacheKey","getLocaleCacheKey","locale","localeForBuild","parseLocaleCacheKey","resolvedMessages","resolveMessages","countryOptions","getCachedCountryOptions","resolveSelectedCountry","match","toSelectedCountry","buildFallbackSelectedCountry","menuPriorityCountry","getValidCountry","defaultCountry","initialStateRef","initialState","uncontrolledCountry","setUncontrolledCountry","inputValueState","setInputValueState","countryQuery","setCountryQuery","showSuggestions","setShowSuggestions","highlightedIndex","setHighlightedIndex","isFocused","setIsFocused","shouldRenderSelect","setShouldRenderSelect","lengthIssue","setLengthIssue","manualSelectionCountryRef","keyboardBufferRef","bufferTimeoutRef","scrollBehaviorRef","pendingSelectionRef","hasNotifiedCountryRef","lastNotifiedCountryRef","inputRef","activeCountry","explicitFormattingCountry","forwardedRef","selection","input","start","end","selectOverrides","selectProps","generatedSelectInstanceId","userSelectStyles","userSelectComponents","userClassNamePrefix","userFormatOptionLabel","userMenuPortalTarget","userMenuPosition","forwardedSelectProps","userSelectInstanceId","restForwardedSelectProps","selectInstanceId","defaultMenuPortalTarget","setDefaultMenuPortalTarget","hasUserMenuPortalTarget","menuPortalTarget","mergedSelectStyles","userMenuPortal","suggestionSelectStyles","baseWithZIndex","provided","base","state","portalRect","portalTarget","mergedSelectComponents","baseComponents","HiddenControl","NullComponent","overrides","SuggestionOption","onCountryChange","emitChange","details","onChange","scheduleBufferReset","applyParsedInput","snapshot","resolveSelection","handleInputChange","target","event","captureSelectionSnapshot","raw","normalizedExplicitInternational","manualCountry","manualDialCode","activeManualCountry","rawDigits","manualOption","handleCountrySelect","filteredOptions","results","pushUnique","existing","priorityOption","currentOption","query","digitQuery","normalizedQuery","normalizeSearchValue","aExact","a","bExact","b","token","aIndex","optionMatchIndex","bIndex","suggestionMenuIsOpen","current","highlightedOption","consumeScrollBehavior","behavior","updateHighlightedOption","index","selectFormatOptionLabel","meta","formatCountryOption","optionLabelRenderer","highlightContextValue","activeOption","activeFlag","inlineFlagLabel","hasInlineFlag","lengthHint","countryName","validationNode","rendered","renderValidationMessage","appendToBuffer","char","popBuffer","handleKeyDown","key","selectionStart","selectionEnd","isCollapsedSelection","nextStart","skipFormattingCharactersLeft","skipFormattingCharactersRight","targetOption","handleFocus","handleBlur","openCountryMenu","disabled","readOnly","shimName","autofillShimName","cn","className","inputClassName","SuggestionContext","noOptionsMessage"],"sources":["../src/components/PhoneNumberInput/index.tsx"],"sourcesContent":["import * as React from \"react\"\nimport type { CountryCode } from \"libphonenumber-js\"\nimport { getCountryCallingCode } from \"libphonenumber-js\"\nimport Select, {\n type Props as SelectProps,\n type SingleValue,\n type StylesConfig,\n} from \"react-select\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport type {\n CountryOption,\n PhoneNumberChangeDetails,\n PhoneNumberInputProps,\n PhoneNumberSelectedCountry,\n} from \"./types\"\nimport { resolveMessages } from \"./messages\"\nimport {\n COMMON_IDD_PREFIXES,\n DEFAULT_COUNTRY,\n buildFallbackSelectedCountry,\n getCachedCountryOptions,\n getLocaleCacheKey,\n getValidCountry,\n normalizeSearchValue,\n optionMatchIndex,\n parseLocaleCacheKey,\n toSelectedCountry,\n} from \"./country-options\"\nimport {\n formatWithAsYouType,\n getLengthIssue,\n sanitizeDigits,\n stripPrefix,\n type LengthIssue,\n} from \"./normalization\"\nimport {\n captureSelectionSnapshot,\n resolveSelection,\n skipFormattingCharactersLeft,\n skipFormattingCharactersRight,\n} from \"./selection\"\nimport {\n HiddenControl,\n NullComponent,\n SuggestionContext,\n SuggestionOption,\n formatCountryOption,\n suggestionSelectStyles,\n type SuggestionContextValue,\n} from \"./suggestions\"\n\n\nexport type {\n CountryOption,\n PhoneNumberChangeDetails,\n PhoneNumberInputMessages,\n PhoneNumberInputProps,\n PhoneNumberInputValidationCode,\n PhoneNumberSelectedCountry,\n} from \"./types\"\n\nconst INVISIBLE_FORMATTING_CHARACTERS =\n /[\\u061C\\u200B-\\u200F\\u202A-\\u202E\\u2066-\\u2069\\uFEFF]/g\n\ntype ParsedInput = Omit<PhoneNumberChangeDetails, \"selectedCountry\"> & {\n displayValue: string\n lengthIssue: LengthIssue | null\n}\n\nfunction stripInvisibleFormatting(value: string) {\n return value.replace(INVISIBLE_FORMATTING_CHARACTERS, \"\")\n}\n\nfunction stripIddPrefix(digits: string) {\n for (const prefix of COMMON_IDD_PREFIXES) {\n if (digits.startsWith(prefix)) {\n return digits.slice(prefix.length)\n }\n }\n return digits\n}\n\nfunction normalizeImplicitInternationalInput(digits: string) {\n const candidate = `+${digits}`\n const { phoneNumber, detectedCountry } = formatWithAsYouType(candidate)\n\n if (phoneNumber?.isValid() && detectedCountry) {\n return candidate\n }\n\n return null\n}\n\nfunction normalizeExplicitInternationalInput(value: string) {\n const cleaned = stripInvisibleFormatting(value).trim()\n if (!cleaned) {\n return null\n }\n\n if (cleaned.startsWith(\"+\")) {\n const digits = sanitizeDigits(cleaned)\n if (!digits) {\n return \"+\"\n }\n\n const digitsWithoutIdd = stripIddPrefix(digits)\n return digitsWithoutIdd ? `+${digitsWithoutIdd}` : \"+\"\n }\n\n const digits = sanitizeDigits(cleaned)\n if (!digits) {\n return null\n }\n\n const digitsWithoutIdd = stripIddPrefix(digits)\n if (digitsWithoutIdd !== digits) {\n return digitsWithoutIdd ? `+${digitsWithoutIdd}` : \"+\"\n }\n\n return null\n}\n\nfunction normalizeInternationalInput(value: string) {\n const explicitInternational = normalizeExplicitInternationalInput(value)\n if (explicitInternational != null) {\n return explicitInternational\n }\n\n const cleaned = stripInvisibleFormatting(value).trim()\n const digits = sanitizeDigits(cleaned)\n if (!digits) {\n return null\n }\n\n return normalizeImplicitInternationalInput(digits)\n}\n\nfunction getDialCode(country: CountryCode | null, parsedDialCode: string | undefined) {\n if (parsedDialCode) {\n return parsedDialCode\n }\n return country ? getCountryCallingCode(country) : null\n}\n\nfunction getInputValueForSelectedCountry(\n value: string,\n option: Pick<CountryOption, \"dialCode\" | \"value\">,\n options?: { allowImplicitInternational?: boolean }\n) {\n const cleaned = stripInvisibleFormatting(value).trim()\n const digits = sanitizeDigits(cleaned)\n\n if (!digits) {\n return `+${option.dialCode}`\n }\n\n const normalizedInternational =\n options?.allowImplicitInternational === false\n ? normalizeExplicitInternationalInput(cleaned)\n : normalizeInternationalInput(cleaned)\n if (normalizedInternational) {\n const normalizedDigits = sanitizeDigits(normalizedInternational)\n if (normalizedDigits.startsWith(option.dialCode)) {\n return normalizedInternational\n }\n\n const { phoneNumber } = formatWithAsYouType(normalizedInternational)\n const currentDialCode = phoneNumber?.countryCallingCode\n const nationalDigits =\n currentDialCode && normalizedDigits.startsWith(currentDialCode)\n ? normalizedDigits.slice(currentDialCode.length)\n : phoneNumber?.nationalNumber ?? normalizedDigits\n\n return `+${option.dialCode}${nationalDigits}`\n }\n\n const { phoneNumber } = formatWithAsYouType(cleaned, option.value)\n return `+${option.dialCode}${phoneNumber?.nationalNumber ?? digits}`\n}\n\nfunction preferSelectedCountry(\n parsed: ParsedInput,\n option: Pick<CountryOption, \"dialCode\" | \"value\">\n): ParsedInput {\n return {\n ...parsed,\n country: option.value,\n countryCallingCode: option.dialCode,\n lengthIssue: getLengthIssue(parsed.rawInput, option.value),\n }\n}\n\nfunction parsePhoneInput(rawValue: string | undefined, baseCountry?: CountryCode): ParsedInput {\n const cleaned = stripInvisibleFormatting(rawValue ?? \"\").trim()\n\n if (!cleaned) {\n const country = baseCountry ?? null\n const countryCallingCode = country ? getCountryCallingCode(country) : null\n\n return {\n displayValue: \"\",\n formattedInternational: \"\",\n formattedNational: \"\",\n e164: null,\n country,\n countryCallingCode,\n nationalNumber: \"\",\n rawInput: \"\",\n isValid: false,\n lengthIssue: null,\n }\n }\n\n const normalizedInternational = normalizeInternationalInput(cleaned)\n const shouldFormat = normalizedInternational != null || baseCountry != null\n\n if (!shouldFormat) {\n return {\n displayValue: cleaned,\n formattedInternational: cleaned,\n formattedNational: cleaned,\n e164: null,\n country: null,\n countryCallingCode: null,\n nationalNumber: sanitizeDigits(cleaned),\n rawInput: cleaned,\n isValid: false,\n lengthIssue: null,\n }\n }\n\n const normalized = normalizedInternational ?? cleaned\n const {\n international,\n national,\n formatted,\n phoneNumber,\n detectedCountry,\n } = formatWithAsYouType(normalized, baseCountry)\n const hasInternationalPrefix = normalizedInternational != null\n const country = hasInternationalPrefix\n ? detectedCountry ?? baseCountry ?? null\n : baseCountry ?? detectedCountry ?? null\n const countryCallingCode = getDialCode(country, phoneNumber?.countryCallingCode)\n const normalizedDigits = sanitizeDigits(normalized)\n const nationalNumber =\n phoneNumber?.nationalNumber ??\n (countryCallingCode && normalized.startsWith(\"+\")\n ? stripPrefix(normalizedDigits, countryCallingCode)\n : sanitizeDigits(cleaned))\n const displayValue = hasInternationalPrefix ? international : formatted\n\n return {\n displayValue,\n formattedInternational: phoneNumber?.formatInternational() ?? international,\n formattedNational: phoneNumber?.formatNational() ?? national,\n e164: phoneNumber?.number ?? null,\n country,\n countryCallingCode,\n nationalNumber,\n rawInput: normalized,\n isValid: phoneNumber?.isValid() ?? false,\n lengthIssue: country ? getLengthIssue(normalized, country) : null,\n }\n}\n\nexport const PhoneNumberInput = React.forwardRef<HTMLInputElement, PhoneNumberInputProps>(\n function PhoneNumberInput(props, forwardedRef) {\n const {\n value,\n defaultCountry,\n country: countryProp,\n locale,\n onChange,\n onCountryChange,\n className,\n inputClassName,\n disabled,\n readOnly,\n selectProps,\n autofillShimName,\n messages: messagesProp,\n renderValidationMessage,\n ...restProps\n } = props\n\n const {\n onFocus: onInputFocus,\n onBlur: onInputBlur,\n onKeyDown: onInputKeyDown,\n name: inputName,\n autoComplete: inputAutoComplete,\n ...restInputProps\n } = restProps\n\n const controlledCountry = typeof countryProp === \"string\" ? countryProp : null\n const localeCacheKey = getLocaleCacheKey(locale)\n const localeForBuild = React.useMemo(\n () => parseLocaleCacheKey(localeCacheKey),\n [localeCacheKey]\n )\n const resolvedMessages = React.useMemo(\n () => resolveMessages(localeForBuild, messagesProp),\n [localeForBuild, messagesProp]\n )\n const countryOptions = React.useMemo(\n () => getCachedCountryOptions(localeForBuild, localeCacheKey),\n [localeCacheKey, localeForBuild]\n )\n const resolveSelectedCountry = React.useCallback(\n (country: CountryCode): PhoneNumberSelectedCountry => {\n const match = countryOptions.find((candidate) => candidate.value === country)\n if (match) {\n return toSelectedCountry(match)\n }\n return buildFallbackSelectedCountry(country)\n },\n [countryOptions]\n )\n const menuPriorityCountry = React.useMemo(() => {\n const candidate = getValidCountry(defaultCountry ?? countryProp ?? DEFAULT_COUNTRY)\n if (countryOptions.some((option) => option.value === candidate)) {\n return candidate\n }\n return countryOptions[0]?.value ?? DEFAULT_COUNTRY\n }, [countryOptions, countryProp, defaultCountry])\n\n const initialStateRef = React.useRef<ParsedInput | null>(null)\n\n if (!initialStateRef.current) {\n const initialState = parsePhoneInput(value, controlledCountry ?? undefined)\n initialStateRef.current = initialState\n }\n\n const initialState = initialStateRef.current\n\n const [uncontrolledCountry, setUncontrolledCountry] = React.useState<CountryCode | null>(\n controlledCountry ? null : initialState.country\n )\n const [inputValueState, setInputValueState] = React.useState(initialState.displayValue)\n const [countryQuery, setCountryQuery] = React.useState(\"\")\n const [showSuggestions, setShowSuggestions] = React.useState(false)\n const [highlightedIndex, setHighlightedIndex] = React.useState<number>(-1)\n const [isFocused, setIsFocused] = React.useState(false)\n const [shouldRenderSelect, setShouldRenderSelect] = React.useState(false)\n const [lengthIssue, setLengthIssue] = React.useState<LengthIssue | null>(\n initialState.lengthIssue\n )\n\n const manualSelectionCountryRef = React.useRef<CountryCode | null>(null)\n const keyboardBufferRef = React.useRef(\"\")\n const bufferTimeoutRef = React.useRef<number | null>(null)\n const scrollBehaviorRef = React.useRef<ScrollBehavior>(\"smooth\")\n const pendingSelectionRef = React.useRef<{ start: number; end: number } | null>(null)\n const hasNotifiedCountryRef = React.useRef(false)\n const lastNotifiedCountryRef = React.useRef<CountryCode | null>(null)\n const inputRef = React.useRef<HTMLInputElement | null>(null)\n\n const activeCountry = controlledCountry ?? uncontrolledCountry\n const explicitFormattingCountry = controlledCountry ?? manualSelectionCountryRef.current ?? undefined\n\n React.useImperativeHandle(forwardedRef, () => inputRef.current as HTMLInputElement, [])\n\n React.useLayoutEffect(() => {\n setShouldRenderSelect(true)\n }, [])\n\n React.useLayoutEffect(() => {\n const selection = pendingSelectionRef.current\n if (!selection) {\n return\n }\n\n const input = inputRef.current\n pendingSelectionRef.current = null\n if (!input) {\n return\n }\n\n const { start, end } = selection\n input.setSelectionRange(start, end)\n }, [inputValueState])\n\n const selectOverrides = selectProps ?? {}\n const generatedSelectInstanceId = React.useId()\n const {\n styles: userSelectStyles,\n components: userSelectComponents,\n classNamePrefix: userClassNamePrefix,\n formatOptionLabel: userFormatOptionLabel,\n menuPortalTarget: userMenuPortalTarget,\n menuPosition: userMenuPosition,\n ...forwardedSelectProps\n } = selectOverrides\n const {\n instanceId: userSelectInstanceId,\n noOptionsMessage,\n ...restForwardedSelectProps\n } = forwardedSelectProps\n const selectInstanceId = userSelectInstanceId ?? generatedSelectInstanceId\n const [defaultMenuPortalTarget, setDefaultMenuPortalTarget] =\n React.useState<HTMLElement | null>(null)\n const hasUserMenuPortalTarget = \"menuPortalTarget\" in selectOverrides\n const menuPortalTarget = hasUserMenuPortalTarget\n ? userMenuPortalTarget\n : defaultMenuPortalTarget\n\n const mergedSelectStyles = React.useMemo<StylesConfig<CountryOption, false>>(\n () => {\n const userMenuPortal = userSelectStyles?.menuPortal\n\n return {\n ...suggestionSelectStyles,\n ...(userSelectStyles ?? {}),\n menuPortal: (provided, state) => {\n const baseWithZIndex = {\n ...provided,\n zIndex: 1300,\n }\n const base = userMenuPortal ? userMenuPortal(baseWithZIndex, state) : baseWithZIndex\n\n if (typeof document === \"undefined\" || !menuPortalTarget || menuPortalTarget === document.body) {\n return base\n }\n\n const portalRect = menuPortalTarget.getBoundingClientRect()\n return {\n ...base,\n left: typeof base.left === \"number\" ? base.left - portalRect.left : base.left,\n top: typeof base.top === \"number\" ? base.top - portalRect.top : base.top,\n }\n },\n }\n },\n [menuPortalTarget, userSelectStyles]\n )\n\n React.useLayoutEffect(() => {\n if (hasUserMenuPortalTarget || typeof document === \"undefined\") {\n return\n }\n\n const portalTarget =\n inputRef.current?.closest<HTMLElement>(\n \"[data-slot='dialog-content'], [data-slot='sheet-content'], [role='dialog']\"\n ) ?? document.body\n setDefaultMenuPortalTarget(portalTarget)\n }, [hasUserMenuPortalTarget])\n\n const mergedSelectComponents = React.useMemo(() => {\n const baseComponents = {\n Control: HiddenControl,\n IndicatorsContainer: NullComponent,\n DropdownIndicator: NullComponent,\n IndicatorSeparator: NullComponent,\n ValueContainer: NullComponent,\n }\n\n const overrides = userSelectComponents ?? {}\n\n if (!overrides.Option) {\n return {\n ...baseComponents,\n ...overrides,\n Option: SuggestionOption,\n }\n }\n\n return {\n ...baseComponents,\n ...overrides,\n }\n }, [userSelectComponents])\n\n React.useEffect(() => () => {\n if (bufferTimeoutRef.current != null && typeof window !== \"undefined\") {\n window.clearTimeout(bufferTimeoutRef.current)\n }\n }, [])\n\n React.useEffect(() => {\n if (value == null) {\n return\n }\n\n const parsed = parsePhoneInput(value, explicitFormattingCountry)\n keyboardBufferRef.current = \"\"\n\n setInputValueState(parsed.displayValue)\n setShowSuggestions(false)\n setCountryQuery(\"\")\n setHighlightedIndex(-1)\n setLengthIssue(parsed.lengthIssue)\n\n if (!controlledCountry && parsed.country !== uncontrolledCountry) {\n setUncontrolledCountry(parsed.country)\n }\n }, [controlledCountry, explicitFormattingCountry, uncontrolledCountry, value])\n\n React.useEffect(() => {\n const country = activeCountry ?? null\n if (!hasNotifiedCountryRef.current && country == null) {\n return\n }\n\n if (hasNotifiedCountryRef.current && lastNotifiedCountryRef.current === country) {\n return\n }\n\n hasNotifiedCountryRef.current = true\n lastNotifiedCountryRef.current = country\n onCountryChange?.(country, country ? resolveSelectedCountry(country) : null)\n }, [activeCountry, onCountryChange, resolveSelectedCountry])\n\n const emitChange = React.useCallback(\n (details: Omit<PhoneNumberChangeDetails, \"selectedCountry\">) => {\n onChange?.({\n ...details,\n selectedCountry: details.country ? resolveSelectedCountry(details.country) : null,\n })\n },\n [onChange, resolveSelectedCountry]\n )\n\n const scheduleBufferReset = React.useCallback(() => {\n if (typeof window === \"undefined\") {\n return\n }\n\n if (bufferTimeoutRef.current != null) {\n window.clearTimeout(bufferTimeoutRef.current)\n }\n\n bufferTimeoutRef.current = window.setTimeout(() => {\n keyboardBufferRef.current = \"\"\n bufferTimeoutRef.current = null\n }, 800)\n }, [])\n\n const applyParsedInput = React.useCallback(\n (parsed: ParsedInput, snapshot: ReturnType<typeof captureSelectionSnapshot> | null) => {\n setInputValueState(parsed.displayValue)\n setShowSuggestions(false)\n setCountryQuery(\"\")\n setHighlightedIndex(-1)\n setLengthIssue(parsed.lengthIssue)\n\n if (!controlledCountry && parsed.country !== uncontrolledCountry) {\n setUncontrolledCountry(parsed.country)\n }\n\n if (snapshot) {\n pendingSelectionRef.current = resolveSelection(snapshot, parsed.displayValue)\n }\n\n emitChange({\n formattedInternational: parsed.formattedInternational,\n formattedNational: parsed.formattedNational,\n e164: parsed.e164,\n country: parsed.country,\n countryCallingCode: parsed.countryCallingCode,\n nationalNumber: parsed.nationalNumber,\n rawInput: parsed.rawInput,\n isValid: parsed.isValid,\n })\n },\n [controlledCountry, emitChange, uncontrolledCountry]\n )\n\n const handleInputChange = React.useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n const target = event.target\n const snapshot = captureSelectionSnapshot(target)\n const raw = target.value\n keyboardBufferRef.current = \"\"\n\n const normalizedExplicitInternational = normalizeExplicitInternationalInput(raw)\n const manualCountry = manualSelectionCountryRef.current\n if (normalizedExplicitInternational != null && manualCountry) {\n const manualDialCode = getCountryCallingCode(manualCountry)\n if (!sanitizeDigits(normalizedExplicitInternational).startsWith(manualDialCode)) {\n manualSelectionCountryRef.current = null\n }\n } else if (normalizedExplicitInternational != null) {\n manualSelectionCountryRef.current = null\n }\n\n const activeManualCountry = manualSelectionCountryRef.current\n const rawDigits = sanitizeDigits(raw)\n if (\n !controlledCountry &&\n activeManualCountry &&\n normalizedExplicitInternational == null &&\n rawDigits\n ) {\n const manualOption = {\n value: activeManualCountry,\n dialCode: getCountryCallingCode(activeManualCountry),\n }\n const parsed = preferSelectedCountry(\n parsePhoneInput(\n getInputValueForSelectedCountry(\n raw,\n {\n value: manualOption.value,\n dialCode: manualOption.dialCode,\n },\n { allowImplicitInternational: false }\n ),\n activeManualCountry\n ),\n manualOption\n )\n applyParsedInput(parsed, snapshot)\n return\n }\n\n const baseCountry = controlledCountry ?? activeManualCountry ?? undefined\n const parsed = parsePhoneInput(raw, baseCountry)\n applyParsedInput(parsed, snapshot)\n },\n [applyParsedInput, controlledCountry]\n )\n\n const handleCountrySelect = React.useCallback(\n (option: SingleValue<CountryOption>) => {\n if (!option) {\n return\n }\n\n manualSelectionCountryRef.current = option.value\n const nextInputValue = getInputValueForSelectedCountry(inputValueState, option)\n const parsed = preferSelectedCountry(\n parsePhoneInput(nextInputValue, option.value),\n option\n )\n\n setInputValueState(parsed.displayValue)\n pendingSelectionRef.current = {\n start: parsed.displayValue.length,\n end: parsed.displayValue.length,\n }\n setShowSuggestions(false)\n setCountryQuery(\"\")\n setHighlightedIndex(-1)\n setLengthIssue(parsed.lengthIssue)\n\n if (!controlledCountry) {\n setUncontrolledCountry(option.value)\n }\n\n emitChange({\n formattedInternational: parsed.formattedInternational,\n formattedNational: parsed.formattedNational,\n e164: parsed.e164,\n country: parsed.country,\n countryCallingCode: parsed.countryCallingCode,\n nationalNumber: parsed.nationalNumber,\n rawInput: parsed.rawInput,\n isValid: parsed.isValid,\n })\n\n requestAnimationFrame(() => {\n inputRef.current?.focus()\n })\n },\n [controlledCountry, emitChange, inputValueState]\n )\n\n const filteredOptions = React.useMemo(() => {\n if (!showSuggestions) {\n return [] as CountryOption[]\n }\n\n const results: CountryOption[] = []\n\n const pushUnique = (option: CountryOption | undefined) => {\n if (option && !results.some((existing) => existing.value === option.value)) {\n results.push(option)\n }\n }\n\n const priorityOption = countryOptions.find((option) => option.value === menuPriorityCountry)\n const currentOption = activeCountry\n ? countryOptions.find((option) => option.value === activeCountry)\n : undefined\n const query = countryQuery.trim()\n const digitQuery = sanitizeDigits(query)\n const normalizedQuery = normalizeSearchValue(query)\n\n if (!digitQuery && !normalizedQuery) {\n pushUnique(currentOption)\n pushUnique(priorityOption)\n countryOptions.forEach(pushUnique)\n return results\n }\n\n if (digitQuery) {\n const dialMatches = countryOptions\n .filter((option) => option.dialCode.startsWith(digitQuery))\n .sort((a, b) => {\n const aExact = a.dialCode === digitQuery\n const bExact = b.dialCode === digitQuery\n if (aExact && !bExact) {\n return -1\n }\n if (!aExact && bExact) {\n return 1\n }\n return a.dialCode.length - b.dialCode.length\n })\n dialMatches.forEach(pushUnique)\n }\n\n if (normalizedQuery) {\n const nameMatches = countryOptions\n .filter((option) =>\n option.normalizedSearchableTokens.some((token) => token.includes(normalizedQuery))\n )\n .sort((a, b) => {\n const aIndex = optionMatchIndex(a.normalizedSearchableTokens, normalizedQuery)\n const bIndex = optionMatchIndex(b.normalizedSearchableTokens, normalizedQuery)\n if (aIndex !== bIndex) {\n return aIndex - bIndex\n }\n return a.name.localeCompare(b.name)\n })\n nameMatches.forEach(pushUnique)\n }\n\n pushUnique(currentOption)\n pushUnique(priorityOption)\n if (results.length === 0) {\n countryOptions.forEach(pushUnique)\n }\n\n return results\n }, [activeCountry, countryOptions, countryQuery, menuPriorityCountry, showSuggestions])\n\n const suggestionMenuIsOpen = isFocused && showSuggestions && filteredOptions.length > 0\n\n React.useEffect(() => {\n if (!suggestionMenuIsOpen) {\n scrollBehaviorRef.current = \"smooth\"\n }\n }, [suggestionMenuIsOpen])\n\n React.useEffect(() => {\n if (!suggestionMenuIsOpen) {\n setHighlightedIndex(-1)\n return\n }\n\n if (filteredOptions.length === 0) {\n setHighlightedIndex(-1)\n return\n }\n\n setHighlightedIndex((current) => {\n if (current < 0 || current >= filteredOptions.length) {\n return 0\n }\n return current\n })\n }, [filteredOptions, suggestionMenuIsOpen])\n\n const highlightedOption =\n highlightedIndex >= 0 ? filteredOptions[highlightedIndex] ?? null : null\n\n React.useEffect(() => {\n if (highlightedIndex < 0) {\n scrollBehaviorRef.current = \"smooth\"\n }\n }, [highlightedIndex])\n\n const consumeScrollBehavior = React.useCallback(() => {\n const behavior = scrollBehaviorRef.current\n scrollBehaviorRef.current = \"smooth\"\n return behavior\n }, [])\n\n const updateHighlightedOption = React.useCallback(\n (option: CountryOption) => {\n const index = filteredOptions.findIndex((candidate) => candidate.value === option.value)\n if (index !== -1) {\n setHighlightedIndex(index)\n }\n },\n [filteredOptions]\n )\n\n const selectFormatOptionLabel = React.useCallback<\n NonNullable<SelectProps<CountryOption, false>[\"formatOptionLabel\"]>\n >(\n (option, meta) => {\n if (userFormatOptionLabel) {\n return userFormatOptionLabel(option, meta)\n }\n return formatCountryOption(option)\n },\n [userFormatOptionLabel]\n )\n\n const optionLabelRenderer = React.useCallback(\n (option: CountryOption) =>\n selectFormatOptionLabel(option, {\n context: \"menu\",\n inputValue: countryQuery,\n selectValue: [],\n }),\n [countryQuery, selectFormatOptionLabel]\n )\n\n const highlightContextValue = React.useMemo<SuggestionContextValue>(\n () => ({\n highlightedValue: highlightedOption?.value ?? null,\n setHighlightedOption: updateHighlightedOption,\n renderOptionLabel: optionLabelRenderer,\n consumeScrollBehavior,\n }),\n [consumeScrollBehavior, highlightedOption, optionLabelRenderer, updateHighlightedOption]\n )\n\n const activeOption = activeCountry\n ? countryOptions.find((option) => option.value === activeCountry)\n : undefined\n const activeFlag = activeOption?.flag ?? \"\"\n const inlineFlagLabel = activeCountry\n ? resolvedMessages.selectedCountryLabel(activeOption?.name ?? activeCountry)\n : resolvedMessages.selectCountryLabel\n const hasInlineFlag = Boolean(activeCountry && activeFlag)\n const lengthHint =\n lengthIssue === \"TOO_LONG\"\n ? resolvedMessages.lengthTooLong(activeOption?.name ?? activeCountry ?? null)\n : null\n const countryName = activeOption?.name ?? activeCountry ?? null\n\n let validationNode: React.ReactNode = null\n if (lengthHint) {\n const rendered = renderValidationMessage?.({\n message: lengthHint,\n code: \"TOO_LONG\",\n countryName,\n })\n validationNode =\n rendered === undefined ? (\n <p className=\"mt-1 text-xs text-destructive\">\n <span>{lengthHint}</span>\n </p>\n ) : (\n rendered\n )\n }\n\n const appendToBuffer = React.useCallback(\n (char: string) => {\n keyboardBufferRef.current = `${keyboardBufferRef.current}${char}`.slice(-12)\n setCountryQuery(keyboardBufferRef.current)\n setShowSuggestions(true)\n scheduleBufferReset()\n },\n [scheduleBufferReset]\n )\n\n const popBuffer = React.useCallback(() => {\n const current = keyboardBufferRef.current\n if (!current) {\n return\n }\n keyboardBufferRef.current = current.slice(0, -1)\n setCountryQuery(keyboardBufferRef.current)\n if (keyboardBufferRef.current) {\n scheduleBufferReset()\n }\n }, [scheduleBufferReset])\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLInputElement>) => {\n onInputKeyDown?.(event)\n if (event.defaultPrevented) {\n return\n }\n\n const key = event.key\n\n if (event.metaKey || event.ctrlKey || event.altKey) {\n return\n }\n\n const target = event.currentTarget\n const value = target.value\n const selectionStart = target.selectionStart ?? 0\n const selectionEnd = target.selectionEnd ?? selectionStart\n const isCollapsedSelection = selectionStart === selectionEnd\n\n if (key === \"Backspace\" && isCollapsedSelection) {\n const nextStart = skipFormattingCharactersLeft(value, selectionStart)\n if (nextStart !== selectionStart) {\n target.setSelectionRange(nextStart, nextStart)\n }\n } else if (key === \"ArrowLeft\" && isCollapsedSelection) {\n const nextStart = skipFormattingCharactersLeft(value, selectionStart)\n if (nextStart !== selectionStart) {\n event.preventDefault()\n target.setSelectionRange(nextStart, nextStart)\n return\n }\n } else if (key === \"ArrowRight\" && isCollapsedSelection) {\n const nextStart = skipFormattingCharactersRight(value, selectionEnd)\n if (nextStart !== selectionEnd) {\n event.preventDefault()\n target.setSelectionRange(nextStart, nextStart)\n return\n }\n }\n\n if (key === \"ArrowDown\") {\n scrollBehaviorRef.current = event.repeat ? \"auto\" : \"smooth\"\n event.preventDefault()\n if (!showSuggestions) {\n setShowSuggestions(true)\n setHighlightedIndex(filteredOptions.length > 0 ? 0 : -1)\n return\n }\n\n if (filteredOptions.length > 0) {\n setHighlightedIndex((current) => {\n const next = current < 0 ? 0 : (current + 1) % filteredOptions.length\n return next\n })\n }\n return\n }\n\n if (key === \"ArrowUp\") {\n scrollBehaviorRef.current = event.repeat ? \"auto\" : \"smooth\"\n event.preventDefault()\n if (!showSuggestions) {\n setShowSuggestions(true)\n setHighlightedIndex(filteredOptions.length > 0 ? filteredOptions.length - 1 : -1)\n return\n }\n\n if (filteredOptions.length > 0) {\n setHighlightedIndex((current) => {\n if (current < 0) {\n return filteredOptions.length - 1\n }\n return (current - 1 + filteredOptions.length) % filteredOptions.length\n })\n }\n return\n }\n\n if (/^[a-z]$/i.test(key)) {\n event.preventDefault()\n if (!showSuggestions) {\n setShowSuggestions(true)\n setHighlightedIndex(filteredOptions.length > 0 ? 0 : -1)\n }\n appendToBuffer(key.toLowerCase())\n return\n }\n\n if (suggestionMenuIsOpen) {\n if (key === \"Backspace\" && keyboardBufferRef.current) {\n event.preventDefault()\n popBuffer()\n return\n }\n\n if (key === \"Escape\") {\n event.preventDefault()\n keyboardBufferRef.current = \"\"\n setCountryQuery(\"\")\n setShowSuggestions(false)\n return\n }\n\n if (key === \"Enter\" && filteredOptions.length > 0) {\n event.preventDefault()\n const targetOption = highlightedOption ?? filteredOptions[0]\n handleCountrySelect(targetOption)\n return\n }\n }\n },\n [\n appendToBuffer,\n filteredOptions,\n handleCountrySelect,\n highlightedOption,\n onInputKeyDown,\n popBuffer,\n showSuggestions,\n suggestionMenuIsOpen,\n ]\n )\n\n const handleFocus = React.useCallback(\n (event: React.FocusEvent<HTMLInputElement>) => {\n setIsFocused(true)\n onInputFocus?.(event)\n },\n [onInputFocus]\n )\n\n const handleBlur = React.useCallback(\n (event: React.FocusEvent<HTMLInputElement>) => {\n setIsFocused(false)\n setShowSuggestions(false)\n keyboardBufferRef.current = \"\"\n setCountryQuery(\"\")\n onInputBlur?.(event)\n },\n [onInputBlur]\n )\n\n const openCountryMenu = React.useCallback(() => {\n if (disabled || readOnly) {\n return\n }\n\n keyboardBufferRef.current = \"\"\n setCountryQuery(\"\")\n setShowSuggestions(true)\n setHighlightedIndex((current) => (current < 0 ? 0 : current))\n\n requestAnimationFrame(() => {\n inputRef.current?.focus()\n })\n }, [disabled, readOnly])\n\n const shimName = autofillShimName ?? (inputName ? `${inputName}_shim` : undefined)\n\n return (\n <div className={cn(\"relative flex flex-col\", className)}>\n <div className=\"relative\">\n <input\n {...restInputProps}\n ref={inputRef}\n type=\"tel\"\n className={cn(\n \"flex h-10 w-full rounded-md border border-input bg-background py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n \"pl-11 pr-3\",\n inputClassName\n )}\n name={inputName}\n value={inputValueState}\n onChange={handleInputChange}\n onFocus={handleFocus}\n onBlur={handleBlur}\n onKeyDown={handleKeyDown}\n disabled={disabled}\n readOnly={readOnly}\n autoComplete={inputAutoComplete ?? \"off\"}\n />\n <button\n type=\"button\"\n className={cn(\n \"absolute left-3 top-1/2 flex h-6 w-6 -translate-y-1/2 items-center justify-center rounded border text-lg leading-none transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n hasInlineFlag\n ? \"border-transparent\"\n : \"border-dashed border-border text-muted-foreground\",\n disabled\n ? \"cursor-not-allowed opacity-50\"\n : readOnly\n ? \"cursor-default\"\n : \"cursor-pointer hover:bg-muted\"\n )}\n aria-label={inlineFlagLabel}\n onMouseDown={(event) => event.preventDefault()}\n onClick={openCountryMenu}\n tabIndex={-1}\n disabled={disabled}\n >\n <span aria-hidden=\"true\">\n {hasInlineFlag ? activeFlag : \"?\"}\n </span>\n </button>\n </div>\n\n {shimName ? (\n <input\n tabIndex={-1}\n autoComplete=\"tel\"\n name={shimName}\n aria-hidden=\"true\"\n className=\"pointer-events-none absolute left-0 top-0 h-0 w-0 opacity-0\"\n />\n ) : null}\n\n <div\n className=\"absolute left-0 top-full z-30 mt-1\"\n style={{\n pointerEvents: suggestionMenuIsOpen ? \"auto\" : \"none\",\n width: \"min(260px, 100%)\",\n }}\n onMouseDown={(event) => event.preventDefault()}\n >\n {shouldRenderSelect ? (\n <SuggestionContext.Provider value={highlightContextValue}>\n <Select<CountryOption, false>\n {...restForwardedSelectProps}\n instanceId={selectInstanceId}\n menuIsOpen={suggestionMenuIsOpen}\n options={filteredOptions}\n value={null}\n components={mergedSelectComponents}\n styles={mergedSelectStyles}\n isClearable={false}\n isSearchable={false}\n backspaceRemovesValue={false}\n tabSelectsValue={false}\n menuShouldScrollIntoView={false}\n menuPortalTarget={menuPortalTarget}\n menuPosition={userMenuPosition ?? (menuPortalTarget ? \"fixed\" : \"absolute\")}\n onChange={handleCountrySelect}\n classNamePrefix={userClassNamePrefix ?? \"phone-number-suggestions\"}\n placeholder=\"\"\n formatOptionLabel={selectFormatOptionLabel}\n noOptionsMessage={\n noOptionsMessage ?? (() => resolvedMessages.noMatches)\n }\n />\n </SuggestionContext.Provider>\n ) : null}\n </div>\n\n {validationNode}\n </div>\n )\n }\n)\n\nPhoneNumberInput.displayName = \"PhoneNumberInput\"\n"],"mappings":";;;;;;;;;;;AA+DA,IAAMG,IACJ;AAOF,SAASC,EAAyB,GAAe;CAC/C,OAAOC,EAAM,QAAQF,GAAiC,EAAE;AAC1D;AAEA,SAASG,EAAe,GAAgB;CACtC,KAAK,IAAMC,KAAUC,GACnB,IAAIC,EAAO,WAAWF,CAAM,GAC1B,OAAOE,EAAO,MAAMF,EAAO,MAAM;CAGrC,OAAOE;AACT;AAEA,SAASC,GAAoC,GAAgB;CAC3D,IAAMC,IAAY,IAAIF,KAChB,EAAE,gBAAa,uBAAoBG,EAAoBD,CAAS;CAMtE,OAJIE,GAAa,QAAQ,KAAKC,IACrBH,IAGF;AACT;AAEA,SAASI,GAAoC,GAAe;CAC1D,IAAMC,IAAUZ,EAAyBC,CAAK,CAAC,CAAC,KAAK;CACrD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;MACV,iBAAiB9C,MAAuB;MACxC,aAAY;MACZ,mBAAmBwE;MACnB,kBACEqC,aAA2B9J,EAAiB;KAE/C,CAAA;IACyB,CAAA,IAC1B;GACD,CAAA;GAEJoI;EACE;;AAET,CACF;AAEA,EAAiB,cAAc"}
package/dist/index368.js CHANGED
@@ -1,29 +1,11 @@
1
- //#region ../../node_modules/@base-ui/react/internals/field-constants/constants.mjs
2
- var e = {
3
- badInput: !1,
4
- customError: !1,
5
- patternMismatch: !1,
6
- rangeOverflow: !1,
7
- rangeUnderflow: !1,
8
- stepMismatch: !1,
9
- tooLong: !1,
10
- tooShort: !1,
11
- typeMismatch: !1,
12
- valid: null,
13
- valueMissing: !1
14
- }, t = {
15
- valid: null,
16
- touched: !1,
17
- dirty: !1,
18
- filled: !1,
19
- focused: !1
20
- }, n = {
21
- disabled: !1,
22
- ...t
23
- }, r = { valid(e) {
24
- return e === null ? null : e ? { "data-valid": "" } : { "data-invalid": "" };
25
- } };
1
+ "use client";
2
+ import * as e from "react";
3
+ //#region ../../node_modules/@base-ui/utils/useOnFirstRender.mjs
4
+ function t(t) {
5
+ let n = e.useRef(!0);
6
+ n.current && (n.current = !1, t());
7
+ }
26
8
  //#endregion
27
- export { n as DEFAULT_FIELD_ROOT_STATE, t as DEFAULT_FIELD_STATE_ATTRIBUTES, e as DEFAULT_VALIDITY_STATE, r as fieldValidityMapping };
9
+ export { t as useOnFirstRender };
28
10
 
29
11
  //# sourceMappingURL=index368.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index368.js","names":[],"sources":["../../../node_modules/@base-ui/react/internals/field-constants/constants.mjs"],"sourcesContent":["export const DEFAULT_VALIDITY_STATE = {\n badInput: false,\n customError: false,\n patternMismatch: false,\n rangeOverflow: false,\n rangeUnderflow: false,\n stepMismatch: false,\n tooLong: false,\n tooShort: false,\n typeMismatch: false,\n valid: null,\n valueMissing: false\n};\nexport const DEFAULT_FIELD_STATE_ATTRIBUTES = {\n valid: null,\n touched: false,\n dirty: false,\n filled: false,\n focused: false\n};\nexport const DEFAULT_FIELD_ROOT_STATE = {\n disabled: false,\n ...DEFAULT_FIELD_STATE_ATTRIBUTES\n};\nexport const fieldValidityMapping = {\n valid(value) {\n if (value === null) {\n return null;\n }\n if (value) {\n return {\n 'data-valid': ''\n };\n }\n return {\n 'data-invalid': ''\n };\n }\n};"],"x_google_ignoreList":[0],"mappings":";AAAA,IAAa,IAAyB;CACpC,UAAU;CACV,aAAa;CACb,iBAAiB;CACjB,eAAe;CACf,gBAAgB;CAChB,cAAc;CACd,SAAS;CACT,UAAU;CACV,cAAc;CACd,OAAO;CACP,cAAc;AAChB,GACa,IAAiC;CAC5C,OAAO;CACP,SAAS;CACT,OAAO;CACP,QAAQ;CACR,SAAS;AACX,GACa,IAA2B;CACtC,UAAU;CACV,GAAG;AACL,GACa,IAAuB,EAClC,MAAM,GAAO;CASX,OARI,MAAU,OACL,OAEL,IACK,EACL,cAAc,GAChB,IAEK,EACL,gBAAgB,GAClB;AACF,EACF"}
1
+ {"version":3,"file":"index368.js","names":["React","React$1","useOnFirstRender","ref","fn"],"sources":["../../../node_modules/@base-ui/utils/useOnFirstRender.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nexport function useOnFirstRender(fn) {\n const ref = React.useRef(true);\n if (ref.current) {\n ref.current = false;\n fn();\n }\n}"],"ignoreList":[0],"mappings":";;;AAGA,SAAgBE,EAAiB,GAAI;CACnC,IAAMC,IAAMH,EAAM,OAAO,EAAI;CAC7B,AAAIG,EAAI,YACN,EAAI,UAAU,IACdC,EAAG;AAEP"}
package/dist/index369.js CHANGED
@@ -1,46 +1,17 @@
1
1
  "use client";
2
- import e from "./index183.js";
3
- import { EMPTY_OBJECT as t, NOOP as n } from "./index191.js";
4
- import { DEFAULT_FIELD_ROOT_STATE as r, DEFAULT_VALIDITY_STATE as i } from "./index368.js";
5
- import * as a from "react";
6
- //#region ../../node_modules/@base-ui/react/internals/field-root-context/FieldRootContext.mjs
7
- var o = {
8
- invalid: void 0,
9
- name: void 0,
10
- validityData: {
11
- state: i,
12
- errors: [],
13
- error: "",
14
- value: "",
15
- initialValue: null
16
- },
17
- setValidityData: n,
18
- disabled: void 0,
19
- setTouched: n,
20
- setDirty: n,
21
- setFilled: n,
22
- setFocused: n,
23
- validationMode: "onSubmit",
24
- shouldValidateOnChange: () => !1,
25
- state: r,
26
- registerFieldControl: n,
27
- validation: {
28
- getValidationProps: (e, n = t) => n,
29
- inputRef: { current: null },
30
- registeredInputs: /* @__PURE__ */ new Map(),
31
- registerInput: n,
32
- getInputControl: () => null,
33
- commit: async () => {},
34
- change: n
35
- }
36
- }, s = /*#__PURE__*/ a.createContext(o);
37
- process.env.NODE_ENV !== "production" && (s.displayName = "FieldRootContext");
38
- function c(t = !0) {
39
- let r = a.useContext(s);
40
- if (r.setValidityData === n && !t) throw Error(process.env.NODE_ENV === "production" ? e(28) : "Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.");
41
- return r;
2
+ import * as e from "react";
3
+ //#region ../../node_modules/@base-ui/utils/usePreviousValue.mjs
4
+ function t(t) {
5
+ let [n, r] = e.useState({
6
+ current: t,
7
+ previous: null
8
+ });
9
+ return Object.is(t, n.current) || r({
10
+ current: t,
11
+ previous: n.current
12
+ }), n.previous;
42
13
  }
43
14
  //#endregion
44
- export { o as DEFAULT_FIELD_ROOT_CONTEXT, s as FieldRootContext, c as useFieldRootContext };
15
+ export { t as usePreviousValue };
45
16
 
46
17
  //# sourceMappingURL=index369.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index369.js","names":["React","_formatErrorMessage"],"sources":["../../../node_modules/@base-ui/react/internals/field-root-context/FieldRootContext.mjs"],"sourcesContent":["'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nimport { EMPTY_OBJECT } from '@base-ui/utils/empty';\nimport { NOOP } from \"../noop.mjs\";\nimport { DEFAULT_FIELD_ROOT_STATE, DEFAULT_VALIDITY_STATE } from \"../field-constants/constants.mjs\";\nexport const DEFAULT_FIELD_ROOT_CONTEXT = {\n invalid: undefined,\n name: undefined,\n validityData: {\n state: DEFAULT_VALIDITY_STATE,\n errors: [],\n error: '',\n value: '',\n initialValue: null\n },\n setValidityData: NOOP,\n disabled: undefined,\n setTouched: NOOP,\n setDirty: NOOP,\n setFilled: NOOP,\n setFocused: NOOP,\n validationMode: 'onSubmit',\n shouldValidateOnChange: () => false,\n state: DEFAULT_FIELD_ROOT_STATE,\n registerFieldControl: NOOP,\n validation: {\n getValidationProps: (_disabled, props = EMPTY_OBJECT) => props,\n inputRef: {\n current: null\n },\n registeredInputs: new Map(),\n registerInput: NOOP,\n getInputControl: () => null,\n commit: async () => {},\n change: NOOP\n }\n};\nexport const FieldRootContext = /*#__PURE__*/React.createContext(DEFAULT_FIELD_ROOT_CONTEXT);\nif (process.env.NODE_ENV !== \"production\") FieldRootContext.displayName = \"FieldRootContext\";\nexport function useFieldRootContext(optional = true) {\n const context = React.useContext(FieldRootContext);\n if (context.setValidityData === NOOP && !optional) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.' : _formatErrorMessage(28));\n }\n return context;\n}"],"x_google_ignoreList":[0],"mappings":";;;;;;AAOA,IAAa,IAA6B;CACxC,SAAS,KAAA;CACT,MAAM,KAAA;CACN,cAAc;EACZ,OAAO;EACP,QAAQ,CAAC;EACT,OAAO;EACP,OAAO;EACP,cAAc;CAChB;CACA,iBAAiB;CACjB,UAAU,KAAA;CACV,YAAY;CACZ,UAAU;CACV,WAAW;CACX,YAAY;CACZ,gBAAgB;CAChB,8BAA8B;CAC9B,OAAO;CACP,sBAAsB;CACtB,YAAY;EACV,qBAAqB,GAAW,IAAQ,MAAiB;EACzD,UAAU,EACR,SAAS,KACX;EACA,kCAAkB,IAAI,IAAI;EAC1B,eAAe;EACf,uBAAuB;EACvB,QAAQ,YAAY,CAAC;EACrB,QAAQ;CACV;AACF,GACa,IAAgC,gBAAM,cAAc,CAA0B;AAC3F,QAAA,IAAA,aAA6B,iBAAc,EAAiB,cAAc;AAC1E,SAAgB,EAAoB,IAAW,IAAM;CACnD,IAAM,IAAUA,EAAM,WAAW,CAAgB;CACjD,IAAI,EAAQ,oBAAoB,KAAQ,CAAC,GACvC,MAAU,MAAA,QAAA,IAAA,aAA+B,eAAyGC,EAAoB,EAAE,IAAhH,uFAAiH;CAE3K,OAAO;AACT"}
1
+ {"version":3,"file":"index369.js","names":["React","React$1","usePreviousValue","state","setState","value"],"sources":["../../../node_modules/@base-ui/utils/usePreviousValue.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\n/**\n * Returns a previous value of its argument.\n * @param value Current value.\n * @returns Previous value, or null if there is no previous value.\n */\nexport function usePreviousValue(value) {\n const [state, setState] = React.useState({\n current: value,\n previous: null\n });\n if (!Object.is(value, state.current)) {\n setState({\n current: value,\n previous: state.current\n });\n }\n return state.previous;\n}"],"ignoreList":[0],"mappings":";;;AASA,SAAgBE,EAAiB,GAAO;CACtC,IAAM,CAACC,GAAOC,KAAYJ,EAAM,SAAS;EACvC,SAASK;EACT,UAAU;CACZ,CAAC;CAOD,OANK,OAAO,GAAGA,GAAOF,EAAM,OAAO,KACjCC,EAAS;EACP,SAASC;EACT,UAAUF,EAAM;CAClB,CAAC,GAEIA,EAAM;AACf"}
package/dist/index37.js CHANGED
@@ -1,9 +1,17 @@
1
- import { addDays as e } from "./index26.js";
2
- //#region ../../node_modules/date-fns/addWeeks.js
3
- function t(t, n, r) {
4
- return e(t, n * 7, r);
1
+ import { constructFrom as e } from "./index24.js";
2
+ import { normalizeInterval as t } from "./index35.js";
3
+ //#region ../../node_modules/date-fns/eachYearOfInterval.js
4
+ function n(n, r) {
5
+ let { start: i, end: a } = t(r?.in, n), o = +i > +a, s = o ? +i : +a, c = o ? a : i;
6
+ c.setHours(0, 0, 0, 0), c.setMonth(0, 1);
7
+ let l = r?.step ?? 1;
8
+ if (!l) return [];
9
+ l < 0 && (l = -l, o = !o);
10
+ let u = [];
11
+ for (; +c <= s;) u.push(e(i, c)), c.setFullYear(c.getFullYear() + l);
12
+ return o ? u.reverse() : u;
5
13
  }
6
14
  //#endregion
7
- export { t as addWeeks, t as default };
15
+ export { n as default, n as eachYearOfInterval };
8
16
 
9
17
  //# sourceMappingURL=index37.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index37.js","names":[],"sources":["../../../node_modules/date-fns/addWeeks.js"],"sourcesContent":["import { addDays } from \"./addDays.js\";\n\n/**\n * The {@link addWeeks} function options.\n */\n\n/**\n * @name addWeeks\n * @category Week Helpers\n * @summary Add the specified number of weeks to the given date.\n *\n * @description\n * Add the specified number of weeks to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of weeks to be added.\n * @param options - An object with options\n *\n * @returns The new date with the weeks added\n *\n * @example\n * // Add 4 weeks to 1 September 2014:\n * const result = addWeeks(new Date(2014, 8, 1), 4)\n * //=> Mon Sep 29 2014 00:00:00\n */\nexport function addWeeks(date, amount, options) {\n return addDays(date, amount * 7, options);\n}\n\n// Fallback for modularized imports:\nexport default addWeeks;\n"],"x_google_ignoreList":[0],"mappings":";;AA4BA,SAAgB,EAAS,GAAM,GAAQ,GAAS;CAC9C,OAAO,EAAQ,GAAM,IAAS,GAAG,CAAO;AAC1C"}
1
+ {"version":3,"file":"index37.js","names":["eachYearOfInterval","normalizeInterval","options","interval","reversed","start","end","endTime","date","step","dates","constructFrom"],"sources":["../../../node_modules/date-fns/eachYearOfInterval.js"],"sourcesContent":["import { normalizeInterval } from \"./_lib/normalizeInterval.js\";\nimport { constructFrom } from \"./constructFrom.js\";\n\n/**\n * The {@link eachYearOfInterval} function options.\n */\n\n/**\n * The {@link eachYearOfInterval} function result type. It resolves the proper data type.\n * It uses the first argument date object type, starting from the date argument,\n * then the start interval date, and finally the end interval date. If\n * a context function is passed, it uses the context function return type.\n */\n\n/**\n * @name eachYearOfInterval\n * @category Interval Helpers\n * @summary Return the array of yearly timestamps within the specified time interval.\n *\n * @description\n * Return the array of yearly timestamps within the specified time interval.\n *\n * @typeParam IntervalType - Interval type.\n * @typeParam Options - Options type.\n *\n * @param interval - The interval.\n * @param options - An object with options.\n *\n * @returns The array with starts of yearly timestamps from the month of the interval start to the month of the interval end\n *\n * @example\n * // Each year between 6 February 2014 and 10 August 2017:\n * const result = eachYearOfInterval({\n * start: new Date(2014, 1, 6),\n * end: new Date(2017, 7, 10)\n * })\n * //=> [\n * // Wed Jan 01 2014 00:00:00,\n * // Thu Jan 01 2015 00:00:00,\n * // Fri Jan 01 2016 00:00:00,\n * // Sun Jan 01 2017 00:00:00\n * // ]\n */\nexport function eachYearOfInterval(interval, options) {\n const { start, end } = normalizeInterval(options?.in, interval);\n\n let reversed = +start > +end;\n const endTime = reversed ? +start : +end;\n const date = reversed ? end : start;\n date.setHours(0, 0, 0, 0);\n date.setMonth(0, 1);\n\n let step = options?.step ?? 1;\n if (!step) return [];\n if (step < 0) {\n step = -step;\n reversed = !reversed;\n }\n\n const dates = [];\n\n while (+date <= endTime) {\n dates.push(constructFrom(start, date));\n date.setFullYear(date.getFullYear() + step);\n }\n\n return reversed ? dates.reverse() : dates;\n}\n\n// Fallback for modularized imports:\nexport default eachYearOfInterval;\n"],"ignoreList":[0],"mappings":";;;AA2CA,SAAgBA,EAAmB,GAAU,GAAS;CACpD,IAAM,EAAE,UAAO,WAAQC,EAAkBC,GAAS,IAAIC,CAAQ,GAE1DC,IAAW,CAACC,IAAQ,CAACC,GACnBC,IAAUH,IAAW,CAACC,IAAQ,CAACC,GAC/BE,IAAOJ,IAAWE,IAAMD;CAE9B,AADAG,EAAK,SAAS,GAAG,GAAG,GAAG,CAAC,GACxBA,EAAK,SAAS,GAAG,CAAC;CAElB,IAAIC,IAAOP,GAAS,QAAQ;CAC5B,IAAI,CAACO,GAAM,OAAO,CAAC;CACnB,AAAIA,IAAO,MACT,IAAO,CAACA,GACR,IAAW,CAACL;CAGd,IAAMM,IAAQ,CAAC;CAEf,OAAO,CAACF,KAAQD,IAEd,AADAG,EAAM,KAAKC,EAAcN,GAAOG,CAAI,CAAC,GACrCA,EAAK,YAAYA,EAAK,YAAY,IAAIC,CAAI;CAG5C,OAAOL,IAAWM,EAAM,QAAQ,IAAIA;AACtC"}
package/dist/index370.js CHANGED
@@ -1,40 +1,8 @@
1
- "use client";
2
- import { useRefWithInit as e } from "./index185.js";
3
- import { useIsoLayoutEffect as t } from "./index204.js";
4
- import { useFieldRootContext as n } from "./index369.js";
5
- //#region ../../node_modules/@base-ui/react/internals/field-register-control/useRegisterFieldControl.mjs
6
- function r(r, i, a, o, s = !0, c) {
7
- let { registerFieldControl: l } = n(), u = e(() => Symbol());
8
- t(() => {
9
- let e = u.current;
10
- if (!s) {
11
- l(e, void 0);
12
- return;
13
- }
14
- l(e, {
15
- controlRef: r,
16
- getValue: o,
17
- id: i,
18
- name: c,
19
- value: a
20
- });
21
- }, [
22
- r,
23
- s,
24
- o,
25
- i,
26
- c,
27
- l,
28
- u,
29
- a
30
- ]), t(() => {
31
- let e = u.current;
32
- return () => {
33
- l(e, void 0);
34
- };
35
- }, [l, u]);
1
+ //#region ../../node_modules/@base-ui/utils/isElementDisabled.mjs
2
+ function e(e) {
3
+ return e == null || e.hasAttribute("disabled") || e.getAttribute("aria-disabled") === "true";
36
4
  }
37
5
  //#endregion
38
- export { r as useRegisterFieldControl };
6
+ export { e as isElementDisabled };
39
7
 
40
8
  //# sourceMappingURL=index370.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index370.js","names":[],"sources":["../../../node_modules/@base-ui/react/internals/field-register-control/useRegisterFieldControl.mjs"],"sourcesContent":["'use client';\n\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useRefWithInit } from '@base-ui/utils/useRefWithInit';\nimport { useFieldRootContext } from \"../field-root-context/FieldRootContext.mjs\";\nexport function useRegisterFieldControl(controlRef, id, value, getFormValueOverride, enabled = true, name) {\n const {\n registerFieldControl\n } = useFieldRootContext();\n const sourceRef = useRefWithInit(() => Symbol());\n\n // Re-register without unregistering first: re-registration with the same id updates the\n // form's fields Map entry in place, while a delete + re-add would move the field to the\n // end of the Map every time its value changes.\n useIsoLayoutEffect(() => {\n const source = sourceRef.current;\n if (!enabled) {\n registerFieldControl(source, undefined);\n return;\n }\n const registration = {\n controlRef,\n getValue: getFormValueOverride,\n id,\n name,\n value\n };\n registerFieldControl(source, registration);\n }, [controlRef, enabled, getFormValueOverride, id, name, registerFieldControl, sourceRef, value]);\n useIsoLayoutEffect(() => {\n const source = sourceRef.current;\n return () => {\n registerFieldControl(source, undefined);\n };\n }, [registerFieldControl, sourceRef]);\n}"],"x_google_ignoreList":[0],"mappings":";;;;;AAKA,SAAgB,EAAwB,GAAY,GAAI,GAAO,GAAsB,IAAU,IAAM,GAAM;CACzG,IAAM,EACJ,4BACE,EAAoB,GAClB,IAAY,QAAqB,OAAO,CAAC;CAoB/C,AAfA,QAAyB;EACvB,IAAM,IAAS,EAAU;EACzB,IAAI,CAAC,GAAS;GACZ,EAAqB,GAAQ,KAAA,CAAS;GACtC;EACF;EAQA,EAAqB,GAAQ;GAN3B;GACA,UAAU;GACV;GACA;GACA;EAEsC,CAAC;CAC3C,GAAG;EAAC;EAAY;EAAS;EAAsB;EAAI;EAAM;EAAsB;EAAW;CAAK,CAAC,GAChG,QAAyB;EACvB,IAAM,IAAS,EAAU;EACzB,aAAa;GACX,EAAqB,GAAQ,KAAA,CAAS;EACxC;CACF,GAAG,CAAC,GAAsB,CAAS,CAAC;AACtC"}
1
+ {"version":3,"file":"index370.js","names":["isElementDisabled","element"],"sources":["../../../node_modules/@base-ui/utils/isElementDisabled.mjs"],"sourcesContent":["export function isElementDisabled(element) {\n return element == null || element.hasAttribute('disabled') || element.getAttribute('aria-disabled') === 'true';\n}"],"ignoreList":[0],"mappings":";AAAA,SAAgBA,EAAkB,GAAS;CACzC,OAAOC,KAAW,QAAQA,EAAQ,aAAa,UAAU,KAAKA,EAAQ,aAAa,eAAe,MAAM;AAC1G"}
package/dist/index371.js CHANGED
@@ -1,21 +1,51 @@
1
1
  "use client";
2
- import { NOOP as e } from "./index191.js";
2
+ import { error as e } from "./index207.js";
3
3
  import * as t from "react";
4
- //#region ../../node_modules/@base-ui/react/internals/labelable-provider/LabelableContext.mjs
5
- var n = /*#__PURE__*/ t.createContext({
6
- controlId: void 0,
7
- registerControlId: e,
8
- labelId: void 0,
9
- setLabelId: e,
10
- messageIds: [],
11
- setMessageIds: e,
12
- getDescriptionProps: (e) => e
13
- });
14
- process.env.NODE_ENV !== "production" && (n.displayName = "LabelableContext");
15
- function r() {
16
- return t.useContext(n);
4
+ //#region ../../node_modules/@base-ui/utils/useControlled.mjs
5
+ function n({ controlled: n, default: i, name: a, state: o = "value" }) {
6
+ let { current: s } = t.useRef(n !== void 0), [c, l] = t.useState(i), u = s && n !== void 0 ? n : c;
7
+ if (process.env.NODE_ENV !== "production") {
8
+ t.useEffect(() => {
9
+ s !== (n !== void 0) && e([
10
+ `A component is changing the ${s ? "" : "un"}controlled ${o} state of ${a} to be ${s ? "un" : ""}controlled.`,
11
+ "Elements should not switch from uncontrolled to controlled (or vice versa).",
12
+ `Decide between using a controlled or uncontrolled ${a} element for the lifetime of the component.`,
13
+ "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.",
14
+ "More info: https://fb.me/react-controlled-components"
15
+ ].join("\n"));
16
+ }, [
17
+ o,
18
+ a,
19
+ n
20
+ ]);
21
+ let { current: c } = t.useRef(i);
22
+ t.useEffect(() => {
23
+ !s && r(c) !== r(i) && e([`A component is changing the default ${o} state of an uncontrolled ${a} after being initialized. To suppress this warning opt to use a controlled ${a}.`].join("\n"));
24
+ }, [i]);
25
+ }
26
+ return [u, t.useCallback((e) => {
27
+ s || l(e);
28
+ }, [])];
29
+ }
30
+ function r(e) {
31
+ let t = 0, n = /* @__PURE__ */ new WeakMap();
32
+ try {
33
+ return JSON.stringify(e, function(e, r) {
34
+ if (!(e === "_owner" && this != null && typeof this == "object" && "$$typeof" in this)) {
35
+ if (typeof r == "bigint") return `__bigint__:${r}`;
36
+ if (typeof r == "object" && r) {
37
+ let e = n.get(r);
38
+ if (e !== void 0) return `__object__:${e}`;
39
+ n.set(r, t), t += 1;
40
+ }
41
+ return r;
42
+ }
43
+ }) ?? `__top__:${typeof e}`;
44
+ } catch {
45
+ return "__unserializable__";
46
+ }
17
47
  }
18
48
  //#endregion
19
- export { n as LabelableContext, r as useLabelableContext };
49
+ export { n as useControlled };
20
50
 
21
51
  //# sourceMappingURL=index371.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index371.js","names":["React"],"sources":["../../../node_modules/@base-ui/react/internals/labelable-provider/LabelableContext.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { NOOP } from \"../noop.mjs\";\n/**\n * A context for providing [labelable elements](https://html.spec.whatwg.org/multipage/forms.html#category-label)\\\n * with an accessible name (label) and description.\n */\nexport const LabelableContext = /*#__PURE__*/React.createContext({\n controlId: undefined,\n registerControlId: NOOP,\n labelId: undefined,\n setLabelId: NOOP,\n messageIds: [],\n setMessageIds: NOOP,\n getDescriptionProps: externalProps => externalProps\n});\nif (process.env.NODE_ENV !== \"production\") LabelableContext.displayName = \"LabelableContext\";\nexport function useLabelableContext() {\n return React.useContext(LabelableContext);\n}"],"x_google_ignoreList":[0],"mappings":";;;;AAQA,IAAa,IAAgC,gBAAM,cAAc;CAC/D,WAAW,KAAA;CACX,mBAAmB;CACnB,SAAS,KAAA;CACT,YAAY;CACZ,YAAY,CAAC;CACb,eAAe;CACf,sBAAqB,MAAiB;AACxC,CAAC;AACD,QAAA,IAAA,aAA6B,iBAAc,EAAiB,cAAc;AAC1E,SAAgB,IAAsB;CACpC,OAAOA,EAAM,WAAW,CAAgB;AAC1C"}
1
+ {"version":3,"file":"index371.js","names":["React","React$1","useControlled","defaultProp","isControlled","controlled","valueState","setValue","value","error","state","name","defaultValue","serializeToDevModeString","newValue","nextId","seen","input","id"],"sources":["../../../node_modules/@base-ui/utils/useControlled.mjs"],"sourcesContent":["'use client';\n\n// TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler -- process.env never changes, dependency arrays are intentionally ignored\n/* eslint-disable react-hooks/rules-of-hooks, react-hooks/exhaustive-deps */\nimport * as React from 'react';\nimport { error } from \"./error.mjs\";\n\n// A defined default guarantees a defined value. Otherwise, preserve `undefined`,\n// including when callers pass an explicit generic argument.\n\nexport function useControlled({\n controlled,\n default: defaultProp,\n name,\n state = 'value'\n}) {\n // isControlled is ignored in the hook dependency lists as it should never change.\n const {\n current: isControlled\n } = React.useRef(controlled !== undefined);\n const [valueState, setValue] = React.useState(defaultProp);\n // Keep the initial mode, but use the initial default if a controlled value disappears.\n // This preserves the defined-default overload while the mode-switch warning is emitted below.\n const value = isControlled && controlled !== undefined ? controlled : valueState;\n if (process.env.NODE_ENV !== 'production') {\n React.useEffect(() => {\n if (isControlled !== (controlled !== undefined)) {\n error([`A component is changing the ${isControlled ? '' : 'un'}controlled ${state} state of ${name} to be ${isControlled ? 'un' : ''}controlled.`, 'Elements should not switch from uncontrolled to controlled (or vice versa).', `Decide between using a controlled or uncontrolled ${name} ` + 'element for the lifetime of the component.', \"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.\", 'More info: https://fb.me/react-controlled-components'].join('\\n'));\n }\n }, [state, name, controlled]);\n const {\n current: defaultValue\n } = React.useRef(defaultProp);\n React.useEffect(() => {\n if (!isControlled && serializeToDevModeString(defaultValue) !== serializeToDevModeString(defaultProp)) {\n error([`A component is changing the default ${state} state of an uncontrolled ${name} after being initialized. ` + `To suppress this warning opt to use a controlled ${name}.`].join('\\n'));\n }\n }, [defaultProp]);\n }\n const setValueIfUncontrolled = React.useCallback(newValue => {\n if (!isControlled) {\n setValue(newValue);\n }\n }, []);\n return [value, setValueIfUncontrolled];\n}\nfunction serializeToDevModeString(input) {\n let nextId = 0;\n const seen = new WeakMap();\n try {\n const result = JSON.stringify(input, function replacer(key, value) {\n if (key === '_owner' && this != null && typeof this === 'object' && '$$typeof' in this) {\n return undefined;\n }\n if (typeof value === 'bigint') {\n return `__bigint__:${value}`;\n }\n if (value !== null && typeof value === 'object') {\n const id = seen.get(value);\n if (id !== undefined) {\n return `__object__:${id}`;\n }\n seen.set(value, nextId);\n nextId += 1;\n }\n return value;\n });\n return result ?? `__top__:${typeof input}`;\n } catch {\n return '__unserializable__';\n }\n}"],"ignoreList":[0],"mappings":";;;;AAUA,SAAgBE,EAAc,EAC5B,eACA,SAASC,GACT,SACA,WAAQ,WACP;CAED,IAAM,EACJ,SAASC,MACPJ,EAAM,OAAOK,MAAe,KAAA,CAAS,GACnC,CAACC,GAAYC,KAAYP,EAAM,SAASG,CAAW,GAGnDK,IAAQJ,KAAgBC,MAAe,KAAA,IAAYA,IAAaC;CACtE,IAAA,QAAA,IAAA,aAA6B,cAAc;EACzC,EAAM,gBAAgB;GACpB,AAAIF,OAAkBC,MAAe,KAAA,MACnCI,EAAM;IAAC,+BAA+BL,IAAe,KAAK,KAAK,aAAaM,EAAM,YAAYC,EAAK,SAASP,IAAe,OAAO,GAAG;IAAc;IAA+E,qDAAqDO,EAAK;IAAmD;IAA8H;GAAsD,CAAC,CAAC,KAAK,IAAI,CAAC;EAEnhB,GAAG;GAACD;GAAOC;GAAMN;EAAU,CAAC;EAC5B,IAAM,EACJ,SAASO,MACPZ,EAAM,OAAOG,CAAW;EAC5B,EAAM,gBAAgB;GACpB,AAAI,CAACC,KAAgBS,EAAyBD,CAAY,MAAMC,EAAyBV,CAAW,KAClGM,EAAM,CAAC,uCAAuCC,EAAM,4BAA4BC,EAAK,6EAAkFA,EAAK,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC;EAE9L,GAAG,CAACR,CAAW,CAAC;CAClB;CAMA,OAAO,CAACK,GALuBR,EAAM,aAAY,MAAY;EAC3D,AAAKI,KACHG,EAASO,CAAQ;CAErB,GAAG,CAAC,CACgC,CAAC;AACvC;AACA,SAASD,EAAyB,GAAO;CACvC,IAAIE,IAAS,GACPC,oBAAO,IAAI,QAAQ;CACzB,IAAI;EAkBF,OAjBe,KAAK,UAAUC,GAAO,SAAkB,GAAK,GAAO;GACjE,IAAI,QAAQ,YAAY,QAAQ,QAAQ,OAAO,QAAS,YAAY,cAAc,OAGlF;QAAI,OAAOT,KAAU,UACnB,OAAO,cAAcA;IAEvB,IAAsB,OAAOA,KAAU,YAAnCA,GAA6C;KAC/C,IAAMU,IAAKF,EAAK,IAAIR,CAAK;KACzB,IAAIU,MAAO,KAAA,GACT,OAAO,cAAcA;KAGvB,AADAF,EAAK,IAAIR,GAAOO,CAAM,GACtB,KAAU;IACZ;IACA,OAAOP;GAVgB;EAWzB,CACY,KAAK,WAAW,OAAOS;CACrC,QAAQ;EACN,OAAO;CACT;AACF"}
package/dist/index372.js CHANGED
@@ -1,46 +1,29 @@
1
1
  "use client";
2
- import { useRefWithInit as e } from "./index185.js";
3
- import { NOOP as t } from "./index191.js";
4
- import { isElement as n } from "./index200.js";
5
- import { useStableCallback as r } from "./index202.js";
6
- import { useIsoLayoutEffect as i } from "./index204.js";
7
- import { useBaseUiId as a } from "./index214.js";
8
- import { useLabelableContext as o } from "./index371.js";
9
- import * as s from "react";
10
- //#region ../../node_modules/@base-ui/react/internals/labelable-provider/useLabelableId.mjs
11
- function c(c = {}) {
12
- let { id: l, implicit: u = !1, controlRef: d } = c, { controlId: f, registerControlId: p } = o(), m = a(l), h = u ? f : void 0, g = e(() => Symbol()), _ = s.useRef(!1), v = s.useRef(l != null), y = r(() => {
13
- !_.current || p === t || (_.current = !1, p(g.current, void 0));
14
- });
15
- return i(() => {
16
- if (p === t) return;
17
- let e;
18
- if (u) {
19
- let t = d?.current;
20
- e = n(t) && t.closest("label") != null ? l ?? null : h ?? m;
21
- } else if (l != null) v.current = !0, e = l;
22
- else if (v.current) e = m;
23
- else {
24
- y();
25
- return;
26
- }
27
- if (e === void 0) {
28
- y();
29
- return;
30
- }
31
- _.current = !0, p(g.current, e);
32
- }, [
33
- l,
34
- d,
35
- h,
36
- p,
37
- u,
38
- m,
39
- g,
40
- y
41
- ]), s.useEffect(() => y, [y]), f ?? m;
2
+ import e from "./index183.js";
3
+ import * as t from "react";
4
+ //#region ../../node_modules/@base-ui/react/select/root/SelectRootContext.mjs
5
+ var n = /*#__PURE__*/ t.createContext(void 0);
6
+ process.env.NODE_ENV !== "production" && (n.displayName = "SelectRootContext");
7
+ var r = /*#__PURE__*/ t.createContext(void 0);
8
+ process.env.NODE_ENV !== "production" && (r.displayName = "SelectRootPropsContext");
9
+ var i = /*#__PURE__*/ t.createContext(void 0);
10
+ process.env.NODE_ENV !== "production" && (i.displayName = "SelectFloatingContext");
11
+ function a() {
12
+ let r = t.useContext(n);
13
+ if (r === void 0) throw Error(process.env.NODE_ENV === "production" ? e(60) : "Base UI: SelectRootContext is missing. Select parts must be placed within <Select.Root>.");
14
+ return r;
15
+ }
16
+ function o() {
17
+ let n = t.useContext(r);
18
+ if (n === void 0) throw Error(process.env.NODE_ENV === "production" ? e(101) : "Base UI: SelectRootPropsContext is missing. Select parts must be placed within <Select.Root>.");
19
+ return n;
20
+ }
21
+ function s() {
22
+ let n = t.useContext(i);
23
+ if (n === void 0) throw Error(process.env.NODE_ENV === "production" ? e(61) : "Base UI: SelectFloatingContext is missing. Select parts must be placed within <Select.Root>.");
24
+ return n;
42
25
  }
43
26
  //#endregion
44
- export { c as useLabelableId };
27
+ export { i as SelectFloatingContext, n as SelectRootContext, r as SelectRootPropsContext, s as useSelectFloatingContext, a as useSelectRootContext, o as useSelectRootPropsContext };
45
28
 
46
29
  //# sourceMappingURL=index372.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index372.js","names":["React"],"sources":["../../../node_modules/@base-ui/react/internals/labelable-provider/useLabelableId.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useRefWithInit } from '@base-ui/utils/useRefWithInit';\nimport { isElement } from '@floating-ui/utils/dom';\nimport { NOOP } from \"../noop.mjs\";\nimport { useBaseUiId } from \"../useBaseUiId.mjs\";\nimport { useLabelableContext } from \"./LabelableContext.mjs\";\nexport function useLabelableId(params = {}) {\n const {\n id,\n implicit = false,\n controlRef\n } = params;\n const {\n controlId,\n registerControlId\n } = useLabelableContext();\n const defaultId = useBaseUiId(id);\n const controlIdForEffect = implicit ? controlId : undefined;\n const controlSourceRef = useRefWithInit(() => Symbol());\n const hasRegisteredRef = React.useRef(false);\n const hadExplicitIdRef = React.useRef(id != null);\n const unregisterControlId = useStableCallback(() => {\n if (!hasRegisteredRef.current || registerControlId === NOOP) {\n return;\n }\n hasRegisteredRef.current = false;\n registerControlId(controlSourceRef.current, undefined);\n });\n useIsoLayoutEffect(() => {\n if (registerControlId === NOOP) {\n return undefined;\n }\n let nextId;\n if (implicit) {\n const elem = controlRef?.current;\n if (isElement(elem) && elem.closest('label') != null) {\n nextId = id ?? null;\n } else {\n nextId = controlIdForEffect ?? defaultId;\n }\n } else if (id != null) {\n hadExplicitIdRef.current = true;\n nextId = id;\n } else if (hadExplicitIdRef.current) {\n nextId = defaultId;\n } else {\n unregisterControlId();\n return undefined;\n }\n if (nextId === undefined) {\n unregisterControlId();\n return undefined;\n }\n hasRegisteredRef.current = true;\n registerControlId(controlSourceRef.current, nextId);\n return undefined;\n }, [id, controlRef, controlIdForEffect, registerControlId, implicit, defaultId, controlSourceRef, unregisterControlId]);\n React.useEffect(() => {\n return unregisterControlId;\n }, [unregisterControlId]);\n return controlId ?? defaultId;\n}"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;AAUA,SAAgB,EAAe,IAAS,CAAC,GAAG;CAC1C,IAAM,EACJ,OACA,cAAW,IACX,kBACE,GACE,EACJ,cACA,yBACE,EAAoB,GAClB,IAAY,EAAY,CAAE,GAC1B,IAAqB,IAAW,IAAY,KAAA,GAC5C,IAAmB,QAAqB,OAAO,CAAC,GAChD,IAAmBA,EAAM,OAAO,EAAK,GACrC,IAAmBA,EAAM,OAAO,KAAM,IAAI,GAC1C,IAAsB,QAAwB;EAC9C,CAAC,EAAiB,WAAW,MAAsB,MAGvD,EAAiB,UAAU,IAC3B,EAAkB,EAAiB,SAAS,KAAA,CAAS;CACvD,CAAC;CAiCD,OAhCA,QAAyB;EACvB,IAAI,MAAsB,GACxB;EAEF,IAAI;EACJ,IAAI,GAAU;GACZ,IAAM,IAAO,GAAY;GACzB,AAGE,IAHE,EAAU,CAAI,KAAK,EAAK,QAAQ,OAAO,KAAK,OACrC,KAAM,OAEN,KAAsB;EAEnC,OAAO,IAAI,KAAM,MAEf,AADA,EAAiB,UAAU,IAC3B,IAAS;OACJ,IAAI,EAAiB,SAC1B,IAAS;OACJ;GACL,EAAoB;GACpB;EACF;EACA,IAAI,MAAW,KAAA,GAAW;GACxB,EAAoB;GACpB;EACF;EAEA,AADA,EAAiB,UAAU,IAC3B,EAAkB,EAAiB,SAAS,CAAM;CAEpD,GAAG;EAAC;EAAI;EAAY;EAAoB;EAAmB;EAAU;EAAW;EAAkB;CAAmB,CAAC,GACtH,EAAM,gBACG,GACN,CAAC,CAAmB,CAAC,GACjB,KAAa;AACtB"}
1
+ {"version":3,"file":"index372.js","names":["React","_formatErrorMessage","formatErrorMessage","React$1","SelectRootContext","SelectRootPropsContext","SelectFloatingContext","useSelectRootContext","store","useSelectRootPropsContext","context","useSelectFloatingContext"],"sources":["../../../node_modules/@base-ui/react/select/root/SelectRootContext.mjs"],"sourcesContent":["'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\n\n/**\n * Root values consumed during render. Keep these outside `useSyncedValues` so descendant ref\n * callbacks see the current props during the same commit.\n */\n\nexport const SelectRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") SelectRootContext.displayName = \"SelectRootContext\";\nexport const SelectRootPropsContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") SelectRootPropsContext.displayName = \"SelectRootPropsContext\";\nexport const SelectFloatingContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") SelectFloatingContext.displayName = \"SelectFloatingContext\";\nexport function useSelectRootContext() {\n const store = React.useContext(SelectRootContext);\n if (store === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: SelectRootContext is missing. Select parts must be placed within <Select.Root>.' : _formatErrorMessage(60));\n }\n return store;\n}\nexport function useSelectRootPropsContext() {\n const context = React.useContext(SelectRootPropsContext);\n if (context === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: SelectRootPropsContext is missing. Select parts must be placed within <Select.Root>.' : _formatErrorMessage(101));\n }\n return context;\n}\nexport function useSelectFloatingContext() {\n const context = React.useContext(SelectFloatingContext);\n if (context === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: SelectFloatingContext is missing. Select parts must be placed within <Select.Root>.' : _formatErrorMessage(61));\n }\n return context;\n}"],"ignoreList":[0],"mappings":";;;;AAUA,IAAaI,IAAiC,gBAAM,cAAc,KAAA,CAAS;AAC3E,QAAA,IAAA,aAA6B,iBAAc,EAAkB,cAAc;AAC3E,IAAaC,IAAsC,gBAAM,cAAc,KAAA,CAAS;AAChF,QAAA,IAAA,aAA6B,iBAAc,EAAuB,cAAc;AAChF,IAAaC,IAAqC,gBAAM,cAAc,KAAA,CAAS;AAC/E,QAAA,IAAA,aAA6B,iBAAc,EAAsB,cAAc;AAC/E,SAAgBC,IAAuB;CACrC,IAAMC,IAAQR,EAAM,WAAWI,CAAiB;CAChD,IAAII,MAAU,KAAA,GACZ,MAAU,MAAA,QAAA,IAAA,aAA+B,eAA4GP,EAAoB,EAAE,IAAnH,0FAAoH;CAE9K,OAAOO;AACT;AACA,SAAgBC,IAA4B;CAC1C,IAAMC,IAAUV,EAAM,WAAWK,CAAsB;CACvD,IAAIK,MAAY,KAAA,GACd,MAAU,MAAA,QAAA,IAAA,aAA+B,eAAiHT,EAAoB,GAAG,IAAzH,+FAA0H;CAEpL,OAAOS;AACT;AACA,SAAgBC,IAA2B;CACzC,IAAMD,IAAUV,EAAM,WAAWM,CAAqB;CACtD,IAAII,MAAY,KAAA,GACd,MAAU,MAAA,QAAA,IAAA,aAA+B,eAAgHT,EAAoB,EAAE,IAAvH,8FAAwH;CAElL,OAAOS;AACT"}
package/dist/index373.js CHANGED
@@ -1,15 +1,6 @@
1
- //#region ../../node_modules/@base-ui/react/internals/itemEquality.mjs
2
- var e = (e, t) => Object.is(e, t);
3
- function t(e, t, n) {
4
- return e == null || t == null ? Object.is(e, t) : n(e, t);
5
- }
6
- function n(e, n, r) {
7
- return !e || e.length === 0 ? -1 : e.findIndex((e) => e !== void 0 && t(e, n, r));
8
- }
9
- function r(e, n, r) {
10
- return e.filter((e) => !t(n, e, r));
11
- }
1
+ //#region ../../node_modules/@base-ui/react/field/control/FieldControlDataAttributes.mjs
2
+ var e = "data-valid", t = "data-invalid";
12
3
  //#endregion
13
- export { t as compareItemEquality, e as defaultItemEquality, n as findItemIndex, r as removeItem };
4
+ export { t as invalid, e as valid };
14
5
 
15
6
  //# sourceMappingURL=index373.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index373.js","names":[],"sources":["../../../node_modules/@base-ui/react/internals/itemEquality.mjs"],"sourcesContent":["export const defaultItemEquality = (itemValue, selectedValue) => Object.is(itemValue, selectedValue);\nexport function compareItemEquality(itemValue, selectedValue, comparer) {\n if (itemValue == null || selectedValue == null) {\n return Object.is(itemValue, selectedValue);\n }\n return comparer(itemValue, selectedValue);\n}\nexport function selectedValueIncludes(selectedValues, itemValue, comparer) {\n if (!selectedValues || selectedValues.length === 0) {\n return false;\n }\n return selectedValues.some(selectedValue => {\n if (selectedValue === undefined) {\n return false;\n }\n return compareItemEquality(itemValue, selectedValue, comparer);\n });\n}\nexport function findItemIndex(itemValues, selectedValue, comparer) {\n if (!itemValues || itemValues.length === 0) {\n return -1;\n }\n return itemValues.findIndex(itemValue => {\n if (itemValue === undefined) {\n return false;\n }\n return compareItemEquality(itemValue, selectedValue, comparer);\n });\n}\nexport function findSelectionIndex(itemValues, selectedValue, comparer, multiple) {\n // Only unwrap in multiple mode: an array can itself be a valid single-select value.\n const lastValue = multiple && Array.isArray(selectedValue) ? selectedValue[selectedValue.length - 1] : selectedValue;\n const index = findItemIndex(itemValues, lastValue, comparer);\n return index === -1 ? null : index;\n}\nexport function removeItem(selectedValues, itemValue, comparer) {\n return selectedValues.filter(selectedValue => !compareItemEquality(itemValue, selectedValue, comparer));\n}"],"x_google_ignoreList":[0],"mappings":";AAAA,IAAa,KAAuB,GAAW,MAAkB,OAAO,GAAG,GAAW,CAAa;AACnG,SAAgB,EAAoB,GAAW,GAAe,GAAU;CAItE,OAHI,KAAa,QAAQ,KAAiB,OACjC,OAAO,GAAG,GAAW,CAAa,IAEpC,EAAS,GAAW,CAAa;AAC1C;AAYA,SAAgB,EAAc,GAAY,GAAe,GAAU;CAIjE,OAHI,CAAC,KAAc,EAAW,WAAW,IAChC,KAEF,EAAW,WAAU,MACtB,MAAc,KAAA,KAGX,EAAoB,GAAW,GAAe,CAAQ,CAC9D;AACH;AAOA,SAAgB,EAAW,GAAgB,GAAW,GAAU;CAC9D,OAAO,EAAe,QAAO,MAAiB,CAAC,EAAoB,GAAW,GAAe,CAAQ,CAAC;AACxG"}
1
+ {"version":3,"file":"index373.js","names":["valid","invalid"],"sources":["../../../node_modules/@base-ui/react/field/control/FieldControlDataAttributes.mjs"],"sourcesContent":["/**\n * Present when the field is disabled.\n */\nexport const disabled = 'data-disabled';\n/**\n * Present when the field is in a valid state.\n */\nexport const valid = 'data-valid';\n/**\n * Present when the field is in an invalid state.\n */\nexport const invalid = 'data-invalid';\n/**\n * Present when the field has been touched.\n */\nexport const touched = 'data-touched';\n/**\n * Present when the field's value has changed.\n */\nexport const dirty = 'data-dirty';\n/**\n * Present when the field is filled.\n */\nexport const filled = 'data-filled';\n/**\n * Present when the field control is focused.\n */\nexport const focused = 'data-focused';"],"ignoreList":[0],"mappings":";AAOA,IAAaA,IAAQ,cAIRC,IAAU"}