@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
package/dist/index361.js CHANGED
@@ -1,121 +1,25 @@
1
- import { cn as e } from "./index12.js";
2
- import { c as t } from "react/compiler-runtime";
3
- import * as n from "react";
4
- import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
5
- //#region src/components/PhoneNumberInput/suggestions.tsx
6
- var o = n.createContext(null);
7
- function s(e, t) {
8
- if (typeof e == "function") {
9
- e(t);
10
- return;
1
+ //#region src/components/PhoneNumberInput/messages.ts
2
+ var e = {
3
+ en: {
4
+ lengthTooLong: (e) => e ? `This number looks too long for ${e}.` : "This number looks too long.",
5
+ noMatches: "No matching countries",
6
+ selectCountryLabel: "Select a country",
7
+ selectedCountryLabel: (e) => e ? `${e} flag` : "Selected country"
8
+ },
9
+ fr: {
10
+ lengthTooLong: (e) => e ? `This number looks too long for ${e}.` : "This number looks too long.",
11
+ noMatches: "Aucun pays correspondant",
12
+ selectCountryLabel: "Select a country",
13
+ selectedCountryLabel: (e) => e ? `${e} flag` : "Selected country"
11
14
  }
12
- e && typeof e == "object" && Reflect.set(e, "current", t);
13
- }
14
- var c = (r) => {
15
- let a = t(30), c = n.useContext(o), l = c?.highlightedValue === r.data.value, u, d, f;
16
- a[0] === r.innerProps ? (u = a[1], d = a[2], f = a[3]) : ({onMouseMove: u, className: d, ...f} = r.innerProps, a[0] = r.innerProps, a[1] = u, a[2] = d, a[3] = f);
17
- let m;
18
- a[4] === c?.renderOptionLabel ? m = a[5] : (m = c?.renderOptionLabel ?? p, a[4] = c?.renderOptionLabel, a[5] = m);
19
- let h = m, g = n.useRef(null), { innerRef: _ } = r, v;
20
- a[6] === _ ? v = a[7] : (v = (e) => {
21
- g.current = e, s(_, e);
22
- }, a[6] = _, a[7] = v);
23
- let y = v, b;
24
- a[8] !== c?.consumeScrollBehavior || a[9] !== l ? (b = () => {
25
- if (!l) return;
26
- let e = c?.consumeScrollBehavior, t = e ? e() : "smooth", n = g.current;
27
- if (!n) return;
28
- let r = n.parentElement;
29
- if (!r) return;
30
- let i = n.offsetTop, a = i + n.offsetHeight, o = r.scrollTop, s = o + r.clientHeight;
31
- i >= o && a <= s || n.scrollIntoView({
32
- block: "nearest",
33
- behavior: t
34
- });
35
- }, a[8] = c?.consumeScrollBehavior, a[9] = l, a[10] = b) : b = a[10];
36
- let x;
37
- a[11] !== c || a[12] !== l ? (x = [c, l], a[11] = c, a[12] = l, a[13] = x) : x = a[13], n.useEffect(b, x);
38
- let S;
39
- a[14] !== c || a[15] !== u || a[16] !== r.data ? (S = (e) => {
40
- u?.(e), c?.setHighlightedOption(r.data);
41
- }, a[14] = c, a[15] = u, a[16] = r.data, a[17] = S) : S = a[17];
42
- let C = S, w = l ? "bg-muted text-foreground" : "text-foreground hover:bg-muted", T;
43
- a[18] !== d || a[19] !== w ? (T = e("flex cursor-pointer items-center justify-between gap-3 px-3 py-2 text-sm", d, w), a[18] = d, a[19] = w, a[20] = T) : T = a[20];
44
- let E;
45
- a[21] !== r.data || a[22] !== h ? (E = h(r.data), a[21] = r.data, a[22] = h, a[23] = E) : E = a[23];
46
- let D;
47
- return a[24] !== y || a[25] !== C || a[26] !== f || a[27] !== T || a[28] !== E ? (D = /* @__PURE__ */ i("div", {
48
- ref: y,
49
- ...f,
50
- onMouseMove: C,
51
- className: T,
52
- children: E
53
- }), a[24] = y, a[25] = C, a[26] = f, a[27] = T, a[28] = E, a[29] = D) : D = a[29], D;
54
- }, l = {
55
- control: () => ({ display: "none" }),
56
- menu: (e) => ({
57
- ...e,
58
- marginTop: 4,
59
- borderRadius: "var(--radius)",
60
- boxShadow: "0 18px 36px rgba(15, 23, 42, 0.18)",
61
- backgroundColor: "hsl(var(--popover))",
62
- overflow: "hidden",
63
- zIndex: 20
64
- }),
65
- menuList: (e) => ({
66
- ...e,
67
- maxHeight: 240,
68
- padding: 0
69
- }),
70
- option: (e, t) => ({
71
- ...e,
72
- fontSize: "0.875rem",
73
- backgroundColor: t.isFocused ? "hsl(var(--muted))" : t.isSelected ? "hsl(var(--accent))" : "transparent",
74
- color: t.isSelected ? "hsl(var(--accent-foreground))" : "hsl(var(--foreground))",
75
- cursor: "pointer"
76
- }),
77
- noOptionsMessage: (e) => ({
78
- ...e,
79
- fontSize: "0.875rem",
80
- color: "hsl(var(--muted-foreground))"
81
- })
82
- }, u = (e) => {
83
- let n = t(5), { children: r, innerProps: a, innerRef: o } = e, s;
84
- n[0] === Symbol.for("react.memo_cache_sentinel") ? (s = {
85
- height: 0,
86
- minHeight: 0,
87
- opacity: 0,
88
- overflow: "hidden",
89
- pointerEvents: "none"
90
- }, n[0] = s) : s = n[0];
91
- let c;
92
- return n[1] !== r || n[2] !== a || n[3] !== o ? (c = /* @__PURE__ */ i("div", {
93
- ...a,
94
- ref: o,
95
- style: s,
96
- children: r
97
- }), n[1] = r, n[2] = a, n[3] = o, n[4] = c) : c = n[4], c;
98
- }, d = () => null;
99
- function f(e) {
100
- return /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ a("span", {
101
- className: "flex min-w-0 items-center gap-2",
102
- children: [e.flag ? /* @__PURE__ */ i("span", {
103
- "aria-hidden": "true",
104
- className: "text-lg leading-none",
105
- children: e.flag
106
- }) : null, /* @__PURE__ */ i("span", {
107
- className: "truncate",
108
- children: e.name
109
- })]
110
- }), /* @__PURE__ */ a("span", {
111
- className: "text-xs text-muted-foreground",
112
- children: ["+", e.dialCode]
113
- })] });
114
- }
115
- function p(e) {
116
- return f(e);
15
+ };
16
+ function t(t, n) {
17
+ return {
18
+ ...e[(Array.isArray(t) ? t : t ? [t] : []).map((e) => e.split("-")[0]?.toLowerCase()).find((t) => t && e[t]) ?? "en"] ?? e.en,
19
+ ...n ?? {}
20
+ };
117
21
  }
