@rpcbase/ui 0.208.0 → 0.209.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 (581) hide show
  1. package/dist/index.js +13 -13
  2. package/dist/index100.js +3 -3
  3. package/dist/index100.js.map +1 -1
  4. package/dist/index101.js +9 -3
  5. package/dist/index101.js.map +1 -1
  6. package/dist/index102.js +4 -9
  7. package/dist/index102.js.map +1 -1
  8. package/dist/index103.js +9 -4
  9. package/dist/index103.js.map +1 -1
  10. package/dist/index104.js +18 -12
  11. package/dist/index104.js.map +1 -1
  12. package/dist/index105.js +25 -18
  13. package/dist/index105.js.map +1 -1
  14. package/dist/index106.js +5 -24
  15. package/dist/index106.js.map +1 -1
  16. package/dist/index107.js +2 -2
  17. package/dist/index107.js.map +1 -1
  18. package/dist/index108.js +4 -3
  19. package/dist/index108.js.map +1 -1
  20. package/dist/index109.js +3 -3
  21. package/dist/index109.js.map +1 -1
  22. package/dist/index110.js +3 -4
  23. package/dist/index110.js.map +1 -1
  24. package/dist/index111.js +3 -3
  25. package/dist/index111.js.map +1 -1
  26. package/dist/index112.js +8 -5
  27. package/dist/index112.js.map +1 -1
  28. package/dist/index113.js +7 -8
  29. package/dist/index113.js.map +1 -1
  30. package/dist/index114.js +34 -7
  31. package/dist/index114.js.map +1 -1
  32. package/dist/index115.js +7 -34
  33. package/dist/index115.js.map +1 -1
  34. package/dist/index116.js +5 -7
  35. package/dist/index116.js.map +1 -1
  36. package/dist/index117.js +7 -5
  37. package/dist/index117.js.map +1 -1
  38. package/dist/index118.js +9 -7
  39. package/dist/index118.js.map +1 -1
  40. package/dist/index119.js +3 -7
  41. package/dist/index119.js.map +1 -1
  42. package/dist/index120.js +4 -3
  43. package/dist/index120.js.map +1 -1
  44. package/dist/index121.js +3 -4
  45. package/dist/index121.js.map +1 -1
  46. package/dist/index122.js +3 -3
  47. package/dist/index122.js.map +1 -1
  48. package/dist/index123.js +4 -3
  49. package/dist/index123.js.map +1 -1
  50. package/dist/index124.js +3 -4
  51. package/dist/index124.js.map +1 -1
  52. package/dist/index125.js +3 -3
  53. package/dist/index125.js.map +1 -1
  54. package/dist/index126.js +7 -5
  55. package/dist/index126.js.map +1 -1
  56. package/dist/index127.js +57 -8
  57. package/dist/index127.js.map +1 -1
  58. package/dist/index128.js +7 -57
  59. package/dist/index128.js.map +1 -1
  60. package/dist/index129.js +19 -6
  61. package/dist/index129.js.map +1 -1
  62. package/dist/index130.js +19 -19
  63. package/dist/index130.js.map +1 -1
  64. package/dist/index131.js +34 -19
  65. package/dist/index131.js.map +1 -1
  66. package/dist/index132.js +5 -34
  67. package/dist/index132.js.map +1 -1
  68. package/dist/index133.js +8 -5
  69. package/dist/index133.js.map +1 -1
  70. package/dist/index134.js +13 -7
  71. package/dist/index134.js.map +1 -1
  72. package/dist/index135.js +10 -14
  73. package/dist/index135.js.map +1 -1
  74. package/dist/index136.js +6 -10
  75. package/dist/index136.js.map +1 -1
  76. package/dist/index137.js +4 -5
  77. package/dist/index137.js.map +1 -1
  78. package/dist/index138.js +5 -5
  79. package/dist/index138.js.map +1 -1
  80. package/dist/index139.js +5 -5
  81. package/dist/index139.js.map +1 -1
  82. package/dist/index140.js +5 -5
  83. package/dist/index140.js.map +1 -1
  84. package/dist/index141.js +4 -5
  85. package/dist/index141.js.map +1 -1
  86. package/dist/index142.js +6 -4
  87. package/dist/index142.js.map +1 -1
  88. package/dist/index143.js +21 -7
  89. package/dist/index143.js.map +1 -1
  90. package/dist/index144.js +9 -21
  91. package/dist/index144.js.map +1 -1
  92. package/dist/index145.js +7 -8
  93. package/dist/index145.js.map +1 -1
  94. package/dist/index146.js +5 -6
  95. package/dist/index146.js.map +1 -1
  96. package/dist/index147.js +6 -6
  97. package/dist/index147.js.map +1 -1
  98. package/dist/index148.js +4 -6
  99. package/dist/index148.js.map +1 -1
  100. package/dist/index149.js +4 -4
  101. package/dist/index149.js.map +1 -1
  102. package/dist/index150.js +5 -4
  103. package/dist/index150.js.map +1 -1
  104. package/dist/index151.js +4 -5
  105. package/dist/index151.js.map +1 -1
  106. package/dist/index152.js +5 -4
  107. package/dist/index152.js.map +1 -1
  108. package/dist/index153.js +4 -5
  109. package/dist/index153.js.map +1 -1
  110. package/dist/index154.js +4 -4
  111. package/dist/index154.js.map +1 -1
  112. package/dist/index155.js +3 -3
  113. package/dist/index155.js.map +1 -1
  114. package/dist/index156.js +29 -5
  115. package/dist/index156.js.map +1 -1
  116. package/dist/index157.js +33 -29
  117. package/dist/index157.js.map +1 -1
  118. package/dist/index158.js +15 -32
  119. package/dist/index158.js.map +1 -1
  120. package/dist/index159.js +10 -14
  121. package/dist/index159.js.map +1 -1
  122. package/dist/index160.js +9 -11
  123. package/dist/index160.js.map +1 -1
  124. package/dist/index161.js +16 -9
  125. package/dist/index161.js.map +1 -1
  126. package/dist/index162.js +86 -16
  127. package/dist/index162.js.map +1 -1
  128. package/dist/index163.js +47 -86
  129. package/dist/index163.js.map +1 -1
  130. package/dist/index164.js +16 -46
  131. package/dist/index164.js.map +1 -1
  132. package/dist/index165.js +8 -17
  133. package/dist/index165.js.map +1 -1
  134. package/dist/index166.js +10 -8
  135. package/dist/index166.js.map +1 -1
  136. package/dist/index167.js +4 -9
  137. package/dist/index167.js.map +1 -1
  138. package/dist/index168.js +22 -5
  139. package/dist/index168.js.map +1 -1
  140. package/dist/index169.js +7 -22
  141. package/dist/index169.js.map +1 -1
  142. package/dist/index170.js +6 -7
  143. package/dist/index170.js.map +1 -1
  144. package/dist/index171.js +4 -4
  145. package/dist/index171.js.map +1 -1
  146. package/dist/index172.js +4 -6
  147. package/dist/index172.js.map +1 -1
  148. package/dist/index173.js +6 -4
  149. package/dist/index173.js.map +1 -1
  150. package/dist/index174.js +67 -6
  151. package/dist/index174.js.map +1 -1
  152. package/dist/index175.js +17 -67
  153. package/dist/index175.js.map +1 -1
  154. package/dist/index176.js +12 -17
  155. package/dist/index176.js.map +1 -1
  156. package/dist/index177.js +9 -12
  157. package/dist/index177.js.map +1 -1
  158. package/dist/index178.js +20 -9
  159. package/dist/index178.js.map +1 -1
  160. package/dist/index179.js +14 -17
  161. package/dist/index179.js.map +1 -1
  162. package/dist/index180.js +54 -16
  163. package/dist/index180.js.map +1 -1
  164. package/dist/index181.js +9 -54
  165. package/dist/index181.js.map +1 -1
  166. package/dist/index182.js +6 -10
  167. package/dist/index182.js.map +1 -1
  168. package/dist/index183.js +26 -6
  169. package/dist/index183.js.map +1 -1
  170. package/dist/index184.js +26 -26
  171. package/dist/index184.js.map +1 -1
  172. package/dist/index185.js +10 -23
  173. package/dist/index185.js.map +1 -1
  174. package/dist/index186.js +13 -13
  175. package/dist/index186.js.map +1 -1
  176. package/dist/index187.js +6 -13
  177. package/dist/index187.js.map +1 -1
  178. package/dist/index188.js +23 -6
  179. package/dist/index188.js.map +1 -1
  180. package/dist/index189.js +385 -23
  181. package/dist/index189.js.map +1 -1
  182. package/dist/index190.js +487 -377
  183. package/dist/index190.js.map +1 -1
  184. package/dist/index191.js +122 -487
  185. package/dist/index191.js.map +1 -1
  186. package/dist/index192.js +53 -131
  187. package/dist/index192.js.map +1 -1
  188. package/dist/index193.js +76 -51
  189. package/dist/index193.js.map +1 -1
  190. package/dist/index194.js +897 -75
  191. package/dist/index194.js.map +1 -1
  192. package/dist/index195.js +19 -899
  193. package/dist/index195.js.map +1 -1
  194. package/dist/index196.js +446 -17
  195. package/dist/index196.js.map +1 -1
  196. package/dist/index197.js +4 -448
  197. package/dist/index197.js.map +1 -1
  198. package/dist/index198.js +57 -4
  199. package/dist/index198.js.map +1 -1
  200. package/dist/index199.js +56 -52
  201. package/dist/index199.js.map +1 -1
  202. package/dist/index200.js +55 -56
  203. package/dist/index200.js.map +1 -1
  204. package/dist/index201.js +8 -60
  205. package/dist/index201.js.map +1 -1
  206. package/dist/index202.js +15 -7
  207. package/dist/index202.js.map +1 -1
  208. package/dist/index203.js +143 -15
  209. package/dist/index203.js.map +1 -1
  210. package/dist/index204.js +4 -145
  211. package/dist/index204.js.map +1 -1
  212. package/dist/index205.js +11 -4
  213. package/dist/index205.js.map +1 -1
  214. package/dist/index206.js +104 -10
  215. package/dist/index206.js.map +1 -1
  216. package/dist/index207.js +347 -94
  217. package/dist/index207.js.map +1 -1
  218. package/dist/index208.js +87 -349
  219. package/dist/index208.js.map +1 -1
  220. package/dist/index209.js +304 -73
  221. package/dist/index209.js.map +1 -1
  222. package/dist/index210.js +193 -309
  223. package/dist/index210.js.map +1 -1
  224. package/dist/index211.js +19 -211
  225. package/dist/index211.js.map +1 -1
  226. package/dist/index212.js +27 -18
  227. package/dist/index212.js.map +1 -1
  228. package/dist/index213.js +187 -27
  229. package/dist/index213.js.map +1 -1
  230. package/dist/index214.js +16 -186
  231. package/dist/index214.js.map +1 -1
  232. package/dist/index215.js +62 -18
  233. package/dist/index215.js.map +1 -1
  234. package/dist/index216.js +40 -58
  235. package/dist/index216.js.map +1 -1
  236. package/dist/index217.js +9 -43
  237. package/dist/index217.js.map +1 -1
  238. package/dist/index218.js +25 -10
  239. package/dist/index218.js.map +1 -1
  240. package/dist/index219.js +45 -25
  241. package/dist/index219.js.map +1 -1
  242. package/dist/index220.js +17 -44
  243. package/dist/index220.js.map +1 -1
  244. package/dist/index221.js +3 -18
  245. package/dist/index221.js.map +1 -1
  246. package/dist/index222.js +5 -3
  247. package/dist/index222.js.map +1 -1
  248. package/dist/index223.js +20 -4
  249. package/dist/index223.js.map +1 -1
  250. package/dist/index224.js +24 -20
  251. package/dist/index224.js.map +1 -1
  252. package/dist/index225.js +66 -23
  253. package/dist/index225.js.map +1 -1
  254. package/dist/index226.js +14 -67
  255. package/dist/index226.js.map +1 -1
  256. package/dist/index227.js +4 -15
  257. package/dist/index227.js.map +1 -1
  258. package/dist/index228.js +51 -4
  259. package/dist/index228.js.map +1 -1
  260. package/dist/index229.js +5 -50
  261. package/dist/index229.js.map +1 -1
  262. package/dist/index230.js +26 -5
  263. package/dist/index230.js.map +1 -1
  264. package/dist/index231.js +11 -24
  265. package/dist/index231.js.map +1 -1
  266. package/dist/index232.js +8 -12
  267. package/dist/index232.js.map +1 -1
  268. package/dist/index233.js +3 -13
  269. package/dist/index234.js +29 -3
  270. package/dist/index234.js.map +1 -0
  271. package/dist/index235.js +68 -25
  272. package/dist/index235.js.map +1 -1
  273. package/dist/index236.js +2 -71
  274. package/dist/index237.js +15 -3
  275. package/dist/index237.js.map +1 -0
  276. package/dist/index238.js +51 -12
  277. package/dist/index238.js.map +1 -1
  278. package/dist/index239.js +114 -50
  279. package/dist/index239.js.map +1 -1
  280. package/dist/index24.js +9 -0
  281. package/dist/index24.js.map +1 -1
  282. package/dist/index240.js +6 -115
  283. package/dist/index240.js.map +1 -1
  284. package/dist/index241.js +13 -6
  285. package/dist/index241.js.map +1 -1
  286. package/dist/index242.js +687 -13
  287. package/dist/index242.js.map +1 -1
  288. package/dist/index243.js +234 -668
  289. package/dist/index243.js.map +1 -1
  290. package/dist/index244.js +670 -222
  291. package/dist/index244.js.map +1 -1
  292. package/dist/index245.js +7430 -700
  293. package/dist/index245.js.map +1 -1
  294. package/dist/index246.js +7 -7431
  295. package/dist/index246.js.map +1 -1
  296. package/dist/index247.js +12 -6
  297. package/dist/index247.js.map +1 -1
  298. package/dist/index248.js +5 -12
  299. package/dist/index248.js.map +1 -1
  300. package/dist/index249.js +459 -5
  301. package/dist/index249.js.map +1 -1
  302. package/dist/index25.js +20 -8
  303. package/dist/index25.js.map +1 -1
  304. package/dist/index250.js +32 -454
  305. package/dist/index250.js.map +1 -1
  306. package/dist/index251.js +18 -36
  307. package/dist/index251.js.map +1 -1
  308. package/dist/index252.js +25 -17
  309. package/dist/index252.js.map +1 -1
  310. package/dist/index253.js +4 -27
  311. package/dist/index253.js.map +1 -1
  312. package/dist/index254.js +58 -4
  313. package/dist/index254.js.map +1 -1
  314. package/dist/index255.js +7 -58
  315. package/dist/index255.js.map +1 -1
  316. package/dist/index256.js +12 -7
  317. package/dist/index256.js.map +1 -1
  318. package/dist/index257.js +3 -13
  319. package/dist/index257.js.map +1 -1
  320. package/dist/index258.js +17 -3
  321. package/dist/index258.js.map +1 -1
  322. package/dist/index259.js +23 -14
  323. package/dist/index259.js.map +1 -1
  324. package/dist/index26.js +56 -18
  325. package/dist/index26.js.map +1 -1
  326. package/dist/index260.js +41 -23
  327. package/dist/index260.js.map +1 -1
  328. package/dist/index261.js +13 -43
  329. package/dist/index261.js.map +1 -1
  330. package/dist/index262.js +25 -13
  331. package/dist/index262.js.map +1 -1
  332. package/dist/index263.js +16 -24
  333. package/dist/index263.js.map +1 -1
  334. package/dist/index264.js +33 -15
  335. package/dist/index264.js.map +1 -1
  336. package/dist/index265.js +5 -35
  337. package/dist/index265.js.map +1 -1
  338. package/dist/index266.js +9 -5
  339. package/dist/index266.js.map +1 -1
  340. package/dist/index267.js +7 -8
  341. package/dist/index267.js.map +1 -1
  342. package/dist/index268.js +9 -8
  343. package/dist/index268.js.map +1 -1
  344. package/dist/index269.js +10 -9
  345. package/dist/index269.js.map +1 -1
  346. package/dist/index27.js +50 -53
  347. package/dist/index27.js.map +1 -1
  348. package/dist/index270.js +7 -10
  349. package/dist/index270.js.map +1 -1
  350. package/dist/index271.js +73 -7
  351. package/dist/index271.js.map +1 -1
  352. package/dist/index272.js +161 -63
  353. package/dist/index272.js.map +1 -1
  354. package/dist/index273.js +100 -157
  355. package/dist/index273.js.map +1 -1
  356. package/dist/index274.js +13 -113
  357. package/dist/index274.js.map +1 -1
  358. package/dist/index275.js +78 -12
  359. package/dist/index275.js.map +1 -1
  360. package/dist/index276.js +23 -57
  361. package/dist/index276.js.map +1 -1
  362. package/dist/index277.js +12 -45
  363. package/dist/index277.js.map +1 -1
  364. package/dist/index278.js +16 -13
  365. package/dist/index278.js.map +1 -1
  366. package/dist/index279.js +98 -15
  367. package/dist/index279.js.map +1 -1
  368. package/dist/index28.js +1 -59
  369. package/dist/index280.js +50 -93
  370. package/dist/index280.js.map +1 -1
  371. package/dist/index281.js +57 -5
  372. package/dist/index281.js.map +1 -1
  373. package/dist/index282.js +41 -78
  374. package/dist/index282.js.map +1 -1
  375. package/dist/index283.js +100 -58
  376. package/dist/index283.js.map +1 -1
  377. package/dist/index284.js +46 -104
  378. package/dist/index284.js.map +1 -1
  379. package/dist/index285.js +39 -51
  380. package/dist/index285.js.map +1 -1
  381. package/dist/index286.js +141 -42
  382. package/dist/index286.js.map +1 -1
  383. package/dist/index287.js +119 -122
  384. package/dist/index287.js.map +1 -1
  385. package/dist/index288.js +222 -107
  386. package/dist/index288.js.map +1 -1
  387. package/dist/index289.js +159 -173
  388. package/dist/index289.js.map +1 -1
  389. package/dist/index29.js +4 -0
  390. package/dist/index290.js +177 -119
  391. package/dist/index290.js.map +1 -1
  392. package/dist/index291.js +5 -298
  393. package/dist/index291.js.map +1 -1
  394. package/dist/index292.js +6 -5
  395. package/dist/index292.js.map +1 -1
  396. package/dist/index293.js +7 -6
  397. package/dist/index293.js.map +1 -1
  398. package/dist/index294.js +5 -6
  399. package/dist/index294.js.map +1 -1
  400. package/dist/index295.js +4 -4
  401. package/dist/index295.js.map +1 -1
  402. package/dist/index296.js +21 -6
  403. package/dist/index296.js.map +1 -1
  404. package/dist/index297.js +10 -21
  405. package/dist/index297.js.map +1 -1
  406. package/dist/index298.js +126 -10
  407. package/dist/index298.js.map +1 -1
  408. package/dist/index299.js +146 -108
  409. package/dist/index299.js.map +1 -1
  410. package/dist/index30.js +8 -6
  411. package/dist/index30.js.map +1 -0
  412. package/dist/index300.js +55 -151
  413. package/dist/index300.js.map +1 -1
  414. package/dist/index301.js +107 -66
  415. package/dist/index301.js.map +1 -1
  416. package/dist/index302.js +489 -107
  417. package/dist/index302.js.map +1 -1
  418. package/dist/index303.js +63 -492
  419. package/dist/index303.js.map +1 -1
  420. package/dist/index304.js +4 -63
  421. package/dist/index304.js.map +1 -1
  422. package/dist/index305.js +28 -4
  423. package/dist/index305.js.map +1 -1
  424. package/dist/index306.js +65 -27
  425. package/dist/index306.js.map +1 -1
  426. package/dist/index307.js +147 -60
  427. package/dist/index307.js.map +1 -1
  428. package/dist/index308.js +56 -147
  429. package/dist/index308.js.map +1 -1
  430. package/dist/index309.js +553 -53
  431. package/dist/index309.js.map +1 -1
  432. package/dist/index31.js +6 -5
  433. package/dist/index31.js.map +1 -1
  434. package/dist/index310.js +170 -521
  435. package/dist/index310.js.map +1 -1
  436. package/dist/index311.js +327 -206
  437. package/dist/index311.js.map +1 -1
  438. package/dist/index312.js +251 -314
  439. package/dist/index312.js.map +1 -1
  440. package/dist/index32.js +3 -3
  441. package/dist/index32.js.map +1 -1
  442. package/dist/index33.js +7 -5
  443. package/dist/index33.js.map +1 -1
  444. package/dist/index34.js +7 -4
  445. package/dist/index34.js.map +1 -1
  446. package/dist/index35.js +5 -10
  447. package/dist/index35.js.map +1 -1
  448. package/dist/index36.js +7 -5
  449. package/dist/index36.js.map +1 -1
  450. package/dist/index37.js +8 -7
  451. package/dist/index37.js.map +1 -1
  452. package/dist/index38.js +12 -8
  453. package/dist/index38.js.map +1 -1
  454. package/dist/index39.js +5 -11
  455. package/dist/index39.js.map +1 -1
  456. package/dist/index40.js +6 -6
  457. package/dist/index40.js.map +1 -1
  458. package/dist/index41.js +5 -5
  459. package/dist/index41.js.map +1 -1
  460. package/dist/index42.js +9 -6
  461. package/dist/index42.js.map +1 -1
  462. package/dist/index43.js +8 -9
  463. package/dist/index43.js.map +1 -1
  464. package/dist/index44.js +5 -8
  465. package/dist/index44.js.map +1 -1
  466. package/dist/index45.js +2 -2
  467. package/dist/index45.js.map +1 -1
  468. package/dist/index46.js +11 -5
  469. package/dist/index46.js.map +1 -1
  470. package/dist/index47.js +4 -4
  471. package/dist/index47.js.map +1 -1
  472. package/dist/index48.js +6 -10
  473. package/dist/index48.js.map +1 -1
  474. package/dist/index49.js +4 -7
  475. package/dist/index49.js.map +1 -1
  476. package/dist/index50.js +6 -4
  477. package/dist/index50.js.map +1 -1
  478. package/dist/index51.js +6 -6
  479. package/dist/index51.js.map +1 -1
  480. package/dist/index52.js +5 -5
  481. package/dist/index52.js.map +1 -1
  482. package/dist/index53.js +8 -5
  483. package/dist/index53.js.map +1 -1
  484. package/dist/index54.js +13 -9
  485. package/dist/index54.js.map +1 -1
  486. package/dist/index55.js +5 -12
  487. package/dist/index55.js.map +1 -1
  488. package/dist/index56.js +4 -4
  489. package/dist/index56.js.map +1 -1
  490. package/dist/index57.js +4 -4
  491. package/dist/index57.js.map +1 -1
  492. package/dist/index58.js +13 -6
  493. package/dist/index58.js.map +1 -1
  494. package/dist/index59.js +4 -10
  495. package/dist/index59.js.map +1 -1
  496. package/dist/index60.js +8 -7
  497. package/dist/index60.js.map +1 -1
  498. package/dist/index61.js +68 -9
  499. package/dist/index61.js.map +1 -1
  500. package/dist/index62.js +8 -68
  501. package/dist/index62.js.map +1 -1
  502. package/dist/index63.js +31 -8
  503. package/dist/index63.js.map +1 -1
  504. package/dist/index64.js +10 -31
  505. package/dist/index64.js.map +1 -1
  506. package/dist/index65.js +16 -10
  507. package/dist/index65.js.map +1 -1
  508. package/dist/index66.js +200 -15
  509. package/dist/index66.js.map +1 -1
  510. package/dist/index67.js +21 -201
  511. package/dist/index67.js.map +1 -1
  512. package/dist/index68.js +12 -16
  513. package/dist/index68.js.map +1 -1
  514. package/dist/index69.js +123 -17
  515. package/dist/index69.js.map +1 -1
  516. package/dist/index70.js +18 -122
  517. package/dist/index70.js.map +1 -1
  518. package/dist/index71.js +9 -19
  519. package/dist/index71.js.map +1 -1
  520. package/dist/index72.js +9 -8
  521. package/dist/index72.js.map +1 -1
  522. package/dist/index73.js +11 -7
  523. package/dist/index73.js.map +1 -1
  524. package/dist/index74.js +7 -11
  525. package/dist/index74.js.map +1 -1
  526. package/dist/index75.js +6 -6
  527. package/dist/index75.js.map +1 -1
  528. package/dist/index76.js +4 -9
  529. package/dist/index76.js.map +1 -1
  530. package/dist/index77.js +42 -5
  531. package/dist/index77.js.map +1 -1
  532. package/dist/index78.js +368 -29
  533. package/dist/index78.js.map +1 -1
  534. package/dist/index79.js +37 -379
  535. package/dist/index79.js.map +1 -1
  536. package/dist/index80.js +22 -39
  537. package/dist/index80.js.map +1 -1
  538. package/dist/index81.js +56 -20
  539. package/dist/index81.js.map +1 -1
  540. package/dist/index82.js +7 -57
  541. package/dist/index82.js.map +1 -1
  542. package/dist/index83.js +4 -6
  543. package/dist/index83.js.map +1 -1
  544. package/dist/index84.js +3 -3
  545. package/dist/index84.js.map +1 -1
  546. package/dist/index85.js +3 -3
  547. package/dist/index85.js.map +1 -1
  548. package/dist/index86.js +3 -3
  549. package/dist/index86.js.map +1 -1
  550. package/dist/index87.js +5 -4
  551. package/dist/index87.js.map +1 -1
  552. package/dist/index88.js +3 -3
  553. package/dist/index88.js.map +1 -1
  554. package/dist/index89.js +10 -6
  555. package/dist/index89.js.map +1 -1
  556. package/dist/index90.js +7 -10
  557. package/dist/index90.js.map +1 -1
  558. package/dist/index91.js +6 -7
  559. package/dist/index91.js.map +1 -1
  560. package/dist/index92.js +5 -6
  561. package/dist/index92.js.map +1 -1
  562. package/dist/index93.js +7 -5
  563. package/dist/index93.js.map +1 -1
  564. package/dist/index94.js +48 -8
  565. package/dist/index94.js.map +1 -1
  566. package/dist/index95.js +104 -46
  567. package/dist/index95.js.map +1 -1
  568. package/dist/index96.js +8 -103
  569. package/dist/index96.js.map +1 -1
  570. package/dist/index97.js +5 -9
  571. package/dist/index97.js.map +1 -1
  572. package/dist/index98.js +3 -3
  573. package/dist/index98.js.map +1 -1
  574. package/dist/index99.js +6 -7
  575. package/dist/index99.js.map +1 -1
  576. package/package.json +2 -2
  577. package/dist/index233.js.map +0 -1
  578. package/dist/index236.js.map +0 -1
  579. package/dist/index28.js.map +0 -1
  580. package/dist/index313.js +0 -272
  581. package/dist/index313.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index303.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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AAiBnE,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":"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,QAAS,EAElCN,EAAU,GAAK;IAChBT,EAAA,KAAAY,KAAAA,IAAAZ,EAAA;CALD,IAAAiB,IAAyBL,GAKxBM;AAAA,CAAAlB,EAAA,OAAAa,OAAAC,IAAA,4BAAA,IAEwBI,UAAA;AACvBR,IAAUK,UAAWI,iBAAW;AAC9BV,KAAU,GAAM;KACf,IAFe;IAGnBT,EAAA,KAAAkB,KAAAA,IAAAlB,EAAA;CAJD,IAAAoB,IAAyBF,GAIxBG,GAAAC;AAED1B,CAFCI,EAAA,OAAAa,OAAAC,IAAA,4BAAA,IAESO,gBACD;AACL,EAAIX,EAAUK,WACZC,aAAaN,EAAUK,QAAS;IAGnCO,IAAA,EAAE,EAAAtB,EAAA,KAAAqB,GAAArB,EAAA,KAAAsB,MAAAD,IAAArB,EAAA,IAAAsB,IAAAtB,EAAA,KANLJ,EAAUy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ACAG,cAAAA;YAJhB,CAMEM,GAgBCC,EAeG;KAAA3B,EAAA,MAAA0B,GAAA1B,EAAA,MAAA2B,GAAA3B,EAAA,MAAA+B,KAAAA,IAAA/B,EAAA,KArCN+B"}
