@rpcbase/ui 0.210.0 → 0.212.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 (641) hide show
  1. package/dist/index.js +73 -25
  2. package/dist/index.js.map +1 -0
  3. package/dist/index10.js +666 -18
  4. package/dist/index10.js.map +1 -1
  5. package/dist/index100.js +46 -9
  6. package/dist/index100.js.map +1 -1
  7. package/dist/index101.js +7 -14
  8. package/dist/index101.js.map +1 -1
  9. package/dist/index102.js +50 -10
  10. package/dist/index102.js.map +1 -1
  11. package/dist/index103.js +233 -15
  12. package/dist/index103.js.map +1 -1
  13. package/dist/index104.js +25 -21
  14. package/dist/index104.js.map +1 -1
  15. package/dist/index105.js +27 -27
  16. package/dist/index105.js.map +1 -1
  17. package/dist/index106.js +404 -9
  18. package/dist/index106.js.map +1 -1
  19. package/dist/index107.js +609 -9
  20. package/dist/index107.js.map +1 -1
  21. package/dist/index108.js +55 -10
  22. package/dist/index108.js.map +1 -1
  23. package/dist/index109.js +6 -8
  24. package/dist/index109.js.map +1 -1
  25. package/dist/index11.js +459 -1673
  26. package/dist/index11.js.map +1 -1
  27. package/dist/index110.js +7 -8
  28. package/dist/index110.js.map +1 -1
  29. package/dist/index111.js +17 -7
  30. package/dist/index111.js.map +1 -1
  31. package/dist/index112.js +8 -11
  32. package/dist/index112.js.map +1 -1
  33. package/dist/index113.js +10 -10
  34. package/dist/index113.js.map +1 -1
  35. package/dist/index114.js +19 -37
  36. package/dist/index114.js.map +1 -1
  37. package/dist/index115.js +6 -9
  38. package/dist/index115.js.map +1 -1
  39. package/dist/index116.js +7 -8
  40. package/dist/index116.js.map +1 -1
  41. package/dist/index117.js +8 -10
  42. package/dist/index117.js.map +1 -1
  43. package/dist/index118.js +8 -12
  44. package/dist/index118.js.map +1 -1
  45. package/dist/index119.js +6 -7
  46. package/dist/index119.js.map +1 -1
  47. package/dist/index12.js +79 -10
  48. package/dist/index12.js.map +1 -1
  49. package/dist/index120.js +6 -8
  50. package/dist/index120.js.map +1 -1
  51. package/dist/index121.js +8 -7
  52. package/dist/index121.js.map +1 -1
  53. package/dist/index122.js +27 -8
  54. package/dist/index122.js.map +1 -1
  55. package/dist/index123.js +9 -9
  56. package/dist/index123.js.map +1 -1
  57. package/dist/index124.js +6 -7
  58. package/dist/index124.js.map +1 -1
  59. package/dist/index125.js +8 -7
  60. package/dist/index125.js.map +1 -1
  61. package/dist/index126.js +8 -10
  62. package/dist/index126.js.map +1 -1
  63. package/dist/index127.js +8 -60
  64. package/dist/index127.js.map +1 -1
  65. package/dist/index128.js +8 -9
  66. package/dist/index128.js.map +1 -1
  67. package/dist/index129.js +8 -23
  68. package/dist/index129.js.map +1 -1
  69. package/dist/index13.js +23 -21
  70. package/dist/index13.js.map +1 -1
  71. package/dist/index130.js +11 -22
  72. package/dist/index130.js.map +1 -1
  73. package/dist/index131.js +8 -37
  74. package/dist/index131.js.map +1 -1
  75. package/dist/index132.js +7 -8
  76. package/dist/index132.js.map +1 -1
  77. package/dist/index133.js +7 -11
  78. package/dist/index133.js.map +1 -1
  79. package/dist/index134.js +9 -17
  80. package/dist/index134.js.map +1 -1
  81. package/dist/index135.js +148 -13
  82. package/dist/index135.js.map +1 -1
  83. package/dist/index136.js +42 -9
  84. package/dist/index136.js.map +1 -1
  85. package/dist/index137.js +7 -8
  86. package/dist/index137.js.map +1 -1
  87. package/dist/index138.js +10 -8
  88. package/dist/index138.js.map +1 -1
  89. package/dist/index139.js +16 -8
  90. package/dist/index139.js.map +1 -1
  91. package/dist/index14.js +20 -194
  92. package/dist/index14.js.map +1 -1
  93. package/dist/index140.js +16 -8
  94. package/dist/index140.js.map +1 -1
  95. package/dist/index141.js +10 -7
  96. package/dist/index141.js.map +1 -1
  97. package/dist/index142.js +34 -9
  98. package/dist/index142.js.map +1 -1
  99. package/dist/index143.js +14 -24
  100. package/dist/index143.js.map +1 -1
  101. package/dist/index144.js +13 -11
  102. package/dist/index144.js.map +1 -1
  103. package/dist/index145.js +11 -10
  104. package/dist/index145.js.map +1 -1
  105. package/dist/index146.js +16 -9
  106. package/dist/index146.js.map +1 -1
  107. package/dist/index147.js +104 -9
  108. package/dist/index147.js.map +1 -1
  109. package/dist/index148.js +23 -8
  110. package/dist/index148.js.map +1 -1
  111. package/dist/index149.js +56 -7
  112. package/dist/index149.js.map +1 -1
  113. package/dist/index15.js +30 -33
  114. package/dist/index15.js.map +1 -1
  115. package/dist/index150.js +75 -8
  116. package/dist/index150.js.map +1 -1
  117. package/dist/index151.js +12 -7
  118. package/dist/index151.js.map +1 -1
  119. package/dist/index152.js +23 -8
  120. package/dist/index152.js.map +1 -1
  121. package/dist/index153.js +19 -7
  122. package/dist/index153.js.map +1 -1
  123. package/dist/index154.js +26 -7
  124. package/dist/index154.js.map +1 -1
  125. package/dist/index155.js +9 -7
  126. package/dist/index155.js.map +1 -1
  127. package/dist/index156.js +9 -32
  128. package/dist/index156.js.map +1 -1
  129. package/dist/index157.js +26 -35
  130. package/dist/index157.js.map +1 -1
  131. package/dist/index158.js +38 -19
  132. package/dist/index158.js.map +1 -1
  133. package/dist/index159.js +19 -15
  134. package/dist/index159.js.map +1 -1
  135. package/dist/index16.js +268 -57
  136. package/dist/index16.js.map +1 -1
  137. package/dist/index160.js +9 -12
  138. package/dist/index160.js.map +1 -1
  139. package/dist/index161.js +7 -19
  140. package/dist/index161.js.map +1 -1
  141. package/dist/index162.js +7 -89
  142. package/dist/index162.js.map +1 -1
  143. package/dist/index163.js +7 -50
  144. package/dist/index163.js.map +1 -1
  145. package/dist/index164.js +7 -20
  146. package/dist/index164.js.map +1 -1
  147. package/dist/index165.js +6 -11
  148. package/dist/index165.js.map +1 -1
  149. package/dist/index166.js +9 -13
  150. package/dist/index166.js.map +1 -1
  151. package/dist/index167.js +27 -9
  152. package/dist/index167.js.map +1 -1
  153. package/dist/index168.js +10 -25
  154. package/dist/index168.js.map +1 -1
  155. package/dist/index169.js +9 -10
  156. package/dist/index169.js.map +1 -1
  157. package/dist/index17.js +179 -9
  158. package/dist/index17.js.map +1 -1
  159. package/dist/index170.js +8 -9
  160. package/dist/index170.js.map +1 -1
  161. package/dist/index171.js +6 -9
  162. package/dist/index171.js.map +1 -1
  163. package/dist/index172.js +6 -7
  164. package/dist/index172.js.map +1 -1
  165. package/dist/index173.js +7 -9
  166. package/dist/index173.js.map +1 -1
  167. package/dist/index174.js +6 -70
  168. package/dist/index174.js.map +1 -1
  169. package/dist/index175.js +7 -20
  170. package/dist/index175.js.map +1 -1
  171. package/dist/index176.js +6 -15
  172. package/dist/index176.js.map +1 -1
  173. package/dist/index177.js +6 -12
  174. package/dist/index177.js.map +1 -1
  175. package/dist/index178.js +6 -23
  176. package/dist/index178.js.map +1 -1
  177. package/dist/index179.js +16 -20
  178. package/dist/index179.js.map +1 -1
  179. package/dist/index18.js +469 -27
  180. package/dist/index18.js.map +1 -1
  181. package/dist/index180.js +158 -59
  182. package/dist/index180.js.map +1 -1
  183. package/dist/index181.js +33 -13
  184. package/dist/index181.js.map +1 -1
  185. package/dist/index182.js +12 -9
  186. package/dist/index182.js.map +1 -1
  187. package/dist/index183.js +51 -29
  188. package/dist/index183.js.map +1 -1
  189. package/dist/index184.js +14 -29
  190. package/dist/index184.js.map +1 -1
  191. package/dist/index185.js +47 -16
  192. package/dist/index185.js.map +1 -1
  193. package/dist/index186.js +98 -16
  194. package/dist/index186.js.map +1 -1
  195. package/dist/index187.js +90 -10
  196. package/dist/index187.js.map +1 -1
  197. package/dist/index188.js +109 -27
  198. package/dist/index188.js.map +1 -1
  199. package/dist/index189.js +55 -388
  200. package/dist/index189.js.map +1 -1
  201. package/dist/index19.js +266 -65
  202. package/dist/index19.js.map +1 -1
  203. package/dist/index190.js +15 -499
  204. package/dist/index190.js.map +1 -1
  205. package/dist/index191.js +39 -132
  206. package/dist/index191.js.map +1 -1
  207. package/dist/index192.js +11 -55
  208. package/dist/index192.js.map +1 -1
  209. package/dist/index193.js +6 -80
  210. package/dist/index193.js.map +1 -1
  211. package/dist/index194.js +12 -902
  212. package/dist/index194.js.map +1 -1
  213. package/dist/index195.js +119 -22
  214. package/dist/index195.js.map +1 -1
  215. package/dist/index196.js +21 -452
  216. package/dist/index196.js.map +1 -1
  217. package/dist/index197.js +18 -7
  218. package/dist/index197.js.map +1 -1
  219. package/dist/index198.js +38 -59
  220. package/dist/index198.js.map +1 -1
  221. package/dist/index199.js +23 -64
  222. package/dist/index199.js.map +1 -1
  223. package/dist/index2.js +8 -10
  224. package/dist/index2.js.map +1 -0
  225. package/dist/index20.js +5 -43
  226. package/dist/index20.js.map +1 -1
  227. package/dist/index200.js +11 -63
  228. package/dist/index200.js.map +1 -1
  229. package/dist/index201.js +22 -11
  230. package/dist/index201.js.map +1 -1
  231. package/dist/index202.js +31 -19
  232. package/dist/index202.js.map +1 -1
  233. package/dist/index203.js +20 -148
  234. package/dist/index203.js.map +1 -1
  235. package/dist/index204.js +28 -7
  236. package/dist/index204.js.map +1 -1
  237. package/dist/index205.js +32 -14
  238. package/dist/index205.js.map +1 -1
  239. package/dist/index206.js +7 -107
  240. package/dist/index206.js.map +1 -1
  241. package/dist/index207.js +65 -355
  242. package/dist/index207.js.map +1 -1
  243. package/dist/index208.js +184 -99
  244. package/dist/index208.js.map +1 -1
  245. package/dist/index209.js +49 -329
  246. package/dist/index209.js.map +1 -1
  247. package/dist/index21.js +28 -11
  248. package/dist/index21.js.map +1 -1
  249. package/dist/index210.js +60 -212
  250. package/dist/index210.js.map +1 -1
  251. package/dist/index211.js +12 -22
  252. package/dist/index211.js.map +1 -1
  253. package/dist/index212.js +69 -30
  254. package/dist/index212.js.map +1 -1
  255. package/dist/index213.js +21 -189
  256. package/dist/index213.js.map +1 -1
  257. package/dist/index214.js +20 -21
  258. package/dist/index214.js.map +1 -1
  259. package/dist/index215.js +9 -65
  260. package/dist/index215.js.map +1 -1
  261. package/dist/index216.js +8 -46
  262. package/dist/index216.js.map +1 -1
  263. package/dist/index217.js +9 -12
  264. package/dist/index217.js.map +1 -1
  265. package/dist/index218.js +8 -28
  266. package/dist/index218.js.map +1 -1
  267. package/dist/index219.js +9 -47
  268. package/dist/index219.js.map +1 -1
  269. package/dist/index22.js +48 -16
  270. package/dist/index22.js.map +1 -1
  271. package/dist/index220.js +19 -20
  272. package/dist/index220.js.map +1 -1
  273. package/dist/index221.js +8 -6
  274. package/dist/index221.js.map +1 -1
  275. package/dist/index222.js +7 -7
  276. package/dist/index222.js.map +1 -1
  277. package/dist/index223.js +15 -23
  278. package/dist/index223.js.map +1 -1
  279. package/dist/index224.js +12 -27
  280. package/dist/index224.js.map +1 -1
  281. package/dist/index225.js +16 -70
  282. package/dist/index225.js.map +1 -1
  283. package/dist/index226.js +16 -17
  284. package/dist/index226.js.map +1 -1
  285. package/dist/index227.js +8 -7
  286. package/dist/index227.js.map +1 -1
  287. package/dist/index228.js +8 -53
  288. package/dist/index228.js.map +1 -1
  289. package/dist/index229.js +9 -8
  290. package/dist/index229.js.map +1 -1
  291. package/dist/index23.js +37 -109
  292. package/dist/index23.js.map +1 -1
  293. package/dist/index230.js +7 -28
  294. package/dist/index230.js.map +1 -1
  295. package/dist/index231.js +57 -16
  296. package/dist/index231.js.map +1 -1
  297. package/dist/index232.js +11 -12
  298. package/dist/index232.js.map +1 -1
  299. package/dist/index233.js +8 -3
  300. package/dist/index233.js.map +1 -0
  301. package/dist/index234.js +7 -28
  302. package/dist/index234.js.map +1 -1
  303. package/dist/index235.js +11 -71
  304. package/dist/index235.js.map +1 -1
  305. package/dist/index236.js +8 -3
  306. package/dist/index236.js.map +1 -0
  307. package/dist/index237.js +7 -14
  308. package/dist/index237.js.map +1 -1
  309. package/dist/index238.js +6 -53
  310. package/dist/index238.js.map +1 -1
  311. package/dist/index239.js +13 -117
  312. package/dist/index239.js.map +1 -1
  313. package/dist/index24.js +227 -11
  314. package/dist/index24.js.map +1 -1
  315. package/dist/index240.js +13 -9
  316. package/dist/index240.js.map +1 -1
  317. package/dist/index241.js +13 -16
  318. package/dist/index241.js.map +1 -1
  319. package/dist/index242.js +13 -689
  320. package/dist/index242.js.map +1 -1
  321. package/dist/index243.js +14 -256
  322. package/dist/index243.js.map +1 -1
  323. package/dist/index244.js +13 -704
  324. package/dist/index244.js.map +1 -1
  325. package/dist/index245.js +9 -7433
  326. package/dist/index245.js.map +1 -1
  327. package/dist/index246.js +8 -9
  328. package/dist/index246.js.map +1 -1
  329. package/dist/index247.js +7 -15
  330. package/dist/index247.js.map +1 -1
  331. package/dist/index248.js +8 -8
  332. package/dist/index248.js.map +1 -1
  333. package/dist/index249.js +9 -462
  334. package/dist/index249.js.map +1 -1
  335. package/dist/index25.js +32 -23
  336. package/dist/index25.js.map +1 -1
  337. package/dist/index250.js +9 -41
  338. package/dist/index250.js.map +1 -1
  339. package/dist/index251.js +19 -22
  340. package/dist/index251.js.map +1 -1
  341. package/dist/index252.js +10 -30
  342. package/dist/index252.js.map +1 -1
  343. package/dist/index253.js +13 -7
  344. package/dist/index253.js.map +1 -1
  345. package/dist/index254.js +14 -62
  346. package/dist/index254.js.map +1 -1
  347. package/dist/index255.js +24 -10
  348. package/dist/index255.js.map +1 -1
  349. package/dist/index256.js +13 -15
  350. package/dist/index256.js.map +1 -1
  351. package/dist/index257.js +13 -6
  352. package/dist/index257.js.map +1 -1
  353. package/dist/index258.js +12 -19
  354. package/dist/index258.js.map +1 -1
  355. package/dist/index259.js +7 -28
  356. package/dist/index259.js.map +1 -1
  357. package/dist/index26.js +16 -60
  358. package/dist/index26.js.map +1 -1
  359. package/dist/index260.js +9 -47
  360. package/dist/index260.js.map +1 -1
  361. package/dist/index261.js +19 -16
  362. package/dist/index261.js.map +1 -1
  363. package/dist/index262.js +12 -28
  364. package/dist/index262.js.map +1 -1
  365. package/dist/index263.js +21 -20
  366. package/dist/index263.js.map +1 -1
  367. package/dist/index264.js +18 -38
  368. package/dist/index264.js.map +1 -1
  369. package/dist/index265.js +15 -8
  370. package/dist/index265.js.map +1 -1
  371. package/dist/index266.js +32 -12
  372. package/dist/index266.js.map +1 -1
  373. package/dist/index267.js +15 -11
  374. package/dist/index267.js.map +1 -1
  375. package/dist/index268.js +28 -12
  376. package/dist/index268.js.map +1 -1
  377. package/dist/index269.js +8 -13
  378. package/dist/index269.js.map +1 -1
  379. package/dist/index27.js +2924 -58
  380. package/dist/index27.js.map +1 -1
  381. package/dist/index270.js +23 -10
  382. package/dist/index270.js.map +1 -1
  383. package/dist/index271.js +8 -77
  384. package/dist/index271.js.map +1 -1
  385. package/dist/index272.js +5 -174
  386. package/dist/index272.js.map +1 -1
  387. package/dist/index273.js +27 -118
  388. package/dist/index273.js.map +1 -1
  389. package/dist/index274.js +115 -17
  390. package/dist/index274.js.map +1 -1
  391. package/dist/index275.js +17 -82
  392. package/dist/index275.js.map +1 -1
  393. package/dist/index276.js +528 -45
  394. package/dist/index276.js.map +1 -1
  395. package/dist/index277.js +129 -17
  396. package/dist/index277.js.map +1 -1
  397. package/dist/index278.js +137 -20
  398. package/dist/index278.js.map +1 -1
  399. package/dist/index279.js +8 -103
  400. package/dist/index279.js.map +1 -1
  401. package/dist/index28.js +6 -1
  402. package/dist/index28.js.map +1 -0
  403. package/dist/index280.js +21 -60
  404. package/dist/index280.js.map +1 -1
  405. package/dist/index281.js +16 -112
  406. package/dist/index281.js.map +1 -1
  407. package/dist/index282.js +65 -72
  408. package/dist/index282.js.map +1 -1
  409. package/dist/index283.js +72 -117
  410. package/dist/index283.js.map +1 -1
  411. package/dist/index284.js +12 -59
  412. package/dist/index284.js.map +1 -1
  413. package/dist/index285.js +17 -47
  414. package/dist/index285.js.map +1 -1
  415. package/dist/index286.js +69 -146
  416. package/dist/index286.js.map +1 -1
  417. package/dist/index287.js +8 -143
  418. package/dist/index287.js.map +1 -1
  419. package/dist/index288.js +8 -258
  420. package/dist/index288.js.map +1 -1
  421. package/dist/index289.js +7 -244
  422. package/dist/index289.js.map +1 -1
  423. package/dist/index29.js +40 -5
  424. package/dist/index29.js.map +1 -0
  425. package/dist/index290.js +19 -302
  426. package/dist/index290.js.map +1 -1
  427. package/dist/index291.js +11 -8
  428. package/dist/index291.js.map +1 -1
  429. package/dist/index292.js +8 -9
  430. package/dist/index292.js.map +1 -1
  431. package/dist/index293.js +7 -10
  432. package/dist/index293.js.map +1 -1
  433. package/dist/index294.js +548 -9
  434. package/dist/index294.js.map +1 -1
  435. package/dist/index295.js +50 -10
  436. package/dist/index295.js.map +1 -1
  437. package/dist/index296.js +20 -24
  438. package/dist/index296.js.map +1 -1
  439. package/dist/index297.js +8 -13
  440. package/dist/index297.js.map +1 -1
  441. package/dist/index298.js +11 -130
  442. package/dist/index298.js.map +1 -1
  443. package/dist/index299.js +9 -167
  444. package/dist/index299.js.map +1 -1
  445. package/dist/index3.js +181 -6
  446. package/dist/index3.js.map +1 -1
  447. package/dist/index30.js +6 -8
  448. package/dist/index30.js.map +1 -1
  449. package/dist/index300.js +11 -72
  450. package/dist/index300.js.map +1 -1
  451. package/dist/index301.js +14 -112
  452. package/dist/index301.js.map +1 -1
  453. package/dist/index302.js +12 -495
  454. package/dist/index302.js.map +1 -1
  455. package/dist/index303.js +15 -65
  456. package/dist/index303.js.map +1 -1
  457. package/dist/index304.js +7 -7
  458. package/dist/index304.js.map +1 -1
  459. package/dist/index305.js +25 -30
  460. package/dist/index305.js.map +1 -1
  461. package/dist/index306.js +6 -67
  462. package/dist/index306.js.map +1 -1
  463. package/dist/index307.js +58 -155
  464. package/dist/index307.js.map +1 -1
  465. package/dist/index308.js +71 -65
  466. package/dist/index308.js.map +1 -1
  467. package/dist/index309.js +32 -563
  468. package/dist/index309.js.map +1 -1
  469. package/dist/index31.js +128 -9
  470. package/dist/index31.js.map +1 -1
  471. package/dist/index310.js +11 -213
  472. package/dist/index310.js.map +1 -1
  473. package/dist/index311.js +156 -335
  474. package/dist/index311.js.map +1 -1
  475. package/dist/index312.js +110 -271
  476. package/dist/index312.js.map +1 -1
  477. package/dist/index313.js +26 -0
  478. package/dist/index313.js.map +1 -0
  479. package/dist/index314.js +16 -0
  480. package/dist/index314.js.map +1 -0
  481. package/dist/index315.js +31 -0
  482. package/dist/index315.js.map +1 -0
  483. package/dist/index316.js +8 -0
  484. package/dist/index316.js.map +1 -0
  485. package/dist/index317.js +19 -0
  486. package/dist/index317.js.map +1 -0
  487. package/dist/index318.js +32 -0
  488. package/dist/index318.js.map +1 -0
  489. package/dist/index319.js +16 -0
  490. package/dist/index319.js.map +1 -0
  491. package/dist/index32.js +234 -8
  492. package/dist/index32.js.map +1 -1
  493. package/dist/index320.js +10 -0
  494. package/dist/index320.js.map +1 -0
  495. package/dist/index33.js +26 -10
  496. package/dist/index33.js.map +1 -1
  497. package/dist/index34.js +54 -14
  498. package/dist/index34.js.map +1 -1
  499. package/dist/index35.js +24 -8
  500. package/dist/index35.js.map +1 -1
  501. package/dist/index36.js +133 -11
  502. package/dist/index36.js.map +1 -1
  503. package/dist/index37.js +225 -12
  504. package/dist/index37.js.map +1 -1
  505. package/dist/index38.js +94 -16
  506. package/dist/index38.js.map +1 -1
  507. package/dist/index39.js +121 -9
  508. package/dist/index39.js.map +1 -1
  509. package/dist/index4.js +28 -25
  510. package/dist/index4.js.map +1 -1
  511. package/dist/index40.js +8 -9
  512. package/dist/index40.js.map +1 -1
  513. package/dist/index41.js +847 -10
  514. package/dist/index41.js.map +1 -1
  515. package/dist/index42.js +60 -13
  516. package/dist/index42.js.map +1 -1
  517. package/dist/index43.js +10 -11
  518. package/dist/index43.js.map +1 -1
  519. package/dist/index44.js +5 -9
  520. package/dist/index44.js.map +1 -1
  521. package/dist/index45.js +14 -8
  522. package/dist/index45.js.map +1 -1
  523. package/dist/index46.js +21 -14
  524. package/dist/index46.js.map +1 -1
  525. package/dist/index47.js +10 -14
  526. package/dist/index47.js.map +1 -1
  527. package/dist/index48.js +5 -11
  528. package/dist/index48.js.map +1 -1
  529. package/dist/index49.js +26 -7
  530. package/dist/index49.js.map +1 -1
  531. package/dist/index5.js +41 -34
  532. package/dist/index5.js.map +1 -1
  533. package/dist/index50.js +236 -9
  534. package/dist/index50.js.map +1 -1
  535. package/dist/index51.js +9 -9
  536. package/dist/index51.js.map +1 -1
  537. package/dist/index52.js +36 -9
  538. package/dist/index52.js.map +1 -1
  539. package/dist/index53.js +29 -12
  540. package/dist/index53.js.map +1 -1
  541. package/dist/index54.js +10 -16
  542. package/dist/index54.js.map +1 -1
  543. package/dist/index55.js +14 -9
  544. package/dist/index55.js.map +1 -1
  545. package/dist/index56.js +5 -10
  546. package/dist/index56.js.map +1 -1
  547. package/dist/index57.js +5 -10
  548. package/dist/index57.js.map +1 -1
  549. package/dist/index58.js +5 -17
  550. package/dist/index58.js.map +1 -1
  551. package/dist/index59.js +5 -11
  552. package/dist/index59.js.map +1 -1
  553. package/dist/index6.js +469 -42
  554. package/dist/index6.js.map +1 -1
  555. package/dist/index60.js +208 -12
  556. package/dist/index60.js.map +1 -1
  557. package/dist/index61.js +8 -70
  558. package/dist/index61.js.map +1 -1
  559. package/dist/index62.js +10 -10
  560. package/dist/index62.js.map +1 -1
  561. package/dist/index63.js +8 -33
  562. package/dist/index63.js.map +1 -1
  563. package/dist/index64.js +7 -13
  564. package/dist/index64.js.map +1 -1
  565. package/dist/index65.js +50 -18
  566. package/dist/index65.js.map +1 -1
  567. package/dist/index66.js +53 -203
  568. package/dist/index66.js.map +1 -1
  569. package/dist/index67.js +10 -23
  570. package/dist/index67.js.map +1 -1
  571. package/dist/index68.js +17 -19
  572. package/dist/index68.js.map +1 -1
  573. package/dist/index69.js +136 -125
  574. package/dist/index69.js.map +1 -1
  575. package/dist/index7.js +138 -224
  576. package/dist/index7.js.map +1 -1
  577. package/dist/index70.js +13 -21
  578. package/dist/index70.js.map +1 -1
  579. package/dist/index71.js +219 -11
  580. package/dist/index71.js.map +1 -1
  581. package/dist/index72.js +16 -13
  582. package/dist/index72.js.map +1 -1
  583. package/dist/index73.js +49 -16
  584. package/dist/index73.js.map +1 -1
  585. package/dist/index74.js +52 -12
  586. package/dist/index74.js.map +1 -1
  587. package/dist/index75.js +7 -13
  588. package/dist/index75.js.map +1 -1
  589. package/dist/index76.js +8 -7
  590. package/dist/index76.js.map +1 -1
  591. package/dist/index77.js +30 -44
  592. package/dist/index77.js.map +1 -1
  593. package/dist/index78.js +52 -383
  594. package/dist/index78.js.map +1 -1
  595. package/dist/index79.js +11 -41
  596. package/dist/index79.js.map +1 -1
  597. package/dist/index8.js +875 -37
  598. package/dist/index8.js.map +1 -1
  599. package/dist/index80.js +46 -21
  600. package/dist/index80.js.map +1 -1
  601. package/dist/index81.js +8 -60
  602. package/dist/index81.js.map +1 -1
  603. package/dist/index82.js +72 -11
  604. package/dist/index82.js.map +1 -1
  605. package/dist/index83.js +5 -9
  606. package/dist/index83.js.map +1 -1
  607. package/dist/index84.js +367 -9
  608. package/dist/index84.js.map +1 -1
  609. package/dist/index85.js +265 -9
  610. package/dist/index85.js.map +1 -1
  611. package/dist/index86.js +64 -9
  612. package/dist/index86.js.map +1 -1
  613. package/dist/index87.js +50 -10
  614. package/dist/index87.js.map +1 -1
  615. package/dist/index88.js +173 -10
  616. package/dist/index88.js.map +1 -1
  617. package/dist/index89.js +113 -14
  618. package/dist/index89.js.map +1 -1
  619. package/dist/index9.js +8 -33
  620. package/dist/index9.js.map +1 -1
  621. package/dist/index90.js +27 -10
  622. package/dist/index90.js.map +1 -1
  623. package/dist/index91.js +11 -10
  624. package/dist/index91.js.map +1 -1
  625. package/dist/index92.js +7 -8
  626. package/dist/index92.js.map +1 -1
  627. package/dist/index93.js +8 -10
  628. package/dist/index93.js.map +1 -1
  629. package/dist/index94.js +7 -50
  630. package/dist/index94.js.map +1 -1
  631. package/dist/index95.js +469 -108
  632. package/dist/index95.js.map +1 -1
  633. package/dist/index96.js +188 -13
  634. package/dist/index96.js.map +1 -1
  635. package/dist/index97.js +110 -9
  636. package/dist/index97.js.map +1 -1
  637. package/dist/index98.js +265 -9
  638. package/dist/index98.js.map +1 -1
  639. package/dist/index99.js +12 -8
  640. package/dist/index99.js.map +1 -1
  641. package/package.json +7 -7