118
22
  //#endregion
119
- export { u as HiddenControl, d as NullComponent, o as SuggestionContext, c as SuggestionOption, f as formatCountryOption, l as suggestionSelectStyles };
23
+ export { t as resolveMessages };
120
24
 
121
25
  //# sourceMappingURL=index361.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index361.js","names":["innerProps","context?.renderOptionLabel ?? ((option: CountryOption) => formatCountryOption(option))","renderOptionLabel","(option: CountryOption) => formatCountryOption(option)","(node: HTMLDivElement | null) => {\n optionRef.current = node\n assignOptionRef(innerRef, node)\n }","React.useCallback(\n (node: HTMLDivElement | null) => {\n optionRef.current = node\n assignOptionRef(innerRef, node)\n },\n [innerRef]\n )","() => {\n if (!isActive) {\n return\n }\n\n const consumeScrollBehavior = context?.consumeScrollBehavior\n const behavior = consumeScrollBehavior ? consumeScrollBehavior() : \"smooth\"\n\n const target = optionRef.current\n if (!target) {\n return\n }\n\n const parent = target.parentElement\n if (!parent) {\n return\n }\n\n const top = target.offsetTop\n const bottom = top + target.offsetHeight\n const viewTop = parent.scrollTop\n const viewBottom = viewTop + parent.clientHeight\n\n if (top >= viewTop && bottom <= viewBottom) {\n return\n }\n\n target.scrollIntoView({\n block: \"nearest\",\n behavior,\n })\n }","consumeScrollBehavior","[context, isActive]","(event: React.MouseEvent<HTMLDivElement>) => {\n onMouseMove?.(event)\n context?.setHighlightedOption(props.data)\n }","context?.setHighlightedOption","data","cn(\n \"flex cursor-pointer items-center justify-between gap-3 px-3 py-2 text-sm\",\n receivedClassName,\n isActive ? \"bg-muted text-foreground\" : \"text-foreground hover:bg-muted\"\n )","isActive ? \"bg-muted text-foreground\" : \"text-foreground hover:bg-muted\"","renderLabel(props.data)","<div\n ref={assignRef}\n {...restInnerProps}\n onMouseMove={handleMouseMove}\n className={cn(\n \"flex cursor-pointer items-center justify-between gap-3 px-3 py-2 text-sm\",\n receivedClassName,\n isActive ? \"bg-muted text-foreground\" : \"text-foreground hover:bg-muted\"\n )}\n >\n {renderLabel(props.data)}\n </div>","{\n height: 0,\n minHeight: 0,\n opacity: 0,\n overflow: \"hidden\",\n pointerEvents: \"none\",\n }","<div\n {...innerProps}\n ref={innerRef}\n style={{\n height: 0,\n minHeight: 0,\n opacity: 0,\n overflow: \"hidden\",\n pointerEvents: \"none\",\n }}\n >\n {children}\n </div>"],"sources":["../src/components/PhoneNumberInput/suggestions.tsx"],"sourcesContent":["import * as React from \"react\"\nimport type { CountryCode } from \"libphonenumber-js\"\nimport type { ControlProps, OptionProps, StylesConfig } from \"react-select\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport type { CountryOption } from \"./types\"\n\n\nexport type SuggestionContextValue = {\n highlightedValue: CountryCode | null\n setHighlightedOption: (option: CountryOption) => void\n renderOptionLabel: (option: CountryOption) => React.ReactNode\n consumeScrollBehavior: () => ScrollBehavior\n}\n\nexport const SuggestionContext = React.createContext<SuggestionContextValue | null>(null)\n\nfunction assignOptionRef(ref: React.Ref<HTMLDivElement> | undefined, node: HTMLDivElement | null) {\n if (typeof ref === \"function\") {\n ref(node)\n return\n }\n if (ref && typeof ref === \"object\") {\n Reflect.set(ref, \"current\", node)\n }\n}\n\nexport const SuggestionOption = (props: OptionProps<CountryOption, false>) => {\n const context = React.useContext(SuggestionContext)\n const isActive = context?.highlightedValue === props.data.value\n const { onMouseMove, className: receivedClassName, ...restInnerProps } = props.innerProps\n const renderLabel =\n context?.renderOptionLabel ?? ((option: CountryOption) => formatCountryOption(option))\n const optionRef = React.useRef<HTMLDivElement | null>(null)\n const { innerRef } = props\n\n const assignRef = React.useCallback(\n (node: HTMLDivElement | null) => {\n optionRef.current = node\n assignOptionRef(innerRef, node)\n },\n [innerRef]\n )\n\n React.useEffect(() => {\n if (!isActive) {\n return\n }\n\n const consumeScrollBehavior = context?.consumeScrollBehavior\n const behavior = consumeScrollBehavior ? consumeScrollBehavior() : \"smooth\"\n\n const target = optionRef.current\n if (!target) {\n return\n }\n\n const parent = target.parentElement\n if (!parent) {\n return\n }\n\n const top = target.offsetTop\n const bottom = top + target.offsetHeight\n const viewTop = parent.scrollTop\n const viewBottom = viewTop + parent.clientHeight\n\n if (top >= viewTop && bottom <= viewBottom) {\n return\n }\n\n target.scrollIntoView({\n block: \"nearest\",\n behavior,\n })\n }, [context, isActive])\n\n const handleMouseMove = (event: React.MouseEvent<HTMLDivElement>) => {\n onMouseMove?.(event)\n context?.setHighlightedOption(props.data)\n }\n\n return (\n <div\n ref={assignRef}\n {...restInnerProps}\n onMouseMove={handleMouseMove}\n className={cn(\n \"flex cursor-pointer items-center justify-between gap-3 px-3 py-2 text-sm\",\n receivedClassName,\n isActive ? \"bg-muted text-foreground\" : \"text-foreground hover:bg-muted\"\n )}\n >\n {renderLabel(props.data)}\n </div>\n )\n}\n\nexport const suggestionSelectStyles: StylesConfig<CountryOption, false> = {\n control: () => ({\n display: \"none\",\n }),\n menu: (provided) => ({\n ...provided,\n marginTop: 4,\n borderRadius: \"var(--radius)\",\n boxShadow: \"0 18px 36px rgba(15, 23, 42, 0.18)\",\n backgroundColor: \"hsl(var(--popover))\",\n overflow: \"hidden\",\n zIndex: 20,\n }),\n menuList: (provided) => ({\n ...provided,\n maxHeight: 240,\n padding: 0,\n }),\n option: (provided, state) => ({\n ...provided,\n fontSize: \"0.875rem\",\n backgroundColor: state.isFocused\n ? \"hsl(var(--muted))\"\n : state.isSelected\n ? \"hsl(var(--accent))\"\n : \"transparent\",\n color: state.isSelected\n ? \"hsl(var(--accent-foreground))\"\n : \"hsl(var(--foreground))\",\n cursor: \"pointer\",\n }),\n noOptionsMessage: (provided) => ({\n ...provided,\n fontSize: \"0.875rem\",\n color: \"hsl(var(--muted-foreground))\",\n }),\n}\n\nexport const HiddenControl = (props: ControlProps<CountryOption, false>) => {\n const { children, innerProps, innerRef } = props\n\n return (\n <div\n {...innerProps}\n ref={innerRef}\n style={{\n height: 0,\n minHeight: 0,\n opacity: 0,\n overflow: \"hidden\",\n pointerEvents: \"none\",\n }}\n >\n {children}\n </div>\n )\n}\n\nexport const NullComponent = () => null\n\nexport function formatCountryOption(option: CountryOption) {\n return (\n <>\n <span className=\"flex min-w-0 items-center gap-2\">\n {option.flag ? (\n <span aria-hidden=\"true\" className=\"text-lg leading-none\">\n {option.flag}\n </span>\n ) : null}\n <span className=\"truncate\">{option.name}</span>\n </span>\n <span className=\"text-xs text-muted-foreground\">+{option.dialCode}</span>\n </>\n )\n}\n"],"mappings":"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"}