package/dist/index304.js CHANGED
@@ -1,66 +1,7 @@
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;
62
- };
1
+ import { MenuPopover as e } from "./index303.js";
2
+ //#region src/components/header/index.tsx
3
+ var t = { MenuPopover: e };
63
4
  //#endregion
64
- export { c as MenuPopover };
5
+ export { t as Header };
65
6
 
66
7
  //# sourceMappingURL=index304.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index304.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,O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AAA,KAAAK,GAAAL,EAAA,MAAAyB,GAAAzB,EAAA,MAAA0B,KAAAA,IAAA1B,EAAA;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":"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"}
package/dist/index305.js CHANGED
@@ -1,7 +1,31 @@
1
- import { MenuPopover as e } from "./index304.js";
2
- //#region src/components/header/index.tsx
3
- var t = { MenuPopover: e };
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;
27
+ }
4
28
  //#endregion
5
- export { t as Header };
29
+ export { a as NotificationsButton };
6
30
 
7
31
  //# sourceMappingURL=index305.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index305.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":"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-primary-foreground\"\n aria-hidden=\"true\"\n >\n {count > 99 ? \"99+\" : String(count)}\n </span>\n ) : null}\n </button>\n )\n}\n"],"mappings":";;;;;AAKA,SAAOE,EAAAC,GAAA;CAAA,IAAAC,IAAAC,EAAA,GAAA,EAA6B,EAAAC,gBAAAC,gBAAAC,YAAAC,iBAAAN,GAWlCO,IAAiBC,OAAMC,SAAUN,EAAwC,GAAxDA,IAAAC,GAAwDM;AAAA,CAAAT,EAAA,OAAAM,IACWG,IAAAT,EAAA,MAAtES,IAAAF,OAAMC,SAAUF,EAAsD,GAA1CI,KAAIC,IAAK,GAAGD,KAAIE,MAAON,KAAA,EAAkB,CAAC,GAAtE,GAAsEN,EAAA,KAAAM,GAAAN,EAAA,KAAAS;CAApF,IAAAI,IAAcJ,GAAsEK;AAAA,CAAAd,EAAA,OAAAK,IAS/ES,IAAAd,EAAA,MAHUc,IAAAjB,EACT,4HACAQ,EACD,EAAAL,EAAA,KAAAK,GAAAL,EAAA,KAAAc;CACW,IAAAC,IAAAF,IAAQ,IAAR,kBAA8BA,EAAK,SAAnC,iBAA4DG;AAAA,CAAAhB,EAAA,OAAAiB,OAAAC,IAAA,4BAAA,IAExEF,IAAA,kBAAC,GAAD,EAAgB,WAAA,WAAY,CAAA,EAAAhB,EAAA,KAAAgB,KAAAA,IAAAhB,EAAA;CAAA,IAAAmB;AAAA,CAAAnB,EAAA,OAAAa,IAQpBM,IAAAnB,EAAA,MAPPmB,IAAAN,IAAQ,IACP,kBAAA,QAAA;EACY,WAAA;EACE,eAAA;YAEXA,IAAQ,KAAR,QAAqBO,OAAOP,EAAK;EAE9B,CAAA,GAPP,MAOOb,EAAA,KAAAa,GAAAb,EAAA,KAAAmB;CAAA,IAAAE;AACD,QADCrB,EAAA,OAAAI,KAAAJ,EAAA,OAAAc,KAAAd,EAAA,OAAAe,KAAAf,EAAA,QAAAmB,KAjBVE,IAAA,kBAAA,UAAA;EACO,MAAA;EACIjB;EACE,WAAAU;EAIC,cAAAC;YAPd,CASEC,GACCG,EAQM;KAAAnB,EAAA,KAAAI,GAAAJ,EAAA,KAAAc,GAAAd,EAAA,KAAAe,GAAAf,EAAA,MAAAmB,GAAAnB,EAAA,MAAAqB,KAAAA,IAAArB,EAAA,KAlBTqB"}