@@ -1 +1 @@
1
- {"version":3,"file":"index302.js","names":["React","CountryCode","getCountryCallingCode","Select","Props","SelectProps","SingleValue","StylesConfig","cn","CountryOption","PhoneNumberChangeDetails","PhoneNumberInputProps","PhoneNumberSelectedCountry","resolveMessages","DEFAULT_COUNTRY","COMMON_IDD_PREFIXES","buildFallbackSelectedCountry","getCachedCountryOptions","getLocaleCacheKey","getValidCountry","normalizeSearchValue","optionMatchIndex","parseLocaleCacheKey","toSelectedCountry","detectNationalPrefixForDisplay","formatWithAsYouType","getLengthIssue","getSuggestionState","injectNationalPrefixDisplay","normalizeInputValue","sanitizeDigits","shouldDisplayExplicitCountrySelection","stripPrefix","LengthIssue","captureSelectionSnapshot","resolveSelection","skipFormattingCharactersLeft","skipFormattingCharactersRight","HiddenControl","NullComponent","SuggestionContext","SuggestionOption","formatCountryOption","suggestionSelectStyles","SuggestionContextValue","PhoneNumberInputMessages","PhoneNumberInputValidationCode","PhoneNumberInput","forwardRef","HTMLInputElement","props","forwardedRef","value","defaultCountry","country","countryProp","locale","onChange","onCountryChange","className","inputClassName","disabled","readOnly","selectProps","autofillShimName","messages","messagesProp","renderValidationMessage","restProps","onFocus","onInputFocus","onBlur","onInputBlur","onKeyDown","onInputKeyDown","name","inputName","autoComplete","inputAutoComplete","restInputProps","hasConfiguredCountry","localeCacheKey","localeForBuild","useMemo","resolvedMessages","countryOptions","resolveSelectedCountry","useCallback","match","find","candidate","fallbackCountry","some","option","hasResolvedCountryRef","useRef","initialStateRef","inputValue","normalizedValue","hasExplicitCountrySelection","lastNormalizedRef","current","baseCountryForInit","undefined","normalized","allowJustPlus","international","phoneNumber","detectedCountry","inferredCountry","hasExplicitInternationalPrefix","canonicalDetectedCountry","resolvedCountry","rawDigits","hasExplicitPlus","test","internationalDigits","initialDialCode","initialHasPrefix","suggestion","hasRemovedNationalPrefix","inferredCountryToApply","shouldSuggest","resolvedFromValue","Boolean","nextDialCode","finalHasPrefix","displayValue","force","displayDetectedCountry","allowInlineFlag","initialState","uncontrolledCountry","setUncontrolledCountry","useState","inputValueState","setInputValueState","countryQuery","setCountryQuery","showSuggestions","setShowSuggestions","highlightedIndex","setHighlightedIndex","isFocused","setIsFocused","lengthIssue","setLengthIssue","setHasExplicitCountrySelection","manualSelectionCountryRef","keyboardBufferRef","bufferTimeoutRef","scrollBehaviorRef","ScrollBehavior","pendingSelectionRef","start","end","consumeScrollBehavior","behavior","isCountryControlled","selectedCountry","activeCountry","inputRef","useImperativeHandle","useLayoutEffect","selection","input","setSelectionRange","selectOverrides","styles","userSelectStyles","components","userSelectComponents","classNamePrefix","userClassNamePrefix","formatOptionLabel","userFormatOptionLabel","forwardedSelectProps","noOptionsMessage","restForwardedSelectProps","mergedSelectStyles","mergedSelectComponents","baseComponents","Control","IndicatorsContainer","DropdownIndicator","IndicatorSeparator","ValueContainer","overrides","Option","hasAnnouncedCountryRef","notifyCountryChange","useEffect","window","clearTimeout","baseCountryForSync","previousNormalized","previousValue","nextCountry","initialHasTypedTrunk","finalCountry","hasTypedTrunk","manualSelectionActive","shouldShowInlineFlag","query","emitChange","details","Omit","scheduleBufferReset","setTimeout","handleInputChange","event","ChangeEvent","target","snapshot","raw","baseCountryForInput","dialCode","typedDigits","trim","startsWith","startsWithDialCode","hasLeadingZero","isIddPrefix","prefix","shouldRemoveNationalPrefix","slice","length","removeNationalPrefix","formattedInternational","formattedNational","e164","countryCallingCode","nationalNumber","rawInput","isValid","national","resolvedFromInput","normalizedDigits","nationalDigits","number","handleCountrySelect","previousDigits","currentDial","digitsWithoutCurrentDial","rebasedDigits","requestAnimationFrame","focus","filteredOptions","results","pushUnique","existing","push","fallbackOption","currentOption","digitQuery","normalizedQuery","forEach","dialMatches","filter","sort","a","b","aExact","bExact","nameMatches","normalizedSearchableTokens","token","includes","aIndex","bIndex","localeCompare","suggestionMenuIsOpen","highlightedOption","updateHighlightedOption","index","findIndex","selectFormatOptionLabel","NonNullable","meta","optionLabelRenderer","context","selectValue","highlightContextValue","highlightedValue","setHighlightedOption","renderOptionLabel","activeOption","activeFlag","flag","inlineFlagLabel","selectedCountryLabel","selectCountryLabel","hasInlineFlag","lengthHint","lengthTooLong","countryName","validationNode","ReactNode","rendered","message","code","appendToBuffer","char","popBuffer","handleKeyDown","KeyboardEvent","defaultPrevented","key","metaKey","ctrlKey","altKey","currentTarget","selectionStart","selectionEnd","isCollapsedSelection","nextStart","preventDefault","repeat","next","toLowerCase","handleFocus","FocusEvent","handleBlur","openCountryMenu","shimName","pointerEvents","width","noMatches","displayName"],"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 DEFAULT_COUNTRY,\n COMMON_IDD_PREFIXES,\n buildFallbackSelectedCountry,\n getCachedCountryOptions,\n getLocaleCacheKey,\n getValidCountry,\n normalizeSearchValue,\n optionMatchIndex,\n parseLocaleCacheKey,\n toSelectedCountry,\n} from \"./country-options\"\nimport {\n detectNationalPrefixForDisplay,\n formatWithAsYouType,\n getLengthIssue,\n getSuggestionState,\n injectNationalPrefixDisplay,\n normalizeInputValue,\n sanitizeDigits,\n shouldDisplayExplicitCountrySelection,\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\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 hasConfiguredCountry =\n typeof defaultCountry === \"string\" || typeof countryProp === \"string\"\n\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 fallbackCountry = 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 hasResolvedCountryRef = React.useRef<boolean>(hasConfiguredCountry)\n\n const initialStateRef = React.useRef<{\n country: CountryCode\n inputValue: string\n normalizedValue: string\n hasExplicitCountrySelection: boolean\n } | null>(null)\n const lastNormalizedRef = React.useRef<string>(\"\")\n\n if (!initialStateRef.current) {\n if (!value) {\n initialStateRef.current = {\n country: fallbackCountry,\n inputValue: \"\",\n normalizedValue: \"\",\n hasExplicitCountrySelection: false,\n }\n lastNormalizedRef.current = \"\"\n } else {\n const baseCountryForInit = hasConfiguredCountry ? fallbackCountry : undefined\n const normalized = normalizeInputValue(value, baseCountryForInit, { allowJustPlus: true })\n if (!normalized) {\n initialStateRef.current = {\n country: fallbackCountry,\n inputValue: \"\",\n normalizedValue: \"\",\n hasExplicitCountrySelection: false,\n }\n lastNormalizedRef.current = \"\"\n } else {\n const {\n international,\n phoneNumber,\n detectedCountry,\n inferredCountry,\n hasExplicitInternationalPrefix,\n } = formatWithAsYouType(normalized, baseCountryForInit)\n const canonicalDetectedCountry = detectedCountry ?? undefined\n let resolvedCountry = canonicalDetectedCountry ?? fallbackCountry\n const rawDigits = sanitizeDigits(value ?? \"\")\n const hasExplicitPlus = typeof value === \"string\" ? /^\\s*\\+/.test(value) : false\n const internationalDigits = sanitizeDigits(international)\n const initialDialCode = getCountryCallingCode(resolvedCountry)\n const initialHasPrefix = detectNationalPrefixForDisplay(\n rawDigits,\n internationalDigits,\n initialDialCode,\n hasExplicitPlus\n )\n\n const suggestion = getSuggestionState(\n normalized,\n baseCountryForInit,\n phoneNumber ?? undefined,\n {\n hasRemovedNationalPrefix: initialHasPrefix,\n detectedCountry: canonicalDetectedCountry,\n hasExplicitInternationalPrefix,\n }\n )\n\n const inferredCountryToApply =\n !suggestion.shouldSuggest && !canonicalDetectedCountry ? inferredCountry : undefined\n\n\n if (inferredCountryToApply) {\n resolvedCountry = inferredCountryToApply\n }\n\n const resolvedFromValue =\n Boolean(canonicalDetectedCountry) || Boolean(inferredCountryToApply)\n if (resolvedFromValue) {\n hasResolvedCountryRef.current = true\n }\n\n const nextDialCode = getCountryCallingCode(resolvedCountry)\n const finalHasPrefix = inferredCountryToApply\n ? detectNationalPrefixForDisplay(\n rawDigits,\n internationalDigits,\n nextDialCode,\n hasExplicitPlus\n )\n : initialHasPrefix\n\n const displayValue = injectNationalPrefixDisplay(international, nextDialCode, {\n force: finalHasPrefix,\n })\n\n const displayDetectedCountry = canonicalDetectedCountry ?? undefined\n const allowInlineFlag = hasResolvedCountryRef.current\n initialStateRef.current = {\n country: resolvedCountry,\n inputValue: displayValue,\n normalizedValue: normalized,\n hasExplicitCountrySelection:\n allowInlineFlag &&\n shouldDisplayExplicitCountrySelection(suggestion, {\n detectedCountry: displayDetectedCountry,\n hasExplicitInternationalPrefix,\n }),\n }\n lastNormalizedRef.current = normalized\n }\n }\n }\n\n const initialState = initialStateRef.current\n\n const [uncontrolledCountry, setUncontrolledCountry] = React.useState(initialState.country)\n const [inputValueState, setInputValueState] = React.useState(initialState.inputValue)\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 [lengthIssue, setLengthIssue] = React.useState<LengthIssue | null>(null)\n const [hasExplicitCountrySelection, setHasExplicitCountrySelection] = React.useState(\n initialState.hasExplicitCountrySelection\n )\n const manualSelectionCountryRef = React.useRef<CountryCode | null>(null)\n\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 consumeScrollBehavior = React.useCallback(() => {\n const behavior = scrollBehaviorRef.current\n scrollBehaviorRef.current = \"smooth\"\n return behavior\n }, [])\n\n const isCountryControlled = typeof countryProp === \"string\"\n const selectedCountry = isCountryControlled ? countryProp : uncontrolledCountry\n const activeCountry = selectedCountry ?? fallbackCountry\n\n const inputRef = React.useRef<HTMLInputElement | null>(null)\n\n React.useImperativeHandle(forwardedRef, () => inputRef.current as HTMLInputElement, [])\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 {\n styles: userSelectStyles,\n components: userSelectComponents,\n classNamePrefix: userClassNamePrefix,\n formatOptionLabel: userFormatOptionLabel,\n ...forwardedSelectProps\n } = selectOverrides\n const { noOptionsMessage, ...restForwardedSelectProps } = forwardedSelectProps\n\n const mergedSelectStyles = React.useMemo<StylesConfig<CountryOption, false>>(\n () => ({\n ...suggestionSelectStyles,\n ...(userSelectStyles ?? {}),\n }),\n [userSelectStyles]\n )\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 const hasAnnouncedCountryRef = React.useRef(false)\n\n const notifyCountryChange = React.useCallback(\n (country: CountryCode) => {\n hasAnnouncedCountryRef.current = true\n const selection = resolveSelectedCountry(country)\n onCountryChange?.(country, selection)\n return selection\n },\n [onCountryChange, resolveSelectedCountry]\n )\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 baseCountryForSync = hasResolvedCountryRef.current ? activeCountry : undefined\n const previousNormalized = lastNormalizedRef.current\n const normalized = normalizeInputValue(value, baseCountryForSync, {\n allowJustPlus: true,\n previousValue: previousNormalized,\n })\n lastNormalizedRef.current = normalized\n keyboardBufferRef.current = \"\"\n\n if (!normalized) {\n setInputValueState(\"\")\n setShowSuggestions(false)\n setCountryQuery(\"\")\n setLengthIssue(null)\n manualSelectionCountryRef.current = null\n setHasExplicitCountrySelection(false)\n const nextCountry = hasConfiguredCountry ? fallbackCountry : activeCountry\n if (!isCountryControlled && uncontrolledCountry !== nextCountry) {\n setUncontrolledCountry(nextCountry)\n notifyCountryChange(nextCountry)\n }\n return\n }\n\n if (normalized === \"0\") {\n setInputValueState(\"0\")\n setShowSuggestions(false)\n setCountryQuery(\"\")\n setLengthIssue(null)\n manualSelectionCountryRef.current = null\n setHasExplicitCountrySelection(false)\n return\n }\n\n if (normalized === \"+\") {\n setInputValueState(\"+\")\n setShowSuggestions(true)\n setCountryQuery(\"\")\n setLengthIssue(null)\n manualSelectionCountryRef.current = null\n setHasExplicitCountrySelection(false)\n const nextCountry = hasConfiguredCountry ? fallbackCountry : activeCountry\n if (!isCountryControlled && uncontrolledCountry !== nextCountry) {\n setUncontrolledCountry(nextCountry)\n notifyCountryChange(nextCountry)\n }\n return\n }\n\n const {\n international,\n phoneNumber,\n detectedCountry,\n inferredCountry,\n hasExplicitInternationalPrefix,\n } = formatWithAsYouType(normalized, baseCountryForSync)\n const canonicalDetectedCountry = detectedCountry ?? undefined\n let nextCountry = canonicalDetectedCountry ?? baseCountryForSync ?? activeCountry\n const rawDigits = sanitizeDigits(value ?? \"\")\n const hasExplicitPlus = typeof value === \"string\" ? /^\\s*\\+/.test(value) : false\n const internationalDigits = sanitizeDigits(international)\n const initialDialCode = getCountryCallingCode(nextCountry)\n const initialHasTypedTrunk = detectNationalPrefixForDisplay(\n rawDigits,\n internationalDigits,\n initialDialCode,\n hasExplicitPlus\n )\n\n const suggestion = getSuggestionState(\n normalized,\n baseCountryForSync,\n phoneNumber ?? undefined,\n {\n hasRemovedNationalPrefix: initialHasTypedTrunk,\n detectedCountry: canonicalDetectedCountry,\n hasExplicitInternationalPrefix,\n }\n )\n\n const inferredCountryToApply =\n !suggestion.shouldSuggest && !canonicalDetectedCountry ? inferredCountry : undefined\n const finalCountry = inferredCountryToApply ?? nextCountry\n\n const resolvedFromValue =\n Boolean(canonicalDetectedCountry) || Boolean(inferredCountryToApply)\n if (resolvedFromValue) {\n hasResolvedCountryRef.current = true\n }\n\n if (!isCountryControlled && finalCountry !== uncontrolledCountry) {\n setUncontrolledCountry(finalCountry)\n notifyCountryChange(finalCountry)\n }\n\n nextCountry = finalCountry\n\n if (\n manualSelectionCountryRef.current &&\n manualSelectionCountryRef.current !== nextCountry\n ) {\n manualSelectionCountryRef.current = null\n }\n\n const nextDialCode = getCountryCallingCode(nextCountry)\n const hasTypedTrunk = inferredCountryToApply\n ? detectNationalPrefixForDisplay(\n rawDigits,\n internationalDigits,\n nextDialCode,\n hasExplicitPlus\n )\n : initialHasTypedTrunk\n\n const displayValue = injectNationalPrefixDisplay(international, nextDialCode, {\n force: hasTypedTrunk,\n })\n const displayDetectedCountry = canonicalDetectedCountry ?? undefined\n const manualSelectionActive = manualSelectionCountryRef.current != null\n const shouldShowInlineFlag =\n manualSelectionActive ||\n shouldDisplayExplicitCountrySelection(suggestion, {\n detectedCountry: displayDetectedCountry,\n hasExplicitInternationalPrefix,\n })\n\n setInputValueState(displayValue)\n setShowSuggestions(suggestion.shouldSuggest)\n setCountryQuery(suggestion.query)\n setLengthIssue(hasResolvedCountryRef.current ? getLengthIssue(normalized, nextCountry) : null)\n setHasExplicitCountrySelection(hasResolvedCountryRef.current && shouldShowInlineFlag)\n }, [\n value,\n activeCountry,\n fallbackCountry,\n hasConfiguredCountry,\n isCountryControlled,\n notifyCountryChange,\n uncontrolledCountry,\n ])\n\n React.useEffect(() => {\n if (hasAnnouncedCountryRef.current) {\n return\n }\n if (!hasResolvedCountryRef.current) {\n return\n }\n const current = selectedCountry ?? fallbackCountry\n if (!current) {\n return\n }\n notifyCountryChange(current)\n }, [fallbackCountry, notifyCountryChange, selectedCountry])\n\n React.useEffect(() => {\n if (isCountryControlled && countryProp && countryProp !== uncontrolledCountry) {\n setUncontrolledCountry(countryProp)\n }\n }, [countryProp, isCountryControlled, uncontrolledCountry])\n\n const emitChange = React.useCallback(\n (details: Omit<PhoneNumberChangeDetails, \"selectedCountry\">) => {\n const selection = resolveSelectedCountry(details.country)\n onChange?.({\n ...details,\n selectedCountry: selection,\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 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 baseCountryForInput = hasResolvedCountryRef.current ? activeCountry : undefined\n const dialCode = baseCountryForInput ? getCountryCallingCode(baseCountryForInput) : \"\"\n const typedDigits = sanitizeDigits(raw)\n const hasExplicitPlus = raw.trim().startsWith(\"+\")\n const startsWithDialCode = dialCode ? typedDigits.startsWith(dialCode) : false\n const hasLeadingZero = typedDigits.startsWith(\"0\")\n const isIddPrefix = COMMON_IDD_PREFIXES.some((prefix) => typedDigits.startsWith(prefix))\n\n const shouldRemoveNationalPrefix =\n Boolean(baseCountryForInput) &&\n !isIddPrefix &&\n ((startsWithDialCode && typedDigits.slice(dialCode.length).startsWith(\"0\")) ||\n (!hasExplicitPlus && hasLeadingZero && typedDigits.length > 1) ||\n (hasExplicitPlus && hasLeadingZero && typedDigits.length > 1 && !startsWithDialCode))\n\n const previousNormalized = lastNormalizedRef.current\n const normalized = normalizeInputValue(raw, baseCountryForInput, {\n allowJustPlus: true,\n removeNationalPrefix: shouldRemoveNationalPrefix,\n previousValue: previousNormalized,\n })\n lastNormalizedRef.current = normalized\n\n if (!normalized) {\n setInputValueState(\"\")\n setShowSuggestions(false)\n setCountryQuery(\"\")\n setHighlightedIndex(-1)\n setLengthIssue(null)\n manualSelectionCountryRef.current = null\n setHasExplicitCountrySelection(false)\n pendingSelectionRef.current = resolveSelection(snapshot, \"\")\n\n const nextCountry = hasConfiguredCountry ? fallbackCountry : activeCountry\n\n if (!isCountryControlled && uncontrolledCountry !== nextCountry) {\n setUncontrolledCountry(nextCountry)\n notifyCountryChange(nextCountry)\n }\n\n const nextDialCode = getCountryCallingCode(nextCountry)\n emitChange({\n formattedInternational: \"\",\n formattedNational: \"\",\n e164: null,\n country: nextCountry,\n countryCallingCode: nextDialCode,\n nationalNumber: \"\",\n rawInput: \"\",\n isValid: false,\n })\n return\n }\n\n if (normalized === \"0\") {\n setInputValueState(\"0\")\n setShowSuggestions(false)\n setCountryQuery(\"\")\n setHighlightedIndex(-1)\n setLengthIssue(null)\n manualSelectionCountryRef.current = null\n setHasExplicitCountrySelection(false)\n pendingSelectionRef.current = resolveSelection(snapshot, \"0\")\n\n const nextCountry = hasConfiguredCountry ? fallbackCountry : activeCountry\n\n if (!isCountryControlled && uncontrolledCountry !== nextCountry) {\n setUncontrolledCountry(nextCountry)\n notifyCountryChange(nextCountry)\n }\n\n const nextDialCode = getCountryCallingCode(nextCountry)\n emitChange({\n formattedInternational: \"0\",\n formattedNational: \"0\",\n e164: null,\n country: nextCountry,\n countryCallingCode: nextDialCode,\n nationalNumber: \"0\",\n rawInput: \"0\",\n isValid: false,\n })\n return\n }\n\n if (normalized === \"+\") {\n setInputValueState(\"+\")\n setShowSuggestions(true)\n setCountryQuery(\"\")\n setHighlightedIndex(0)\n setLengthIssue(null)\n manualSelectionCountryRef.current = null\n setHasExplicitCountrySelection(false)\n pendingSelectionRef.current = resolveSelection(snapshot, \"+\")\n\n const nextCountry = hasConfiguredCountry ? fallbackCountry : activeCountry\n\n if (!isCountryControlled && uncontrolledCountry !== nextCountry) {\n setUncontrolledCountry(nextCountry)\n notifyCountryChange(nextCountry)\n }\n\n const nextDialCode = getCountryCallingCode(nextCountry)\n emitChange({\n formattedInternational: \"+\",\n formattedNational: \"\",\n e164: null,\n country: nextCountry,\n countryCallingCode: nextDialCode,\n nationalNumber: \"\",\n rawInput: \"+\",\n isValid: false,\n })\n return\n }\n\n const {\n international,\n national,\n phoneNumber,\n detectedCountry,\n inferredCountry,\n hasExplicitInternationalPrefix,\n } = formatWithAsYouType(normalized, baseCountryForInput)\n const canonicalDetectedCountry = detectedCountry ?? undefined\n let nextCountry = canonicalDetectedCountry ?? baseCountryForInput ?? activeCountry\n\n const internationalDigits = sanitizeDigits(international)\n const initialDialCode = getCountryCallingCode(nextCountry)\n const initialHasTypedTrunk = detectNationalPrefixForDisplay(\n typedDigits,\n internationalDigits,\n initialDialCode,\n hasExplicitPlus\n )\n\n const suggestion = getSuggestionState(\n normalized,\n baseCountryForInput,\n phoneNumber ?? undefined,\n {\n hasRemovedNationalPrefix: initialHasTypedTrunk,\n detectedCountry: canonicalDetectedCountry,\n hasExplicitInternationalPrefix,\n }\n )\n\n const inferredCountryToApply =\n !suggestion.shouldSuggest && !canonicalDetectedCountry ? inferredCountry : undefined\n const finalCountry = inferredCountryToApply ?? nextCountry\n\n const resolvedFromInput =\n Boolean(canonicalDetectedCountry) || Boolean(inferredCountryToApply)\n if (resolvedFromInput) {\n hasResolvedCountryRef.current = true\n }\n\n if (!isCountryControlled && finalCountry !== uncontrolledCountry) {\n setUncontrolledCountry(finalCountry)\n notifyCountryChange(finalCountry)\n }\n\n nextCountry = finalCountry\n\n if (\n manualSelectionCountryRef.current &&\n manualSelectionCountryRef.current !== nextCountry\n ) {\n manualSelectionCountryRef.current = null\n }\n\n const nextDialCode = getCountryCallingCode(nextCountry)\n const normalizedDigits = sanitizeDigits(normalized)\n const nationalDigits = stripPrefix(normalizedDigits, nextDialCode)\n const hasTypedTrunk = inferredCountryToApply\n ? detectNationalPrefixForDisplay(\n typedDigits,\n internationalDigits,\n nextDialCode,\n hasExplicitPlus\n )\n : initialHasTypedTrunk\n\n const displayValue = injectNationalPrefixDisplay(international, nextDialCode, {\n force: hasTypedTrunk,\n })\n\n const displayDetectedCountry = canonicalDetectedCountry ?? undefined\n\n pendingSelectionRef.current = resolveSelection(snapshot, displayValue)\n setInputValueState(displayValue)\n setShowSuggestions(suggestion.shouldSuggest)\n setCountryQuery(suggestion.query)\n setHighlightedIndex(suggestion.shouldSuggest ? 0 : -1)\n setLengthIssue(hasResolvedCountryRef.current ? getLengthIssue(normalized, nextCountry) : null)\n const manualSelectionActive = manualSelectionCountryRef.current != null\n const shouldShowInlineFlag =\n manualSelectionActive ||\n shouldDisplayExplicitCountrySelection(suggestion, {\n detectedCountry: displayDetectedCountry,\n hasExplicitInternationalPrefix,\n })\n setHasExplicitCountrySelection(hasResolvedCountryRef.current && shouldShowInlineFlag)\n emitChange({\n formattedInternational: international,\n formattedNational: national,\n e164: phoneNumber?.number ?? null,\n country: nextCountry,\n countryCallingCode: nextDialCode,\n nationalNumber: nationalDigits,\n rawInput: normalized,\n isValid: phoneNumber?.isValid() ?? false,\n })\n },\n [\n activeCountry,\n emitChange,\n fallbackCountry,\n hasConfiguredCountry,\n isCountryControlled,\n notifyCountryChange,\n uncontrolledCountry,\n ]\n )\n\n const handleCountrySelect = React.useCallback(\n (option: SingleValue<CountryOption>) => {\n if (!option) {\n return\n }\n\n const previousDigits = sanitizeDigits(lastNormalizedRef.current || inputValueState)\n const currentDial = getCountryCallingCode(activeCountry)\n const digitsWithoutCurrentDial = previousDigits.startsWith(currentDial)\n ? previousDigits.slice(currentDial.length)\n : previousDigits\n let rebasedDigits = digitsWithoutCurrentDial\n if (!rebasedDigits) {\n rebasedDigits = option.dialCode\n } else if (!rebasedDigits.startsWith(option.dialCode)) {\n rebasedDigits = `${option.dialCode}${rebasedDigits}`\n }\n const normalized = `+${rebasedDigits}`\n lastNormalizedRef.current = normalized\n const { international, national, phoneNumber } = formatWithAsYouType(\n normalized,\n option.value\n )\n const nextCountry = option.value\n manualSelectionCountryRef.current = nextCountry\n hasResolvedCountryRef.current = true\n\n setInputValueState(international)\n pendingSelectionRef.current = {\n start: international.length,\n end: international.length,\n }\n setShowSuggestions(false)\n setCountryQuery(\"\")\n setHighlightedIndex(-1)\n setLengthIssue(getLengthIssue(normalized, nextCountry))\n\n if (!isCountryControlled && nextCountry !== uncontrolledCountry) {\n setUncontrolledCountry(nextCountry)\n }\n\n notifyCountryChange(nextCountry)\n\n const normalizedDigits = sanitizeDigits(normalized)\n const dialCode = phoneNumber?.countryCallingCode ?? option.dialCode\n const nationalDigits = stripPrefix(normalizedDigits, dialCode)\n setHasExplicitCountrySelection(true)\n emitChange({\n formattedInternational: international,\n formattedNational: national,\n e164: phoneNumber?.number ?? null,\n country: nextCountry,\n countryCallingCode: dialCode,\n nationalNumber: nationalDigits,\n rawInput: normalized,\n isValid: phoneNumber?.isValid() ?? false,\n })\n\n requestAnimationFrame(() => {\n inputRef.current?.focus()\n })\n },\n [activeCountry, emitChange, inputValueState, isCountryControlled, notifyCountryChange, uncontrolledCountry]\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) => {\n if (!results.some((existing) => existing.value === option.value)) {\n results.push(option)\n }\n }\n\n const fallbackOption = countryOptions.find((option) => option.value === fallbackCountry)\n const currentOption = countryOptions.find((option) => option.value === activeCountry)\n const query = countryQuery.trim()\n const digitQuery = sanitizeDigits(query)\n const normalizedQuery = normalizeSearchValue(query)\n\n if (!digitQuery && !normalizedQuery) {\n if (fallbackOption) {\n pushUnique(fallbackOption)\n }\n if (currentOption) {\n pushUnique(currentOption)\n }\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 if (currentOption) {\n pushUnique(currentOption)\n }\n if (fallbackOption) {\n pushUnique(fallbackOption)\n }\n if (results.length === 0) {\n countryOptions.forEach(pushUnique)\n }\n\n return results\n }, [activeCountry, countryOptions, countryQuery, fallbackCountry, 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 React.useEffect(() => {\n if (highlightedIndex < 0) {\n scrollBehaviorRef.current = \"smooth\"\n }\n }, [highlightedIndex])\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 = countryOptions.find((option) => option.value === activeCountry)\n const activeFlag = activeOption?.flag ?? \"\"\n const inlineFlagLabel = hasExplicitCountrySelection\n ? resolvedMessages.selectedCountryLabel(activeOption?.name ?? activeCountry ?? null)\n : resolvedMessages.selectCountryLabel\n const hasInlineFlag = hasExplicitCountrySelection && Boolean(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 target = highlightedOption ?? filteredOptions[0]\n handleCountrySelect(target)\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 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 <SuggestionContext.Provider value={highlightContextValue}>\n <Select<CountryOption, false>\n {...restForwardedSelectProps}\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 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 </div>\n\n {validationNode}\n </div>\n )\n }\n)\n\nPhoneNumberInput.displayName = \"PhoneNumberInput\"\n"],"mappings":";;;;;;;;;;;AAoEA,IAAa+C,KAAmB/C,EAAMgD,WACpC,SAA0BE,IAAOC,IAAc;CAC7C,IAAM,EACJC,UACAC,mBACAC,SAASC,GACTC,YACAC,cACAC,qBACAC,eACAC,oBACAC,cACAC,cACAC,iBACAC,sBACAC,UAAUC,IACVC,6BACA,GAAGC,OACDlB,IAEE,EACJmB,SAASC,IACTC,QAAQC,IACRC,WAAWC,IACXC,MAAMC,IACNC,cAAcC,IACd,GAAGC,OACDX,IAEEY,IACJ,OAAO3B,KAAmB,YAAY,OAAOE,KAAgB,UAEzD0B,KAAiB/D,EAAkBsC,GAAO,EAC1C0B,KAAiBlF,EAAMmF,cACrB7D,EAAoB2D,GAAe,EACzC,CAACA,GACH,CAAC,EACKG,KAAmBpF,EAAMmF,cACvBtE,EAAgBqE,IAAgBhB,GAAa,EACnD,CAACgB,IAAgBhB,GACnB,CAAC,EACKmB,IAAiBrF,EAAMmF,cACrBlE,EAAwBiE,IAAgBD,GAAe,EAC7D,CAACA,IAAgBC,GACnB,CAAC,EACKI,KAAyBtF,EAAMuF,aAClCjC,MAAqD;EACpD,IAAMkC,IAAQH,EAAeI,MAAMC,MAAcA,EAAUtC,UAAUE,EAAQ;AAI7E,SAHIkC,IACKjE,EAAkBiE,EAAM,GAE1BxE,EAA6BsC,EAAQ;IAE9C,CAAC+B,EACH,CAAC,EACKM,IAAkB3F,EAAMmF,cAAc;EAC1C,IAAMO,IAAYvE,EAAgBkC,KAAkBE,KAAAA,KAA+B;AAInF,SAHI8B,EAAeO,MAAMC,MAAWA,EAAOzC,UAAUsC,EAAU,GACtDA,IAEFL,EAAe,IAAIjC,SAAAA;IACzB;EAACiC;EAAgB9B;EAAaF;EAAe,CAAC,EAE3CyC,IAAwB9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Y6F;MACZ,SAASxB;MACT,OAAO;MACP,YAAYnE;MACZ,QAAQD;MACR,aAAa;MACb,cAAc;MACd,uBAAuB;MACvB,iBAAiB;MACjB,0BAA0B;MAC1B,UAAU6D;MACV,iBAAiBnE,MAAuB;MACxC,aAAY;MACZ,mBAAmBuG;MACnB,kBACAnG,aAA2B7F,GAAiBmP;MAC7C,CAAA;KAEuB,CAAA;IACzB,CAAA;GAEF/B;GACG;;EAGX;AAEDzP,GAAiByR,cAAc"}
1
+ {"version":3,"file":"index302.js","sources":["../../../node_modules/date-fns/startOfWeekYear.js"],"sourcesContent":["import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { constructFrom } from \"./constructFrom.js\";\nimport { getWeekYear } from \"./getWeekYear.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\n\n/**\n * The {@link startOfWeekYear} function options.\n */\n\n/**\n * @name startOfWeekYear\n * @category Week-Numbering Year Helpers\n * @summary Return the start of a local week-numbering year for the given date.\n *\n * @description\n * Return the start of a local week-numbering year.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\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.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of a week-numbering year\n *\n * @example\n * // The start of an a week-numbering year for 2 July 2005 with default settings:\n * const result = startOfWeekYear(new Date(2005, 6, 2))\n * //=> Sun Dec 26 2004 00:00:00\n *\n * @example\n * // The start of a week-numbering year for 2 July 2005\n * // if Monday is the first day of week\n * // and 4 January is always in the first week of the year:\n * const result = startOfWeekYear(new Date(2005, 6, 2), {\n * weekStartsOn: 1,\n * firstWeekContainsDate: 4\n * })\n * //=> Mon Jan 03 2005 00:00:00\n */\nexport function startOfWeekYear(date, options) {\n const defaultOptions = getDefaultOptions();\n const firstWeekContainsDate =\n options?.firstWeekContainsDate ??\n options?.locale?.options?.firstWeekContainsDate ??\n defaultOptions.firstWeekContainsDate ??\n defaultOptions.locale?.options?.firstWeekContainsDate ??\n 1;\n\n const year = getWeekYear(date, options);\n const firstWeek = constructFrom(options?.in || date, 0);\n firstWeek.setFullYear(year, 0, firstWeekContainsDate);\n firstWeek.setHours(0, 0, 0, 0);\n const _date = startOfWeek(firstWeek, options);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfWeekYear;\n"],"names":["startOfWeekYear","date","options","defaultOptions","getDefaultOptions","firstWeekContainsDate","year","getWeekYear","firstWeek","constructFrom","startOfWeek"],"mappings":";;;;AA8CO,SAASA,EAAgBC,GAAMC,GAAS;AAC7C,QAAMC,IAAiBC,EAAiB,GAClCC,IACJH,GAAS,yBACTA,GAAS,QAAQ,SAAS,yBAC1BC,EAAe,yBACfA,EAAe,QAAQ,SAAS,yBAChC,GAEIG,IAAOC,EAAYN,GAAMC,CAAO,GAChCM,IAAYC,EAAcP,GAAS,MAAMD,GAAM,CAAC;AACtD,SAAAO,EAAU,YAAYF,GAAM,GAAGD,CAAqB,GACpDG,EAAU,SAAS,GAAG,GAAG,GAAG,CAAC,GACfE,EAAYF,GAAWN,CAAO;AAE9C;","x_google_ignoreList":[0]}
package/dist/index303.js CHANGED
@@ -1,66 +1,16 @@
1
- import e from "./index10.js";
2
- import { c as t } from "react/compiler-runtime";
3
- import { useEffect as n, useRef as r, useState as i } from "react";
4
- import { jsx as a, jsxs as o } from "react/jsx-runtime";
5
- import { Link as s } from "react-router";
6
- //#region src/components/header/MenuPopover/index.tsx
7
- var c = (c) => {
8
- let l = t(18), { href: u, labelClassName: d, labelActiveClassName: f, labelElement: p, isActive: m, children: h } = c, [g, _] = i(!1), v = r(null), y = r(null), b;
9
- l[0] === Symbol.for("react.memo_cache_sentinel") ? (b = () => {
10
- v.current && clearTimeout(v.current), _(!0);
11
- }, l[0] = b) : b = l[0];
12
- let x = b, S;
13
- l[1] === Symbol.for("react.memo_cache_sentinel") ? (S = () => {
14
- v.current = setTimeout(() => {
15
- _(!1);
16
- }, 120);
17
- }, l[1] = S) : S = l[1];
18
- let C = S, w, T;
19
- l[2] === Symbol.for("react.memo_cache_sentinel") ? (w = () => () => {
20
- v.current && clearTimeout(v.current);
21
- }, T = [], l[2] = w, l[3] = T) : (w = l[2], T = l[3]), n(w, T);
22
- let E;
23
- l[4] === Symbol.for("react.memo_cache_sentinel") ? (E = () => {
24
- _(!1);
25
- }, l[4] = E) : E = l[4];
26
- let D = g || m ? f : "border-transparent", O;
27
- l[5] !== d || l[6] !== D ? (O = e("relative z-10 -mb-px flex items-center border-b-2 pt-px text-sm font-medium text-gray-700 cursor-pointer transition-colors duration-200 ease-out hover:text-gray-800", d, D), l[5] = d, l[6] = D, l[7] = O) : O = l[7];
28
- let k;
29
- l[8] !== u || l[9] !== p || l[10] !== O ? (k = /* @__PURE__ */ a("div", {
30
- className: "relative flex",
31
- children: /* @__PURE__ */ a(s, {
32
- to: u,
33
- onClick: E,
34
- className: O,
35
- children: p
36
- })
37
- }), l[8] = u, l[9] = p, l[10] = O, l[11] = k) : k = l[11];
38
- let A;
39
- l[12] !== h || l[13] !== g ? (A = g && /* @__PURE__ */ o("div", {
40
- className: "absolute left-0 right-0 top-full z-20 text-gray-500 sm:text-sm",
41
- style: {
42
- width: "100vw",
43
- left: "50%",
44
- transform: "translateX(-50%)"
45
- },
46
- children: [/* @__PURE__ */ a("div", {
47
- "aria-hidden": "true",
48
- className: "absolute inset-0 top-1/2 bg-white shadow-sm"
49
- }), /* @__PURE__ */ a("div", {
50
- className: "relative bg-white",
51
- children: h({ setIsOpen: _ })
52
- })]
53
- }), l[12] = h, l[13] = g, l[14] = A) : A = l[14];
54
- let j;
55
- return l[15] !== k || l[16] !== A ? (j = /* @__PURE__ */ o("div", {
56
- className: "flex",
57
- ref: y,
58
- onMouseEnter: x,
59
- onMouseLeave: C,
60
- children: [k, A]
61
- }), l[15] = k, l[16] = A, l[17] = j) : j = l[17], j;
1
+ import { getDefaultOptions as k } from "./index293.js";
2
+ import { constructFrom as f } from "./index287.js";
3
+ import { startOfWeek as l } from "./index249.js";
4
+ import { toDate as m } from "./index288.js";
5
+ function C(r, e) {
6
+ const s = m(r, e?.in), t = s.getFullYear(), o = k(), i = e?.firstWeekContainsDate ?? e?.locale?.options?.firstWeekContainsDate ?? o.firstWeekContainsDate ?? o.locale?.options?.firstWeekContainsDate ?? 1, a = f(e?.in || r, 0);
7
+ a.setFullYear(t + 1, 0, i), a.setHours(0, 0, 0, 0);
8
+ const c = l(a, e), n = f(e?.in || r, 0);
9
+ n.setFullYear(t, 0, i), n.setHours(0, 0, 0, 0);
10
+ const u = l(n, e);
11
+ return +s >= +c ? t + 1 : +s >= +u ? t : t - 1;
12
+ }
13
+ export {
14
+ C as getWeekYear
62
15
  };
63
- //#endregion
64
- export { c as MenuPopover };
65
-
66
- //# sourceMappingURL=index303.js.map
16
+ //# sourceMappingURL=index303.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index303.js","names":["clsx","ReactNode","useState","useRef","useEffect","Link","MenuPopover","t0","$","_c","href","labelClassName","labelActiveClassName","labelElement","isActive","children","isOpen","setIsOpen","timeoutRef","popoverRef","t1","Symbol","for","current","clearTimeout","handleMouseEnter","t2","setTimeout","handleMouseLeave","t3","t4","t5","t6","t7","t8","t9","width","left","transform","t10"],"sources":["../src/components/header/MenuPopover/index.tsx"],"sourcesContent":["import clsx from \"clsx\"\nimport { ReactNode, useState, useRef, useEffect } from \"react\"\nimport { Link } from \"react-router\"\n\n\nexport const MenuPopover = ({\n href,\n labelClassName,\n labelActiveClassName,\n labelElement,\n isActive,\n children,\n}: {\n href: string;\n labelClassName: string;\n labelActiveClassName: string;\n labelElement: ReactNode;\n isActive: boolean;\n children: (props: { setIsOpen: (isOpen: boolean) => void }) => ReactNode\n}) => {\n const [isOpen, setIsOpen] = useState(false)\n const timeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null)\n const popoverRef = useRef(null)\n\n const handleMouseEnter = () => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current)\n }\n setIsOpen(true)\n }\n\n const handleMouseLeave = () => {\n timeoutRef.current = setTimeout(() => {\n setIsOpen(false)\n }, 120)\n }\n\n useEffect(() => {\n return () => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current)\n }\n }\n }, [])\n\n return (\n <div\n className=\"flex\"\n ref={popoverRef}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n >\n <div className=\"relative flex\">\n <Link\n to={href}\n onClick={() => {\n setIsOpen(false)\n }}\n className={clsx(\n \"relative z-10 -mb-px flex items-center border-b-2 pt-px text-sm font-medium text-gray-700 cursor-pointer transition-colors duration-200 ease-out hover:text-gray-800\",\n labelClassName,\n isOpen || isActive ? labelActiveClassName : \"border-transparent\",\n )}\n >\n {labelElement}\n </Link>\n </div>\n\n {isOpen && (\n <div\n className=\"absolute left-0 right-0 top-full z-20 text-gray-500 sm:text-sm\"\n style={{ width: \"100vw\", left: \"50%\", transform: \"translateX(-50%)\" }}\n >\n <div\n aria-hidden=\"true\"\n className=\"absolute inset-0 top-1/2 bg-white shadow-sm\"\n />\n\n <div className=\"relative bg-white\">\n {children({ setIsOpen })}\n </div>\n </div>\n )}\n </div>\n )\n}\n"],"mappings":";;;;;;AAKA,IAAaM,KAAcC,MAAA;CAAA,IAAAC,IAAAC,EAAA,GAAA,EAAC,EAAAC,SAAAC,mBAAAC,yBAAAC,iBAAAC,aAAAC,gBAAAR,GAe1B,CAAAS,GAAAC,KAA4Bf,EAAS,GAAM,EAC3CgB,IAAmBf,EAA6C,KAAK,EACrEgB,IAAmBhB,EAAO,KAAK,EAAAiB;AAAA,CAAAZ,EAAA,OAAAa,OAAAC,IAAA,4BAAA,IAENF,UAAA;AAIvBH,EAHIC,EAAUK,WACZC,aAAaN,EAAUK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AAA;CAAA,IAAA2B;AAAA,CAAA3B,EAAA,QAAAO,KAAAP,EAAA,QAAAQ,KAELmB,IAAAnB,KACC,kBAAA,OAAA;EACY,WAAA;EACH,OAAA;GAAAoB,OAAS;GAAOC,MAAQ;GAAKC,WAAa;GAAmB;YAFtE,CAIE,kBAAA,OAAA;GACc,eAAA;GACF,WAAA;GAGZ,CAAA,EAAA,kBAAA,OAAA;GAAe,WAAA;aACZvB,EAAS,EAAAE,cAAa,CAAA;GAE3B,CAAA,CACD;KAAAT,EAAA,MAAAO,GAAAP,EAAA,MAAAQ,GAAAR,EAAA,MAAA2B,KAAAA,IAAA3B,EAAA;CAAA,IAAA+B;AACG,QADH/B,EAAA,QAAA0B,KAAA1B,EAAA,QAAA2B,KApCHI,IAAA,kBAAA,OAAA;EACY,WAAA;EACLpB,KAAAA;EACSM,cAAAA;EACAG,cAAAA;YAJhB,CAMEM,GAgBCC,EAeG;KAAA3B,EAAA,MAAA0B,GAAA1B,EAAA,MAAA2B,GAAA3B,EAAA,MAAA+B,KAAAA,IAAA/B,EAAA,KArCN+B"}
1
+ {"version":3,"file":"index303.js","sources":["../../../node_modules/date-fns/getWeekYear.js"],"sourcesContent":["import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { constructFrom } from \"./constructFrom.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getWeekYear} function options.\n */\n\n/**\n * @name getWeekYear\n * @category Week-Numbering Year Helpers\n * @summary Get the local week-numbering year of the given date.\n *\n * @description\n * Get the local week-numbering year of the given date.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @param date - The given date\n * @param options - An object with options.\n *\n * @returns The local week-numbering year\n *\n * @example\n * // Which week numbering year is 26 December 2004 with the default settings?\n * const result = getWeekYear(new Date(2004, 11, 26))\n * //=> 2005\n *\n * @example\n * // Which week numbering year is 26 December 2004 if week starts on Saturday?\n * const result = getWeekYear(new Date(2004, 11, 26), { weekStartsOn: 6 })\n * //=> 2004\n *\n * @example\n * // Which week numbering year is 26 December 2004 if the first week contains 4 January?\n * const result = getWeekYear(new Date(2004, 11, 26), { firstWeekContainsDate: 4 })\n * //=> 2004\n */\nexport function getWeekYear(date, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n\n const defaultOptions = getDefaultOptions();\n const firstWeekContainsDate =\n options?.firstWeekContainsDate ??\n options?.locale?.options?.firstWeekContainsDate ??\n defaultOptions.firstWeekContainsDate ??\n defaultOptions.locale?.options?.firstWeekContainsDate ??\n 1;\n\n const firstWeekOfNextYear = constructFrom(options?.in || date, 0);\n firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate);\n firstWeekOfNextYear.setHours(0, 0, 0, 0);\n const startOfNextYear = startOfWeek(firstWeekOfNextYear, options);\n\n const firstWeekOfThisYear = constructFrom(options?.in || date, 0);\n firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate);\n firstWeekOfThisYear.setHours(0, 0, 0, 0);\n const startOfThisYear = startOfWeek(firstWeekOfThisYear, options);\n\n if (+_date >= +startOfNextYear) {\n return year + 1;\n } else if (+_date >= +startOfThisYear) {\n return year;\n } else {\n return year - 1;\n }\n}\n\n// Fallback for modularized imports:\nexport default getWeekYear;\n"],"names":["getWeekYear","date","options","_date","toDate","year","defaultOptions","getDefaultOptions","firstWeekContainsDate","firstWeekOfNextYear","constructFrom","startOfNextYear","startOfWeek","firstWeekOfThisYear","startOfThisYear"],"mappings":";;;;AA2CO,SAASA,EAAYC,GAAMC,GAAS;AACzC,QAAMC,IAAQC,EAAOH,GAAMC,GAAS,EAAE,GAChCG,IAAOF,EAAM,YAAW,GAExBG,IAAiBC,EAAiB,GAClCC,IACJN,GAAS,yBACTA,GAAS,QAAQ,SAAS,yBAC1BI,EAAe,yBACfA,EAAe,QAAQ,SAAS,yBAChC,GAEIG,IAAsBC,EAAcR,GAAS,MAAMD,GAAM,CAAC;AAChE,EAAAQ,EAAoB,YAAYJ,IAAO,GAAG,GAAGG,CAAqB,GAClEC,EAAoB,SAAS,GAAG,GAAG,GAAG,CAAC;AACvC,QAAME,IAAkBC,EAAYH,GAAqBP,CAAO,GAE1DW,IAAsBH,EAAcR,GAAS,MAAMD,GAAM,CAAC;AAChE,EAAAY,EAAoB,YAAYR,GAAM,GAAGG,CAAqB,GAC9DK,EAAoB,SAAS,GAAG,GAAG,GAAG,CAAC;AACvC,QAAMC,IAAkBF,EAAYC,GAAqBX,CAAO;AAEhE,SAAI,CAACC,KAAS,CAACQ,IACNN,IAAO,IACL,CAACF,KAAS,CAACW,IACbT,IAEAA,IAAO;AAElB;","x_google_ignoreList":[0]}
package/dist/index304.js CHANGED
@@ -1,7 +1,7 @@
1
- import { MenuPopover as e } from "./index303.js";
2
- //#region src/components/header/index.tsx
3
- var t = { MenuPopover: e };
4
- //#endregion
5
- export { t as Header };
6
-
7
- //# sourceMappingURL=index304.js.map
1
+ function i(n, t) {
2
+ return typeof n == "function" ? n(t) : n && (n.current = t), n;
3
+ }
4
+ export {
5
+ i as assignRef
6
+ };
7
+ //# sourceMappingURL=index304.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index304.js","names":["MenuPopover","Header"],"sources":["../src/components/header/index.tsx"],"sourcesContent":["import { MenuPopover } from \"./MenuPopover\"\n\n\nexport const Header = {\n MenuPopover\n}\n"],"mappings":";;AAGA,IAAaC,IAAS,EACpBD,gBACD"}
1
+ {"version":3,"file":"index304.js","sources":["../../../node_modules/use-callback-ref/dist/es2015/assignRef.js"],"sourcesContent":["/**\n * Assigns a value for a given ref, no matter of the ref format\n * @param {RefObject} ref - a callback function or ref object\n * @param value - a new value\n *\n * @see https://github.com/theKashey/use-callback-ref#assignref\n * @example\n * const refObject = useRef();\n * const refFn = (ref) => {....}\n *\n * assignRef(refObject, \"refValue\");\n * assignRef(refFn, \"refValue\");\n */\nexport function assignRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n }\n else if (ref) {\n ref.current = value;\n }\n return ref;\n}\n"],"names":["assignRef","ref","value"],"mappings":"AAaO,SAASA,EAAUC,GAAKC,GAAO;AAClC,SAAI,OAAOD,KAAQ,aACfA,EAAIC,CAAK,IAEJD,MACLA,EAAI,UAAUC,IAEXD;AACX;","x_google_ignoreList":[0]}
package/dist/index305.js CHANGED
@@ -1,31 +1,26 @@
1
- import { cn as e } from "./index12.js";
2
- import { c as t } from "react/compiler-runtime";
3
- import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
- import { Bell as i } from "lucide-react";
5
- //#region src/components/Notifications/NotificationsButton.tsx
6
- function a(a) {
7
- let o = t(12), { unseenCount: s, unreadCount: c, onClick: l, className: u } = a, d = Number.isFinite(s) ? s : c, f;
8
- o[0] === d ? f = o[1] : (f = Number.isFinite(d) ? Math.max(0, Math.floor(d ?? 0)) : 0, o[0] = d, o[1] = f);
9
- let p = f, m;
10
- o[2] === u ? m = o[3] : (m = e("relative inline-flex h-9 w-9 items-center justify-center rounded-md border bg-background text-foreground hover:bg-accent", u), o[2] = u, o[3] = m);
11
- let h = p > 0 ? `Notifications (${p} new)` : "Notifications", g;
12
- o[4] === Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ n(i, { className: "h-4 w-4" }), o[4] = g) : g = o[4];
13
- let _;
14
- o[5] === p ? _ = o[6] : (_ = p > 0 ? /* @__PURE__ */ n("span", {
15
- className: "absolute -right-1 -top-1 inline-flex min-w-4 items-center justify-center rounded-full bg-primary px-1 text-[10px] font-semibold leading-4 text-primary-foreground",
16
- "aria-hidden": "true",
17
- children: p > 99 ? "99+" : String(p)
18
- }) : null, o[5] = p, o[6] = _);
19
- let v;
20
- return o[7] !== l || o[8] !== m || o[9] !== h || o[10] !== _ ? (v = /* @__PURE__ */ r("button", {
21
- type: "button",
22
- onClick: l,
23
- className: m,
24
- "aria-label": h,
25
- children: [g, _]
26
- }), o[7] = l, o[8] = m, o[9] = h, o[10] = _, o[11] = v) : v = o[11], v;
1
+ import { useState as u } from "react";
2
+ function n(c, r) {
3
+ var e = u(function() {
4
+ return {
5
+ // value
6
+ value: c,
7
+ // last callback
8
+ callback: r,
9
+ // "memoized" public interface
10
+ facade: {
11
+ get current() {
12
+ return e.value;
13
+ },
14
+ set current(a) {
15
+ var t = e.value;
16
+ t !== a && (e.value = a, e.callback(a, t));
17
+ }
18
+ }
19
+ };
20
+ })[0];
21
+ return e.callback = r, e.facade;
27
22
  }
28
- //#endregion
29
- export { a as NotificationsButton };
30
-
31
- //# sourceMappingURL=index305.js.map
23
+ export {
24
+ n as useCallbackRef
25
+ };
26
+ //# sourceMappingURL=index305.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index305.js","names":["Bell","cn","NotificationsButton","t0","$","_c","unseenCount","unreadCount","onClick","className","rawCount","Number","isFinite","t1","Math","max","floor","count","t2","t3","t4","Symbol","for","t5","String","t6"],"sources":["../src/components/Notifications/NotificationsButton.tsx"],"sourcesContent":["import { Bell } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\n\nexport function NotificationsButton({\n unseenCount,\n unreadCount,\n onClick,\n className,\n}: {\n unseenCount?: number\n unreadCount?: number\n onClick?: () => void\n className?: string\n}) {\n const rawCount = Number.isFinite(unseenCount) ? unseenCount : unreadCount\n const count = Number.isFinite(rawCount) ? Math.max(0, Math.floor(rawCount ?? 0)) : 0\n\n return (\n <button\n type=\"button\"\n onClick={onClick}\n className={cn(\n \"relative inline-flex h-9 w-9 items-center justify-center rounded-md border bg-background text-foreground hover:bg-accent\",\n className,\n )}\n aria-label={count > 0 ? `Notifications (${count} new)` : \"Notifications\"}\n >\n <Bell className=\"h-4 w-4\" />\n {count > 0 ? (\n <span\n className=\"absolute -right-1 -top-1 inline-flex min-w-4 items-center justify-center rounded-full bg-primary px-1 text-[10px] font-semibold leading-4 text-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Pd,CASEC,GACCG,EAQM;KAAAnB,EAAA,KAAAI,GAAAJ,EAAA,KAAAc,GAAAd,EAAA,KAAAe,GAAAf,EAAA,MAAAmB,GAAAnB,EAAA,MAAAqB,KAAAA,IAAArB,EAAA,KAlBTqB"}
1
+ {"version":3,"file":"index305.js","sources":["../../../node_modules/use-callback-ref/dist/es2015/useRef.js"],"sourcesContent":["import { useState } from 'react';\n/**\n * creates a MutableRef with ref change callback\n * @param initialValue - initial ref value\n * @param {Function} callback - a callback to run when value changes\n *\n * @example\n * const ref = useCallbackRef(0, (newValue, oldValue) => console.log(oldValue, '->', newValue);\n * ref.current = 1;\n * // prints 0 -> 1\n *\n * @see https://reactjs.org/docs/hooks-reference.html#useref\n * @see https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref\n * @returns {MutableRefObject}\n */\nexport function useCallbackRef(initialValue, callback) {\n var ref = useState(function () { return ({\n // value\n value: initialValue,\n // last callback\n callback: callback,\n // \"memoized\" public interface\n facade: {\n get current() {\n return ref.value;\n },\n set current(value) {\n var last = ref.value;\n if (last !== value) {\n ref.value = value;\n ref.callback(value, last);\n }\n },\n },\n }); })[0];\n // update callback\n ref.callback = callback;\n return ref.facade;\n}\n"],"names":["useCallbackRef","initialValue","callback","ref","useState","value","last"],"mappings":";AAeO,SAASA,EAAeC,GAAcC,GAAU;AACnD,MAAIC,IAAMC,EAAS,WAAY;AAAE,WAAQ;AAAA;AAAA,MAErC,OAAOH;AAAA;AAAA,MAEP,UAAUC;AAAA;AAAA,MAEV,QAAQ;AAAA,QACJ,IAAI,UAAU;AACV,iBAAOC,EAAI;AAAA,QACf;AAAA,QACA,IAAI,QAAQE,GAAO;AACf,cAAIC,IAAOH,EAAI;AACf,UAAIG,MAASD,MACTF,EAAI,QAAQE,GACZF,EAAI,SAASE,GAAOC,CAAI;AAAA,QAEhC;AAAA,MACZ;AAAA,IACA;AAAA,EAAQ,CAAC,EAAE,CAAC;AAER,SAAAH,EAAI,WAAWD,GACRC,EAAI;AACf;","x_google_ignoreList":[0]}
package/dist/index306.js CHANGED
@@ -1,69 +1,8 @@
1
- "use client";
2
- import { useComposedRefs as e } from "./index18.js";
3
- import { useLayoutEffect2 as t } from "./index204.js";
4
- import * as n from "react";
5
- //#region ../../node_modules/@radix-ui/react-presence/dist/index.mjs
6
- function r(e, t) {
7
- return n.useReducer((e, n) => t[e][n] ?? e, e);
1
+ function r(t, n) {
2
+ const o = t < 0 ? "-" : "", a = Math.abs(t).toString().padStart(n, "0");
3
+ return o + a;
8
4
  }
9
- var i = (t) => {
10
- let { present: r, children: i } = t, o = a(r), c = typeof i == "function" ? i({ present: o.isPresent }) : n.Children.only(i), l = e(o.ref, s(c));
11
- return typeof i == "function" || o.isPresent ? n.cloneElement(c, { ref: l }) : null;
5
+ export {
6
+ r as addLeadingZeros
12
7
  };
13
- i.displayName = "Presence";
14
- function a(e) {
15
- let [i, a] = n.useState(), s = n.useRef(null), c = n.useRef(e), l = n.useRef("none"), [u, d] = r(e ? "mounted" : "unmounted", {
16
- mounted: {
17
- UNMOUNT: "unmounted",
18
- ANIMATION_OUT: "unmountSuspended"
19
- },
20
- unmountSuspended: {
21
- MOUNT: "mounted",
22
- ANIMATION_END: "unmounted"
23
- },
24
- unmounted: { MOUNT: "mounted" }
25
- });
26
- return n.useEffect(() => {
27
- let e = o(s.current);
28
- l.current = u === "mounted" ? e : "none";
29
- }, [u]), t(() => {
30
- let t = s.current, n = c.current;
31
- if (n !== e) {
32
- let r = l.current, i = o(t);
33
- e ? d("MOUNT") : i === "none" || t?.display === "none" ? d("UNMOUNT") : d(n && r !== i ? "ANIMATION_OUT" : "UNMOUNT"), c.current = e;
34
- }
35
- }, [e, d]), t(() => {
36
- if (i) {
37
- let e, t = i.ownerDocument.defaultView ?? window, n = (n) => {
38
- let r = o(s.current).includes(CSS.escape(n.animationName));
39
- if (n.target === i && r && (d("ANIMATION_END"), !c.current)) {
40
- let n = i.style.animationFillMode;
41
- i.style.animationFillMode = "forwards", e = t.setTimeout(() => {
42
- i.style.animationFillMode === "forwards" && (i.style.animationFillMode = n);
43
- });
44
- }
45
- }, r = (e) => {
46
- e.target === i && (l.current = o(s.current));
47
- };
48
- return i.addEventListener("animationstart", r), i.addEventListener("animationcancel", n), i.addEventListener("animationend", n), () => {
49
- t.clearTimeout(e), i.removeEventListener("animationstart", r), i.removeEventListener("animationcancel", n), i.removeEventListener("animationend", n);
50
- };
51
- } else d("ANIMATION_END");
52
- }, [i, d]), {
53
- isPresent: ["mounted", "unmountSuspended"].includes(u),
54
- ref: n.useCallback((e) => {
55
- s.current = e ? getComputedStyle(e) : null, a(e);
56
- }, [])
57
- };
58
- }
59
- function o(e) {
60
- return e?.animationName || "none";
61
- }
62
- function s(e) {
63
- let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
64
- return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
65
- }
66
- //#endregion
67
- export { i as Presence };
68
-
69
- //# sourceMappingURL=index306.js.map
8
+ //# sourceMappingURL=index306.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index306.js","names":["React"],"sources":["../../../node_modules/@radix-ui/react-presence/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/presence.tsx\nimport * as React2 from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\n\n// src/use-state-machine.tsx\nimport * as React from \"react\";\nfunction useStateMachine(initialState, machine) {\n return React.useReducer((state, event) => {\n const nextState = machine[state][event];\n return nextState ?? state;\n }, initialState);\n}\n\n// src/presence.tsx\nvar Presence = (props) => {\n const { present, children } = props;\n const presence = usePresence(present);\n const child = typeof children === \"function\" ? children({ present: presence.isPresent }) : React2.Children.only(children);\n const ref = useComposedRefs(presence.ref, getElementRef(child));\n const forceMount = typeof children === \"function\";\n return forceMount || presence.isPresent ? React2.cloneElement(child, { ref }) : null;\n};\nPresence.displayName = \"Presence\";\nfunction usePresence(present) {\n const [node, setNode] = React2.useState();\n const stylesRef = React2.useRef(null);\n const prevPresentRef = React2.useRef(present);\n const prevAnimationNameRef = React2.useRef(\"none\");\n const initialState = present ? \"mounted\" : \"unmounted\";\n const [state, send] = useStateMachine(initialState, {\n mounted: {\n UNMOUNT: \"unmounted\",\n ANIMATION_OUT: \"unmountSuspended\"\n },\n unmountSuspended: {\n MOUNT: \"mounted\",\n ANIMATION_END: \"unmounted\"\n },\n unmounted: {\n MOUNT: \"mounted\"\n }\n });\n React2.useEffect(() => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n prevAnimationNameRef.current = state === \"mounted\" ? currentAnimationName : \"none\";\n }, [state]);\n useLayoutEffect(() => {\n const styles = stylesRef.current;\n const wasPresent = prevPresentRef.current;\n const hasPresentChanged = wasPresent !== present;\n if (hasPresentChanged) {\n const prevAnimationName = prevAnimationNameRef.current;\n const currentAnimationName = getAnimationName(styles);\n if (present) {\n send(\"MOUNT\");\n } else if (currentAnimationName === \"none\" || styles?.display === \"none\") {\n send(\"UNMOUNT\");\n } else {\n const isAnimating = prevAnimationName !== currentAnimationName;\n if (wasPresent && isAnimating) {\n send(\"ANIMATION_OUT\");\n } else {\n send(\"UNMOUNT\");\n }\n }\n prevPresentRef.current = present;\n }\n }, [present, send]);\n useLayoutEffect(() => {\n if (node) {\n let timeoutId;\n const ownerWindow = node.ownerDocument.defaultView ?? window;\n const handleAnimationEnd = (event) => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));\n if (event.target === node && isCurrentAnimation) {\n send(\"ANIMATION_END\");\n if (!prevPresentRef.current) {\n const currentFillMode = node.style.animationFillMode;\n node.style.animationFillMode = \"forwards\";\n timeoutId = ownerWindow.setTimeout(() => {\n if (node.style.animationFillMode === \"forwards\") {\n node.style.animationFillMode = currentFillMode;\n }\n });\n }\n }\n };\n const handleAnimationStart = (event) => {\n if (event.target === node) {\n prevAnimationNameRef.current = getAnimationName(stylesRef.current);\n }\n };\n node.addEventListener(\"animationstart\", handleAnimationStart);\n node.addEventListener(\"animationcancel\", handleAnimationEnd);\n node.addEventListener(\"animationend\", handleAnimationEnd);\n return () => {\n ownerWindow.clearTimeout(timeoutId);\n node.removeEventListener(\"animationstart\", handleAnimationStart);\n node.removeEventListener(\"animationcancel\", handleAnimationEnd);\n node.removeEventListener(\"animationend\", handleAnimationEnd);\n };\n } else {\n send(\"ANIMATION_END\");\n }\n }, [node, send]);\n return {\n isPresent: [\"mounted\", \"unmountSuspended\"].includes(state),\n ref: React2.useCallback((node2) => {\n stylesRef.current = node2 ? getComputedStyle(node2) : null;\n setNode(node2);\n }, [])\n };\n}\nfunction getAnimationName(styles) {\n return styles?.animationName || \"none\";\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nvar Root = Presence;\nexport {\n Presence,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"x_google_ignoreList":[0],"mappings":";;;;;AASA,SAAS,EAAgB,GAAc,GAAS;AAC9C,QAAOA,EAAM,YAAY,GAAO,MACZ,EAAQ,GAAO,MACb,GACnB,EAAa;;AAIlB,IAAI,KAAY,MAAU;CACxB,IAAM,EAAE,YAAS,gBAAa,GACxB,IAAW,EAAY,EAAQ,EAC/B,IAAQ,OAAO,KAAa,aAAa,EAAS,EAAE,SAAS,EAAS,WAAW,CAAC,GAAG,EAAO,SAAS,KAAK,EAAS,EACnH,IAAM,EAAgB,EAAS,KAAK,EAAc,EAAM,CAAC;A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K,MAAM,sBAAsB,eACnC,EAAK,MAAM,oBAAoB;OAEjC;;MAIF,KAAwB,MAAU;AACtC,IAAI,EAAM,WAAW,MACnB,EAAqB,UAAU,EAAiB,EAAU,QAAQ;;AAMtE,UAHA,EAAK,iBAAiB,kBAAkB,EAAqB,EAC7D,EAAK,iBAAiB,mBAAmB,EAAmB,EAC5D,EAAK,iBAAiB,gBAAgB,EAAmB,QAC5C;AAIX,IAHA,EAAY,aAAa,EAAU,EACnC,EAAK,oBAAoB,kBAAkB,EAAqB,EAChE,EAAK,oBAAoB,mBAAmB,EAAmB,EAC/D,EAAK,oBAAoB,gBAAgB,EAAmB;;QAG9D,GAAK,gBAAgB;IAEtB,CAAC,GAAM,EAAK,CAAC,EACT;EACL,WAAW,CAAC,WAAW,mBAAmB,CAAC,SAAS,EAAM;EAC1D,KAAK,EAAO,aAAa,MAAU;AAEjC,GADA,EAAU,UAAU,IAAQ,iBAAiB,EAAM,GAAG,MACtD,EAAQ,EAAM;KACb,EAAE,CAAC;EACP;;AAEH,SAAS,EAAiB,GAAQ;AAChC,QAAO,GAAQ,iBAAiB;;AAElC,SAAS,EAAc,GAAS;CAC9B,IAAI,IAAS,OAAO,yBAAyB,EAAQ,OAAO,MAAM,EAAE,KAChE,IAAU,KAAU,oBAAoB,KAAU,EAAO;AAS7D,QARI,IACK,EAAQ,OAEjB,IAAS,OAAO,yBAAyB,GAAS,MAAM,EAAE,KAC1D,IAAU,KAAU,oBAAoB,KAAU,EAAO,gBACrD,IACK,EAAQ,MAAM,MAEhB,EAAQ,MAAM,OAAO,EAAQ"}
1
+ {"version":3,"file":"index306.js","sources":["../../../node_modules/date-fns/_lib/addLeadingZeros.js"],"sourcesContent":["export function addLeadingZeros(number, targetLength) {\n const sign = number < 0 ? \"-\" : \"\";\n const output = Math.abs(number).toString().padStart(targetLength, \"0\");\n return sign + output;\n}\n"],"names":["addLeadingZeros","number","targetLength","sign","output"],"mappings":"AAAO,SAASA,EAAgBC,GAAQC,GAAc;AACpD,QAAMC,IAAOF,IAAS,IAAI,MAAM,IAC1BG,IAAS,KAAK,IAAIH,CAAM,EAAE,WAAW,SAASC,GAAc,GAAG;AACrE,SAAOC,IAAOC;AAChB;","x_google_ignoreList":[0]}