1
+ {"version":3,"file":"index361.js","names":["MESSAGE_DICTIONARY","country","resolveMessages","locale","entry","code","overrides"],"sources":["../src/components/PhoneNumberInput/messages.ts"],"sourcesContent":["import type { PhoneNumberInputMessages } from \"./types\"\n\n\nconst MESSAGE_DICTIONARY: Record<string, PhoneNumberInputMessages> = {\n en: {\n lengthTooLong: (country) =>\n country ? `This number looks too long for ${country}.` : \"This number looks too long.\",\n noMatches: \"No matching countries\",\n selectCountryLabel: \"Select a country\",\n selectedCountryLabel: (country) => (country ? `${country} flag` : \"Selected country\"),\n },\n fr: {\n lengthTooLong: (country) =>\n country\n ? `This number looks too long for ${country}.`\n : \"This number looks too long.\",\n noMatches: \"Aucun pays correspondant\",\n selectCountryLabel: \"Select a country\",\n selectedCountryLabel: (country) => (country ? `${country} flag` : \"Selected country\"),\n },\n}\n\nexport function resolveMessages(\n locale: string | string[] | undefined,\n overrides?: Partial<PhoneNumberInputMessages>\n): PhoneNumberInputMessages {\n const locales = Array.isArray(locale) ? locale : locale ? [locale] : []\n const preferred = locales\n .map((entry) => entry.split(\"-\")[0]?.toLowerCase())\n .find((code) => code && MESSAGE_DICTIONARY[code])\n const base = MESSAGE_DICTIONARY[preferred ?? \"en\"] ?? MESSAGE_DICTIONARY.en\n return {\n ...base,\n ...(overrides ?? {}),\n }\n}\n\n"],"mappings":";AAGA,IAAMA,IAA+D;CACnE,IAAI;EACF,gBAAgB,MACdC,IAAU,kCAAkCA,EAAQ,KAAK;EAC3D,WAAW;EACX,oBAAoB;EACpB,uBAAuB,MAAaA,IAAU,GAAGA,EAAQ,SAAS;CACpE;CACA,IAAI;EACF,gBAAgB,MACdA,IACI,kCAAkCA,EAAQ,KAC1C;EACN,WAAW;EACX,oBAAoB;EACpB,uBAAuB,MAAaA,IAAU,GAAGA,EAAQ,SAAS;CACpE;AACF;AAEA,SAAgBC,EACd,GACA,GAC0B;CAM1B,OAAO;EACL,GAFWF,GAJG,MAAM,QAAQG,CAAM,IAAIA,IAASA,IAAS,CAACA,CAAM,IAAI,CAAC,EAAA,CAEnE,KAAK,MAAUC,EAAM,MAAM,GAAG,CAAC,CAAC,EAAE,EAAE,YAAY,CAAC,CAAC,CAClD,MAAM,MAASC,KAAQL,EAAmBK,EACb,KAAa,SAASL,EAAmB;EAGvE,GAAIM,KAAa,CAAC;CACpB;AACF"}
package/dist/index362.js CHANGED
@@ -1,494 +1,14 @@
1
- import { cn as e } from "./index12.js";
2
- import { getCountryCallingCode as t } from "./index355.js";
3
- import { resolveMessages as n } from "./index356.js";
4
- import { COMMON_IDD_PREFIXES as r, buildFallbackSelectedCountry as i, getCachedCountryOptions as a, getLocaleCacheKey as o, getValidCountry as s, normalizeSearchValue as ee, optionMatchIndex as c, parseLocaleCacheKey as l, toSelectedCountry as te } from "./index358.js";
5
- import { formatWithAsYouType as u, getLengthIssue as d, sanitizeDigits as f, stripPrefix as ne } from "./index359.js";
6
- import { captureSelectionSnapshot as p, resolveSelection as m, skipFormattingCharactersLeft as re, skipFormattingCharactersRight as ie } from "./index360.js";
7
- import { HiddenControl as ae, NullComponent as h, SuggestionContext as oe, SuggestionOption as se, formatCountryOption as ce, suggestionSelectStyles as le } from "./index361.js";
8
- import * as g from "react";
9
- import { jsx as _, jsxs as ue } from "react/jsx-runtime";
10
- import de from "react-select";
11
- //#region src/components/PhoneNumberInput/index.tsx
12
- var v = /[\u061C\u200B-\u200F\u202A-\u202E\u2066-\u2069\uFEFF]/g;
13
- function y(e) {
14
- return e.replace(v, "");
1
+ import { getCountries as e } from "./index359.js";
2
+ //#region src/components/PhoneNumberInput/countries.ts
3
+ var t = /* @__PURE__ */ new Set([
4
+ "IM",
5
+ "GG",
6
+ "JE"
7
+ ]), n = e().filter((e) => !t.has(e));
8
+ function r() {
9
+ return n;
15
10
  }
16
- function b(e) {
17
- for (let t of r) if (e.startsWith(t)) return e.slice(t.length);
18
- return e;
19
- }
20
- function fe(e) {
21
- let t = `+${e}`, { phoneNumber: n, detectedCountry: r } = u(t);
22
- return n?.isValid() && r ? t : null;
23
- }
24
- function pe(e) {
25
- let t = y(e).trim();
26
- if (!t) return null;
27
- if (t.startsWith("+")) {
28
- let e = f(t);
29
- if (!e) return "+";
30
- let n = b(e);
31
- return n ? `+${n}` : "+";
32
- }
33
- let n = f(t);
34
- if (!n) return null;
35
- let r = b(n);
36
- return r === n ? null : r ? `+${r}` : "+";
37
- }
38
- function me(e) {
39
- let t = pe(e);
40
- if (t != null) return t;
41
- let n = y(e).trim(), r = f(n);
42
- return r ? fe(r) : null;
43
- }
44
- function he(e, n) {
45
- return n || (e ? t(e) : null);
46
- }
47
- function ge(e, t, n) {
48
- let r = y(e).trim(), i = f(r);
49
- if (!i) return `+${t.dialCode}`;
50
- let a = n?.allowImplicitInternational === !1 ? pe(r) : me(r);
51
- if (a) {
52
- let e = f(a);
53
- if (e.startsWith(t.dialCode)) return a;
54
- let { phoneNumber: n } = u(a), r = n?.countryCallingCode, i = r && e.startsWith(r) ? e.slice(r.length) : n?.nationalNumber ?? e;
55
- return `+${t.dialCode}${i}`;
56
- }
57
- let { phoneNumber: o } = u(r, t.value);
58
- return `+${t.dialCode}${o?.nationalNumber ?? i}`;
59
- }
60
- function _e(e, t) {
61
- return {
62
- ...e,
63
- country: t.value,
64
- countryCallingCode: t.dialCode,
65
- lengthIssue: d(e.rawInput, t.value)
66
- };
67
- }
68
- function x(e, n) {
69
- let r = y(e ?? "").trim();
70
- if (!r) {
71
- let e = n ?? null;
72
- return {
73
- displayValue: "",
74
- formattedInternational: "",
75
- formattedNational: "",
76
- e164: null,
77
- country: e,
78
- countryCallingCode: e ? t(e) : null,
79
- nationalNumber: "",
80
- rawInput: "",
81
- isValid: !1,
82
- lengthIssue: null
83
- };
84
- }
85
- let i = me(r);
86
- if (i == null && n == null) return {
87
- displayValue: r,
88
- formattedInternational: r,
89
- formattedNational: r,
90
- e164: null,
91
- country: null,
92
- countryCallingCode: null,
93
- nationalNumber: f(r),
94
- rawInput: r,
95
- isValid: !1,
96
- lengthIssue: null
97
- };
98
- let a = i ?? r, { international: o, national: s, formatted: ee, phoneNumber: c, detectedCountry: l } = u(a, n), te = i != null, p = te ? l ?? n ?? null : n ?? l ?? null, m = he(p, c?.countryCallingCode), re = f(a), ie = c?.nationalNumber ?? (m && a.startsWith("+") ? ne(re, m) : f(r));
99
- return {
100
- displayValue: te ? o : ee,
101
- formattedInternational: c?.formatInternational() ?? o,
102
- formattedNational: c?.formatNational() ?? s,
103
- e164: c?.number ?? null,
104
- country: p,
105
- countryCallingCode: m,
106
- nationalNumber: ie,
107
- rawInput: a,
108
- isValid: c?.isValid() ?? !1,
109
- lengthIssue: p ? d(a, p) : null
110
- };
111
- }
112
- var S = g.forwardRef(function(r, u) {
113
- let { value: d, defaultCountry: ne, country: v, locale: y, onChange: b, onCountryChange: fe, className: me, inputClassName: he, disabled: S, readOnly: C, selectProps: ve, autofillShimName: ye, messages: be, renderValidationMessage: xe, ...Se } = r, { onFocus: Ce, onBlur: we, onKeyDown: Te, name: Ee, autoComplete: De, ...Oe } = Se, w = typeof v == "string" ? v : null, T = o(y), E = g.useMemo(() => l(T), [T]), D = g.useMemo(() => n(E, be), [E, be]), O = g.useMemo(() => a(E, T), [T, E]), k = g.useCallback((e) => {
114
- let t = O.find((t) => t.value === e);
115
- return t ? te(t) : i(e);
116
- }, [O]), ke = g.useMemo(() => {
117
- let e = s(ne ?? v ?? "US");
118
- return O.some((t) => t.value === e) ? e : O[0]?.value ?? "US";
119
- }, [
120
- O,
121
- v,
122
- ne
123
- ]), Ae = g.useRef(null);
124
- Ae.current ||= x(d, w ?? void 0);
125
- let je = Ae.current, [A, Me] = g.useState(w ? null : je.country), [j, Ne] = g.useState(je.displayValue), [M, N] = g.useState(""), [P, F] = g.useState(!1), [I, L] = g.useState(-1), [Pe, Fe] = g.useState(!1), [Ie, Le] = g.useState(!1), [Re, R] = g.useState(je.lengthIssue), z = g.useRef(null), B = g.useRef(""), V = g.useRef(null), H = g.useRef("smooth"), U = g.useRef(null), ze = g.useRef(!1), Be = g.useRef(null), W = g.useRef(null), G = w ?? A, Ve = w ?? z.current ?? void 0;
126
- g.useImperativeHandle(u, () => W.current, []), g.useLayoutEffect(() => {
127
- Le(!0);
128
- }, []), g.useLayoutEffect(() => {
129
- let e = U.current;
130
- if (!e) return;
131
- let t = W.current;
132
- if (U.current = null, !t) return;
133
- let { start: n, end: r } = e;
134
- t.setSelectionRange(n, r);
135
- }, [j]);
136
- let He = ve ?? {}, Ue = g.useId(), { styles: We, components: Ge, classNamePrefix: Ke, formatOptionLabel: qe, menuPortalTarget: Je, menuPosition: Ye, ...Xe } = He, { instanceId: Ze, noOptionsMessage: Qe, ...$e } = Xe, et = Ze ?? Ue, [tt, nt] = g.useState(null), rt = "menuPortalTarget" in He, K = rt ? Je : tt, it = g.useMemo(() => {
137
- let e = We?.menuPortal;
138
- return {
139
- ...le,
140
- ...We ?? {},
141
- menuPortal: (t, n) => {
142
- let r = {
143
- ...t,
144
- zIndex: 1300
145
- }, i = e ? e(r, n) : r;
146
- if (typeof document > "u" || !K || K === document.body) return i;
147
- let a = K.getBoundingClientRect();
148
- return {
149
- ...i,
150
- left: typeof i.left == "number" ? i.left - a.left : i.left,
151
- top: typeof i.top == "number" ? i.top - a.top : i.top
152
- };
153
- }
154
- };
155
- }, [K, We]);
156
- g.useLayoutEffect(() => {
157
- if (rt || typeof document > "u") return;
158
- let e = W.current?.closest("[data-slot='dialog-content'], [data-slot='sheet-content'], [role='dialog']") ?? document.body;
159
- nt(e);
160
- }, [rt]);
161
- let at = g.useMemo(() => {
162
- let e = {
163
- Control: ae,
164
- IndicatorsContainer: h,
165
- DropdownIndicator: h,
166
- IndicatorSeparator: h,
167
- ValueContainer: h
168
- }, t = Ge ?? {};
169
- return t.Option ? {
170
- ...e,
171
- ...t
172
- } : {
173
- ...e,
174
- ...t,
175
- Option: se
176
- };
177
- }, [Ge]);
178
- g.useEffect(() => () => {
179
- V.current != null && typeof window < "u" && window.clearTimeout(V.current);
180
- }, []), g.useEffect(() => {
181
- if (d == null) return;
182
- let e = x(d, Ve);
183
- B.current = "", Ne(e.displayValue), F(!1), N(""), L(-1), R(e.lengthIssue), !w && e.country !== A && Me(e.country);
184
- }, [
185
- w,
186
- Ve,
187
- A,
188
- d
189
- ]), g.useEffect(() => {
190
- let e = G ?? null;
191
- !ze.current && e == null || ze.current && Be.current === e || (ze.current = !0, Be.current = e, fe?.(e, e ? k(e) : null));
192
- }, [
193
- G,
194
- fe,
195
- k
196
- ]);
197
- let q = g.useCallback((e) => {
198
- b?.({
199
- ...e,
200
- selectedCountry: e.country ? k(e.country) : null
201
- });
202
- }, [b, k]), J = g.useCallback(() => {
203
- typeof window > "u" || (V.current != null && window.clearTimeout(V.current), V.current = window.setTimeout(() => {
204
- B.current = "", V.current = null;
205
- }, 800));
206
- }, []), ot = g.useCallback((e, t) => {
207
- Ne(e.displayValue), F(!1), N(""), L(-1), R(e.lengthIssue), !w && e.country !== A && Me(e.country), t && (U.current = m(t, e.displayValue)), q({
208
- formattedInternational: e.formattedInternational,
209
- formattedNational: e.formattedNational,
210
- e164: e.e164,
211
- country: e.country,
212
- countryCallingCode: e.countryCallingCode,
213
- nationalNumber: e.nationalNumber,
214
- rawInput: e.rawInput,
215
- isValid: e.isValid
216
- });
217
- }, [
218
- w,
219
- q,
220
- A
221
- ]), st = g.useCallback((e) => {
222
- let n = e.target, r = p(n), i = n.value;
223
- B.current = "";
224
- let a = pe(i), o = z.current;
225
- if (a != null && o) {
226
- let e = t(o);
227
- f(a).startsWith(e) || (z.current = null);
228
- } else a != null && (z.current = null);
229
- let s = z.current, ee = f(i);
230
- if (!w && s && a == null && ee) {
231
- let e = {
232
- value: s,
233
- dialCode: t(s)
234
- }, n = _e(x(ge(i, {
235
- value: e.value,
236
- dialCode: e.dialCode
237
- }, { allowImplicitInternational: !1 }), s), e);
238
- ot(n, r);
239
- return;
240
- }
241
- let c = x(i, w ?? s ?? void 0);
242
- ot(c, r);
243
- }, [ot, w]), ct = g.useCallback((e) => {
244
- if (!e) return;
245
- z.current = e.value;
246
- let t = _e(x(ge(j, e), e.value), e);
247
- Ne(t.displayValue), U.current = {
248
- start: t.displayValue.length,
249
- end: t.displayValue.length
250
- }, F(!1), N(""), L(-1), R(t.lengthIssue), w || Me(e.value), q({
251
- formattedInternational: t.formattedInternational,
252
- formattedNational: t.formattedNational,
253
- e164: t.e164,
254
- country: t.country,
255
- countryCallingCode: t.countryCallingCode,
256
- nationalNumber: t.nationalNumber,
257
- rawInput: t.rawInput,
258
- isValid: t.isValid
259
- }), requestAnimationFrame(() => {
260
- W.current?.focus();
261
- });
262
- }, [
263
- w,
264
- q,
265
- j
266
- ]), Y = g.useMemo(() => {
267
- if (!P) return [];
268
- let e = [], t = (t) => {
269
- t && !e.some((e) => e.value === t.value) && e.push(t);
270
- }, n = O.find((e) => e.value === ke), r = G ? O.find((e) => e.value === G) : void 0, i = M.trim(), a = f(i), o = ee(i);
271
- return !a && !o ? (t(r), t(n), O.forEach(t), e) : (a && O.filter((e) => e.dialCode.startsWith(a)).sort((e, t) => {
272
- let n = e.dialCode === a, r = t.dialCode === a;
273
- return n && !r ? -1 : !n && r ? 1 : e.dialCode.length - t.dialCode.length;
274
- }).forEach(t), o && O.filter((e) => e.normalizedSearchableTokens.some((e) => e.includes(o))).sort((e, t) => {
275
- let n = c(e.normalizedSearchableTokens, o), r = c(t.normalizedSearchableTokens, o);
276
- return n === r ? e.name.localeCompare(t.name) : n - r;
277
- }).forEach(t), t(r), t(n), e.length === 0 && O.forEach(t), e);
278
- }, [
279
- G,
280
- O,
281
- M,
282
- ke,
283
- P
284
- ]), X = Pe && P && Y.length > 0;
285
- g.useEffect(() => {
286
- X || (H.current = "smooth");
287
- }, [X]), g.useEffect(() => {
288
- if (!X) {
289
- L(-1);
290
- return;
291
- }
292
- if (Y.length === 0) {
293
- L(-1);
294
- return;
295
- }
296
- L((e) => e < 0 || e >= Y.length ? 0 : e);
297
- }, [Y, X]);
298
- let Z = I >= 0 ? Y[I] ?? null : null;
299
- g.useEffect(() => {
300
- I < 0 && (H.current = "smooth");
301
- }, [I]);
302
- let lt = g.useCallback(() => {
303
- let e = H.current;
304
- return H.current = "smooth", e;
305
- }, []), ut = g.useCallback((e) => {
306
- let t = Y.findIndex((t) => t.value === e.value);
307
- t !== -1 && L(t);
308
- }, [Y]), dt = g.useCallback((e, t) => qe ? qe(e, t) : ce(e), [qe]), ft = g.useCallback((e) => dt(e, {
309
- context: "menu",
310
- inputValue: M,
311
- selectValue: []
312
- }), [M, dt]), pt = g.useMemo(() => ({
313
- highlightedValue: Z?.value ?? null,
314
- setHighlightedOption: ut,
315
- renderOptionLabel: ft,
316
- consumeScrollBehavior: lt
317
- }), [
318
- lt,
319
- Z,
320
- ft,
321
- ut
322
- ]), Q = G ? O.find((e) => e.value === G) : void 0, mt = Q?.flag ?? "", ht = G ? D.selectedCountryLabel(Q?.name ?? G) : D.selectCountryLabel, gt = !!(G && mt), $ = Re === "TOO_LONG" ? D.lengthTooLong(Q?.name ?? G ?? null) : null, _t = Q?.name ?? G ?? null, vt = null;
323
- if ($) {
324
- let e = xe?.({
325
- message: $,
326
- code: "TOO_LONG",
327
- countryName: _t
328
- });
329
- vt = e === void 0 ? /* @__PURE__ */ _("p", {
330
- className: "mt-1 text-xs text-destructive",
331
- children: /* @__PURE__ */ _("span", { children: $ })
332
- }) : e;
333
- }
334
- let yt = g.useCallback((e) => {
335
- B.current = `${B.current}${e}`.slice(-12), N(B.current), F(!0), J();
336
- }, [J]), bt = g.useCallback(() => {
337
- let e = B.current;
338
- e && (B.current = e.slice(0, -1), N(B.current), B.current && J());
339
- }, [J]), xt = g.useCallback((e) => {
340
- if (Te?.(e), e.defaultPrevented) return;
341
- let t = e.key;
342
- if (e.metaKey || e.ctrlKey || e.altKey) return;
343
- let n = e.currentTarget, r = n.value, i = n.selectionStart ?? 0, a = n.selectionEnd ?? i, o = i === a;
344
- if (t === "Backspace" && o) {
345
- let e = re(r, i);
346
- e !== i && n.setSelectionRange(e, e);
347
- } else if (t === "ArrowLeft" && o) {
348
- let t = re(r, i);
349
- if (t !== i) {
350
- e.preventDefault(), n.setSelectionRange(t, t);
351
- return;
352
- }
353
- } else if (t === "ArrowRight" && o) {
354
- let t = ie(r, a);
355
- if (t !== a) {
356
- e.preventDefault(), n.setSelectionRange(t, t);
357
- return;
358
- }
359
- }
360
- if (t === "ArrowDown") {
361
- if (H.current = e.repeat ? "auto" : "smooth", e.preventDefault(), !P) {
362
- F(!0), L(Y.length > 0 ? 0 : -1);
363
- return;
364
- }
365
- Y.length > 0 && L((e) => e < 0 ? 0 : (e + 1) % Y.length);
366
- return;
367
- }
368
- if (t === "ArrowUp") {
369
- if (H.current = e.repeat ? "auto" : "smooth", e.preventDefault(), !P) {
370
- F(!0), L(Y.length > 0 ? Y.length - 1 : -1);
371
- return;
372
- }
373
- Y.length > 0 && L((e) => e < 0 ? Y.length - 1 : (e - 1 + Y.length) % Y.length);
374
- return;
375
- }
376
- if (/^[a-z]$/i.test(t)) {
377
- e.preventDefault(), P || (F(!0), L(Y.length > 0 ? 0 : -1)), yt(t.toLowerCase());
378
- return;
379
- }
380
- if (X) {
381
- if (t === "Backspace" && B.current) {
382
- e.preventDefault(), bt();
383
- return;
384
- }
385
- if (t === "Escape") {
386
- e.preventDefault(), B.current = "", N(""), F(!1);
387
- return;
388
- }
389
- if (t === "Enter" && Y.length > 0) {
390
- e.preventDefault();
391
- let t = Z ?? Y[0];
392
- ct(t);
393
- return;
394
- }
395
- }
396
- }, [
397
- yt,
398
- Y,
399
- ct,
400
- Z,
401
- Te,
402
- bt,
403
- P,
404
- X
405
- ]), St = g.useCallback((e) => {
406
- Fe(!0), Ce?.(e);
407
- }, [Ce]), Ct = g.useCallback((e) => {
408
- Fe(!1), F(!1), B.current = "", N(""), we?.(e);
409
- }, [we]), wt = g.useCallback(() => {
410
- S || C || (B.current = "", N(""), F(!0), L((e) => e < 0 ? 0 : e), requestAnimationFrame(() => {
411
- W.current?.focus();
412
- }));
413
- }, [S, C]), Tt = ye ?? (Ee ? `${Ee}_shim` : void 0);
414
- return /* @__PURE__ */ ue("div", {
415
- className: e("relative flex flex-col", me),
416
- children: [
417
- /* @__PURE__ */ ue("div", {
418
- className: "relative",
419
- children: [/* @__PURE__ */ _("input", {
420
- ...Oe,
421
- ref: W,
422
- type: "tel",
423
- className: e("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", "pl-11 pr-3", he),
424
- name: Ee,
425
- value: j,
426
- onChange: st,
427
- onFocus: St,
428
- onBlur: Ct,
429
- onKeyDown: xt,
430
- disabled: S,
431
- readOnly: C,
432
- autoComplete: De ?? "off"
433
- }), /* @__PURE__ */ _("button", {
434
- type: "button",
435
- className: e("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", gt ? "border-transparent" : "border-dashed border-border text-muted-foreground", S ? "cursor-not-allowed opacity-50" : C ? "cursor-default" : "cursor-pointer hover:bg-muted"),
436
- "aria-label": ht,
437
- onMouseDown: (e) => e.preventDefault(),
438
- onClick: wt,
439
- tabIndex: -1,
440
- disabled: S,
441
- children: /* @__PURE__ */ _("span", {
442
- "aria-hidden": "true",
443
- children: gt ? mt : "?"
444
- })
445
- })]
446
- }),
447
- Tt ? /* @__PURE__ */ _("input", {
448
- tabIndex: -1,
449
- autoComplete: "tel",
450
- name: Tt,
451
- "aria-hidden": "true",
452
- className: "pointer-events-none absolute left-0 top-0 h-0 w-0 opacity-0"
453
- }) : null,
454
- /* @__PURE__ */ _("div", {
455
- className: "absolute left-0 top-full z-30 mt-1",
456
- style: {
457
- pointerEvents: X ? "auto" : "none",
458
- width: "min(260px, 100%)"
459
- },
460
- onMouseDown: (e) => e.preventDefault(),
461
- children: Ie ? /* @__PURE__ */ _(oe.Provider, {
462
- value: pt,
463
- children: /* @__PURE__ */ _(de, {
464
- ...$e,
465
- instanceId: et,
466
- menuIsOpen: X,
467
- options: Y,
468
- value: null,
469
- components: at,
470
- styles: it,
471
- isClearable: !1,
472
- isSearchable: !1,
473
- backspaceRemovesValue: !1,
474
- tabSelectsValue: !1,
475
- menuShouldScrollIntoView: !1,
476
- menuPortalTarget: K,
477
- menuPosition: Ye ?? (K ? "fixed" : "absolute"),
478
- onChange: ct,
479
- classNamePrefix: Ke ?? "phone-number-suggestions",
480
- placeholder: "",
481
- formatOptionLabel: dt,
482
- noOptionsMessage: Qe ?? (() => D.noMatches)
483
- })
484
- }) : null
485
- }),
486
- vt
487
- ]
488
- });
489
- });
490
- S.displayName = "PhoneNumberInput";
491
11
  //#endregion
492
- export { S as PhoneNumberInput };
12
+ export { r as getCountryList };
493
13
 
494
14
  //# sourceMappingURL=index362.js.map