package/dist/index306.js CHANGED
@@ -1,31 +1,69 @@
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
+ "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);
8
+ }
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;
12
+ };
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);
27
65
  }
28
66
  //#endregion
29
- export { a as NotificationsButton };
67
+ export { i as Presence };
30
68
 
31
69
  //# sourceMappingURL=index306.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index306.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-primary-foreground\"\n aria-hidden=\"true\"\n >\n {count > 99 ? \"99+\" : String(count)}\n </span>\n ) : null}\n </button>\n )\n}\n"],"mappings":";;;;;AAKA,SAAOE,EAAAC,GAAA;CAAA,IAAAC,IAAAC,EAAA,GAAA,EAA6B,EAAAC,gBAAAC,gBAAAC,YAAAC,iBAAAN,GAWlCO,IAAiBC,OAAMC,SAAUN,EAAwC,GAAxDA,IAAAC,GAAwDM;AAAA,CAAAT,EAAA,OAAAM,IACWG,IAAAT,EAAA,MAAtES,IAAAF,OAAMC,SAAUF,EAAsD,GAA1CI,KAAIC,IAAK,GAAGD,KAAIE,MAAON,KAAA,EAAkB,CAAC,GAAtE,GAAsEN,EAAA,KAAAM,GAAAN,EAAA,KAAAS;CAApF,IAAAI,IAAcJ,GAAsEK;AAAA,CAAAd,EAAA,OAAAK,IAS/ES,IAAAd,EAAA,MAHUc,IAAAjB,EACT,4HACAQ,EACD,EAAAL,EAAA,KAAAK,GAAAL,EAAA,KAAAc;CACW,IAAAC,IAAAF,IAAQ,IAAR,kBAA8BA,EAAK,SAAnC,iBAA4DG;AAAA,CAAAhB,EAAA,OAAAiB,OAAAC,IAAA,4BAAA,IAExEF,IAAA,kBAAC,GAAD,EAAgB,WAAA,WAAY,CAAA,EAAAhB,EAAA,KAAAgB,KAAAA,IAAAhB,EAAA;CAAA,IAAAmB;AAAA,CAAAnB,EAAA,OAAAa,IAQpBM,IAAAnB,EAAA,MAPPmB,IAAAN,IAAQ,IACP,kBAAA,QAAA;EACY,WAAA;EACE,eAAA;YAEXA,IAAQ,KAAR,QAAqBO,OAAOP,EAAK;EAE9B,CAAA,GAPP,MAOOb,EAAA,KAAAa,GAAAb,EAAA,KAAAmB;CAAA,IAAAE;AACD,QADCrB,EAAA,OAAAI,KAAAJ,EAAA,OAAAc,KAAAd,EAAA,OAAAe,KAAAf,EAAA,QAAAmB,KAjBVE,IAAA,kBAAA,UAAA;EACO,MAAA;EACIjB;EACE,WAAAU;EAIC,cAAAC;YAPd,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":"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,EAA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