@rpcbase/ui 0.280.0 → 0.281.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 (518) hide show
  1. package/dist/components/AddressAutocompleteInput/index.d.ts +1 -1
  2. package/dist/components/AddressAutocompleteInput/index.d.ts.map +1 -1
  3. package/dist/components/ApplePayButton/index.d.ts +1 -1
  4. package/dist/components/ApplePayButton/index.d.ts.map +1 -1
  5. package/dist/components/Checkbox/index.d.ts +1 -1
  6. package/dist/components/Checkbox/index.d.ts.map +1 -1
  7. package/dist/components/DayPickerField/index.d.ts +2 -2
  8. package/dist/components/DayPickerField/index.d.ts.map +1 -1
  9. package/dist/components/Dialog/index.d.ts +9 -9
  10. package/dist/components/Dialog/index.d.ts.map +1 -1
  11. package/dist/components/FilesUploadField/index.d.ts +1 -1
  12. package/dist/components/FilesUploadField/index.d.ts.map +1 -1
  13. package/dist/components/HourPickerField/index.d.ts +2 -2
  14. package/dist/components/HourPickerField/index.d.ts.map +1 -1
  15. package/dist/components/I18nField/index.d.ts +1 -1
  16. package/dist/components/I18nField/index.d.ts.map +1 -1
  17. package/dist/components/Image/index.d.ts +1 -1
  18. package/dist/components/Image/index.d.ts.map +1 -1
  19. package/dist/components/ImagesField/index.d.ts +1 -1
  20. package/dist/components/ImagesField/index.d.ts.map +1 -1
  21. package/dist/components/Input/index.d.ts +1 -1
  22. package/dist/components/Input/index.d.ts.map +1 -1
  23. package/dist/components/Notifications/NotificationsButton.d.ts +1 -1
  24. package/dist/components/Notifications/NotificationsButton.d.ts.map +1 -1
  25. package/dist/components/Notifications/NotificationsDrawer.d.ts +1 -1
  26. package/dist/components/Notifications/NotificationsDrawer.d.ts.map +1 -1
  27. package/dist/components/Notifications/NotificationsSettings.d.ts +1 -1
  28. package/dist/components/Notifications/NotificationsSettings.d.ts.map +1 -1
  29. package/dist/components/PhoneNumberInput/suggestions.d.ts +3 -3
  30. package/dist/components/PhoneNumberInput/suggestions.d.ts.map +1 -1
  31. package/dist/components/Select/index.d.ts +2 -2
  32. package/dist/components/Select/index.d.ts.map +1 -1
  33. package/dist/components/header/MenuPopover/index.d.ts +1 -1
  34. package/dist/components/header/MenuPopover/index.d.ts.map +1 -1
  35. package/dist/index.js +12 -12
  36. package/dist/index10.js +6 -4
  37. package/dist/index10.js.map +1 -1
  38. package/dist/index12.js.map +1 -1
  39. package/dist/index13.js.map +1 -1
  40. package/dist/index14.js.map +1 -1
  41. package/dist/index15.js.map +1 -1
  42. package/dist/index154.js +19 -7
  43. package/dist/index154.js.map +1 -1
  44. package/dist/index16.js +36 -45
  45. package/dist/index16.js.map +1 -1
  46. package/dist/index160.js +3 -3
  47. package/dist/index160.js.map +1 -1
  48. package/dist/index166.js +5 -5
  49. package/dist/index166.js.map +1 -1
  50. package/dist/index172.js +27 -25
  51. package/dist/index172.js.map +1 -1
  52. package/dist/index181.js +1 -1
  53. package/dist/index181.js.map +1 -1
  54. package/dist/index182.js +145 -162
  55. package/dist/index182.js.map +1 -1
  56. package/dist/index184.js +6 -8
  57. package/dist/index184.js.map +1 -1
  58. package/dist/index186.js +2 -8
  59. package/dist/index186.js.map +1 -1
  60. package/dist/index19.js +1 -1
  61. package/dist/index19.js.map +1 -1
  62. package/dist/index195.js +1 -1
  63. package/dist/index195.js.map +1 -1
  64. package/dist/index196.js +2 -2
  65. package/dist/index196.js.map +1 -1
  66. package/dist/index197.js +1 -1
  67. package/dist/index197.js.map +1 -1
  68. package/dist/index198.js +16 -15
  69. package/dist/index198.js.map +1 -1
  70. package/dist/index199.js +13 -17
  71. package/dist/index199.js.map +1 -1
  72. package/dist/index200.js +3 -2
  73. package/dist/index200.js.map +1 -1
  74. package/dist/index207.js +5 -90
  75. package/dist/index207.js.map +1 -1
  76. package/dist/index208.js +15 -3
  77. package/dist/index208.js.map +1 -1
  78. package/dist/index209.js +102 -22
  79. package/dist/index209.js.map +1 -1
  80. package/dist/index210.js +3 -28
  81. package/dist/index210.js.map +1 -1
  82. package/dist/index211.js +23 -19
  83. package/dist/index211.js.map +1 -1
  84. package/dist/index212.js +27 -6
  85. package/dist/index212.js.map +1 -1
  86. package/dist/index213.js +19 -14
  87. package/dist/index213.js.map +1 -1
  88. package/dist/index214.js +5 -6
  89. package/dist/index214.js.map +1 -1
  90. package/dist/index215.js +14 -26
  91. package/dist/index215.js.map +1 -1
  92. package/dist/index216.js +7 -22
  93. package/dist/index216.js.map +1 -1
  94. package/dist/index217.js +27 -6
  95. package/dist/index217.js.map +1 -1
  96. package/dist/index218.js +23 -5
  97. package/dist/index218.js.map +1 -1
  98. package/dist/index219.js +6 -4
  99. package/dist/index219.js.map +1 -1
  100. package/dist/index220.js +5 -4
  101. package/dist/index220.js.map +1 -1
  102. package/dist/index221.js +4 -24
  103. package/dist/index221.js.map +1 -1
  104. package/dist/index222.js +4 -3
  105. package/dist/index222.js.map +1 -1
  106. package/dist/index223.js +21 -21
  107. package/dist/index223.js.map +1 -1
  108. package/dist/index224.js +3 -23
  109. package/dist/index224.js.map +1 -1
  110. package/dist/index225.js +23 -6
  111. package/dist/index225.js.map +1 -1
  112. package/dist/index226.js +22 -9
  113. package/dist/index226.js.map +1 -1
  114. package/dist/index227.js +5 -17
  115. package/dist/index227.js.map +1 -1
  116. package/dist/index228.js +8 -49
  117. package/dist/index228.js.map +1 -1
  118. package/dist/index229.js +18 -5
  119. package/dist/index229.js.map +1 -1
  120. package/dist/index230.js +50 -19
  121. package/dist/index230.js.map +1 -1
  122. package/dist/index231.js +20 -28
  123. package/dist/index231.js.map +1 -1
  124. package/dist/index232.js +27 -104
  125. package/dist/index232.js.map +1 -1
  126. package/dist/index233.js +98 -33
  127. package/dist/index233.js.map +1 -1
  128. package/dist/index234.js +28 -113
  129. package/dist/index234.js.map +1 -1
  130. package/dist/index235.js +117 -11
  131. package/dist/index235.js.map +1 -1
  132. package/dist/index236.js +12 -4
  133. package/dist/index236.js.map +1 -1
  134. package/dist/index237.js +4 -15
  135. package/dist/index237.js.map +1 -1
  136. package/dist/index238.js +13 -62
  137. package/dist/index238.js.map +1 -1
  138. package/dist/index239.js +64 -9
  139. package/dist/index239.js.map +1 -1
  140. package/dist/index240.js +10 -106
  141. package/dist/index240.js.map +1 -1
  142. package/dist/index241.js +107 -13
  143. package/dist/index241.js.map +1 -1
  144. package/dist/index242.js +16 -13
  145. package/dist/index242.js.map +1 -1
  146. package/dist/index243.js +13 -5
  147. package/dist/index243.js.map +1 -1
  148. package/dist/index244.js +4 -316
  149. package/dist/index244.js.map +1 -1
  150. package/dist/index245.js +315 -58
  151. package/dist/index245.js.map +1 -1
  152. package/dist/index246.js +58 -223
  153. package/dist/index246.js.map +1 -1
  154. package/dist/index247.js +215 -318
  155. package/dist/index247.js.map +1 -1
  156. package/dist/index248.js +250 -306
  157. package/dist/index248.js.map +1 -1
  158. package/dist/index249.js +308 -173
  159. package/dist/index249.js.map +1 -1
  160. package/dist/index250.js +178 -7
  161. package/dist/index250.js.map +1 -1
  162. package/dist/index251.js +8 -15
  163. package/dist/index251.js.map +1 -1
  164. package/dist/index252.js +41 -5
  165. package/dist/index252.js.map +1 -1
  166. package/dist/index253.js +46 -38
  167. package/dist/index253.js.map +1 -1
  168. package/dist/index254.js +7 -50
  169. package/dist/index254.js.map +1 -1
  170. package/dist/index255.js +49 -6
  171. package/dist/index255.js.map +1 -1
  172. package/dist/index256.js +48 -46
  173. package/dist/index256.js.map +1 -1
  174. package/dist/index257.js +6 -51
  175. package/dist/index257.js.map +1 -1
  176. package/dist/index258.js +10 -9
  177. package/dist/index258.js.map +1 -1
  178. package/dist/index259.js +60 -8
  179. package/dist/index259.js.map +1 -1
  180. package/dist/index26.js.map +1 -1
  181. package/dist/index260.js +41 -60
  182. package/dist/index260.js.map +1 -1
  183. package/dist/index261.js +88 -34
  184. package/dist/index261.js.map +1 -1
  185. package/dist/index262.js +47 -94
  186. package/dist/index262.js.map +1 -1
  187. package/dist/index263.js +36 -49
  188. package/dist/index263.js.map +1 -1
  189. package/dist/index264.js +45 -32
  190. package/dist/index264.js.map +1 -1
  191. package/dist/index265.js +47 -46
  192. package/dist/index265.js.map +1 -1
  193. package/dist/index266.js +18 -48
  194. package/dist/index266.js.map +1 -1
  195. package/dist/index267.js +174 -15
  196. package/dist/index267.js.map +1 -1
  197. package/dist/index268.js +47 -169
  198. package/dist/index268.js.map +1 -1
  199. package/dist/index269.js +17 -34
  200. package/dist/index269.js.map +1 -1
  201. package/dist/index270.js +59 -10
  202. package/dist/index270.js.map +1 -1
  203. package/dist/index271.js +10 -66
  204. package/dist/index271.js.map +1 -1
  205. package/dist/index272.js +4 -4
  206. package/dist/index273.js +71 -69
  207. package/dist/index273.js.map +1 -1
  208. package/dist/index274.js +158 -152
  209. package/dist/index274.js.map +1 -1
  210. package/dist/index275.js +7 -13
  211. package/dist/index275.js.map +1 -1
  212. package/dist/index276.js +12 -5
  213. package/dist/index276.js.map +1 -1
  214. package/dist/index277.js +12 -6
  215. package/dist/index277.js.map +1 -1
  216. package/dist/index278.js +11 -12
  217. package/dist/index278.js.map +1 -1
  218. package/dist/index279.js +65 -9
  219. package/dist/index279.js.map +1 -1
  220. package/dist/index280.js +6 -74
  221. package/dist/index280.js.map +1 -1
  222. package/dist/index281.js +25 -6
  223. package/dist/index281.js.map +1 -1
  224. package/dist/index282.js +24 -24
  225. package/dist/index282.js.map +1 -1
  226. package/dist/index283.js +125 -24
  227. package/dist/index283.js.map +1 -1
  228. package/dist/index284.js +52 -115
  229. package/dist/index284.js.map +1 -1
  230. package/dist/index285.js +59 -55
  231. package/dist/index285.js.map +1 -1
  232. package/dist/index286.js +48 -61
  233. package/dist/index286.js.map +1 -1
  234. package/dist/index287.js +5 -48
  235. package/dist/index287.js.map +1 -1
  236. package/dist/index288.js +14 -8
  237. package/dist/index288.js.map +1 -1
  238. package/dist/index289.js +18 -14
  239. package/dist/index289.js.map +1 -1
  240. package/dist/index290.js +10 -17
  241. package/dist/index290.js.map +1 -1
  242. package/dist/index291.js +23 -11
  243. package/dist/index291.js.map +1 -1
  244. package/dist/index292.js +52 -25
  245. package/dist/index292.js.map +1 -1
  246. package/dist/index293.js +6 -52
  247. package/dist/index293.js.map +1 -1
  248. package/dist/index294.js +137 -5
  249. package/dist/index294.js.map +1 -1
  250. package/dist/index295.js +59 -149
  251. package/dist/index295.js.map +1 -1
  252. package/dist/index296.js +90 -49
  253. package/dist/index296.js.map +1 -1
  254. package/dist/index297.js +11 -117
  255. package/dist/index297.js.map +1 -1
  256. package/dist/index298.js +863 -11
  257. package/dist/index298.js.map +1 -1
  258. package/dist/index299.js +21 -865
  259. package/dist/index299.js.map +1 -1
  260. package/dist/index3.js.map +1 -1
  261. package/dist/index300.js +417 -27
  262. package/dist/index300.js.map +1 -1
  263. package/dist/index301.js +774 -483
  264. package/dist/index301.js.map +1 -1
  265. package/dist/index302.js +7436 -803
  266. package/dist/index302.js.map +1 -1
  267. package/dist/index303.js +7 -7429
  268. package/dist/index303.js.map +1 -1
  269. package/dist/index304.js +12 -6
  270. package/dist/index304.js.map +1 -1
  271. package/dist/index305.js +5 -12
  272. package/dist/index305.js.map +1 -1
  273. package/dist/index306.js +3 -3
  274. package/dist/index306.js.map +1 -1
  275. package/dist/index307.js +469 -5
  276. package/dist/index307.js.map +1 -1
  277. package/dist/index308.js +32 -464
  278. package/dist/index308.js.map +1 -1
  279. package/dist/index309.js +18 -36
  280. package/dist/index309.js.map +1 -1
  281. package/dist/index310.js +28 -17
  282. package/dist/index310.js.map +1 -1
  283. package/dist/index311.js +4 -30
  284. package/dist/index311.js.map +1 -1
  285. package/dist/index312.js +59 -4
  286. package/dist/index312.js.map +1 -1
  287. package/dist/index313.js +11 -59
  288. package/dist/index313.js.map +1 -1
  289. package/dist/index314.js +5 -9
  290. package/dist/index314.js.map +1 -1
  291. package/dist/index315.js +9 -5
  292. package/dist/index315.js.map +1 -1
  293. package/dist/index316.js +12 -9
  294. package/dist/index316.js.map +1 -1
  295. package/dist/index317.js +3 -13
  296. package/dist/index317.js.map +1 -1
  297. package/dist/index318.js +17 -3
  298. package/dist/index318.js.map +1 -1
  299. package/dist/index319.js +23 -14
  300. package/dist/index319.js.map +1 -1
  301. package/dist/index320.js +39 -23
  302. package/dist/index320.js.map +1 -1
  303. package/dist/index321.js +5 -41
  304. package/dist/index321.js.map +1 -1
  305. package/dist/index322.js +25 -5
  306. package/dist/index322.js.map +1 -1
  307. package/dist/index323.js +18 -24
  308. package/dist/index323.js.map +1 -1
  309. package/dist/index324.js +32 -17
  310. package/dist/index324.js.map +1 -1
  311. package/dist/index325.js +5 -34
  312. package/dist/index325.js.map +1 -1
  313. package/dist/index326.js +9 -5
  314. package/dist/index326.js.map +1 -1
  315. package/dist/index327.js +7 -8
  316. package/dist/index327.js.map +1 -1
  317. package/dist/index328.js +9 -8
  318. package/dist/index328.js.map +1 -1
  319. package/dist/index329.js +10 -9
  320. package/dist/index329.js.map +1 -1
  321. package/dist/index330.js +7 -10
  322. package/dist/index330.js.map +1 -1
  323. package/dist/index331.js +75 -7
  324. package/dist/index331.js.map +1 -1
  325. package/dist/index332.js +153 -66
  326. package/dist/index332.js.map +1 -1
  327. package/dist/index333.js +99 -147
  328. package/dist/index333.js.map +1 -1
  329. package/dist/index334.js +13 -113
  330. package/dist/index334.js.map +1 -1
  331. package/dist/index335.js +78 -12
  332. package/dist/index335.js.map +1 -1
  333. package/dist/index336.js +23 -57
  334. package/dist/index336.js.map +1 -1
  335. package/dist/index337.js +12 -45
  336. package/dist/index337.js.map +1 -1
  337. package/dist/index338.js +16 -13
  338. package/dist/index338.js.map +1 -1
  339. package/dist/index339.js +100 -15
  340. package/dist/index339.js.map +1 -1
  341. package/dist/index340.js +50 -95
  342. package/dist/index340.js.map +1 -1
  343. package/dist/index341.js +57 -5
  344. package/dist/index341.js.map +1 -1
  345. package/dist/index342.js +41 -78
  346. package/dist/index342.js.map +1 -1
  347. package/dist/index343.js +100 -58
  348. package/dist/index343.js.map +1 -1
  349. package/dist/index344.js +46 -104
  350. package/dist/index344.js.map +1 -1
  351. package/dist/index345.js +39 -51
  352. package/dist/index345.js.map +1 -1
  353. package/dist/index346.js +143 -42
  354. package/dist/index346.js.map +1 -1
  355. package/dist/index347.js +122 -123
  356. package/dist/index347.js.map +1 -1
  357. package/dist/index348.js +224 -108
  358. package/dist/index348.js.map +1 -1
  359. package/dist/index349.js +158 -174
  360. package/dist/index349.js.map +1 -1
  361. package/dist/index350.js +213 -144
  362. package/dist/index350.js.map +1 -1
  363. package/dist/index351.js +5 -309
  364. package/dist/index351.js.map +1 -1
  365. package/dist/index352.js +6 -5
  366. package/dist/index352.js.map +1 -1
  367. package/dist/index353.js +7 -6
  368. package/dist/index353.js.map +1 -1
  369. package/dist/index354.js +4 -5
  370. package/dist/index354.js.map +1 -1
  371. package/dist/index355.js +4 -4
  372. package/dist/index355.js.map +1 -1
  373. package/dist/index356.js +21 -6
  374. package/dist/index356.js.map +1 -1
  375. package/dist/index357.js +10 -21
  376. package/dist/index357.js.map +1 -1
  377. package/dist/index358.js +128 -10
  378. package/dist/index358.js.map +1 -1
  379. package/dist/index359.js +36 -122
  380. package/dist/index359.js.map +1 -1
  381. package/dist/index360.js +64 -38
  382. package/dist/index360.js.map +1 -1
  383. package/dist/index361.js +115 -66
  384. package/dist/index361.js.map +1 -1
  385. package/dist/index362.js +485 -112
  386. package/dist/index362.js.map +1 -1
  387. package/dist/index363.js +7 -490
  388. package/dist/index363.js.map +1 -1
  389. package/dist/index364.js +1 -1
  390. package/dist/index364.js.map +1 -1
  391. package/dist/index367.js +2 -9
  392. package/dist/index367.js.map +1 -1
  393. package/dist/index368.js +26 -5
  394. package/dist/index368.js.map +1 -1
  395. package/dist/index369.js +43 -27
  396. package/dist/index369.js.map +1 -1
  397. package/dist/index370.js +35 -46
  398. package/dist/index370.js.map +1 -1
  399. package/dist/index371.js +16 -27
  400. package/dist/index371.js.map +1 -1
  401. package/dist/index372.js +41 -16
  402. package/dist/index372.js.map +1 -1
  403. package/dist/index373.js +11 -42
  404. package/dist/index373.js.map +1 -1
  405. package/dist/index374.js +10 -14
  406. package/dist/index374.js.map +1 -1
  407. package/dist/index375.js +51 -9
  408. package/dist/index375.js.map +1 -1
  409. package/dist/index376.js +40 -53
  410. package/dist/index376.js.map +1 -1
  411. package/dist/index377.js +17 -43
  412. package/dist/index377.js.map +1 -1
  413. package/dist/index378.js +4 -15
  414. package/dist/index378.js.map +1 -1
  415. package/dist/index379.js +4 -4
  416. package/dist/index379.js.map +1 -1
  417. package/dist/index380.js +9 -4
  418. package/dist/index380.js.map +1 -1
  419. package/dist/index381.js +304 -9
  420. package/dist/index381.js.map +1 -1
  421. package/dist/index382.js +4 -339
  422. package/dist/index382.js.map +1 -1
  423. package/dist/index383.js +21 -5
  424. package/dist/index383.js.map +1 -1
  425. package/dist/index384.js +106 -16
  426. package/dist/index384.js.map +1 -1
  427. package/dist/index385.js +19 -109
  428. package/dist/index385.js.map +1 -1
  429. package/dist/index386.js +18 -18
  430. package/dist/index386.js.map +1 -1
  431. package/dist/index387.js +14 -19
  432. package/dist/index387.js.map +1 -1
  433. package/dist/index388.js +12 -4
  434. package/dist/index388.js.map +1 -1
  435. package/dist/index389.js +113 -20
  436. package/dist/index389.js.map +1 -1
  437. package/dist/index390.js +5 -11
  438. package/dist/index390.js.map +1 -1
  439. package/dist/index391.js +28 -85
  440. package/dist/index391.js.map +1 -1
  441. package/dist/index392.js +9 -9
  442. package/dist/index392.js.map +1 -1
  443. package/dist/index393.js +6 -29
  444. package/dist/index393.js.map +1 -1
  445. package/dist/index394.js +254 -10
  446. package/dist/index394.js.map +1 -1
  447. package/dist/index395.js +12 -6
  448. package/dist/index395.js.map +1 -1
  449. package/dist/index396.js +11 -252
  450. package/dist/index396.js.map +1 -1
  451. package/dist/index397.js +6 -11
  452. package/dist/index397.js.map +1 -1
  453. package/dist/index398.js +22 -10
  454. package/dist/index398.js.map +1 -1
  455. package/dist/index399.js +22 -6
  456. package/dist/index399.js.map +1 -1
  457. package/dist/index4.js.map +1 -1
  458. package/dist/index400.js +103 -21
  459. package/dist/index400.js.map +1 -1
  460. package/dist/index401.js +15 -23
  461. package/dist/index401.js.map +1 -1
  462. package/dist/index402.js +11 -108
  463. package/dist/index402.js.map +1 -1
  464. package/dist/index403.js +10 -15
  465. package/dist/index403.js.map +1 -1
  466. package/dist/index404.js +237 -10
  467. package/dist/index404.js.map +1 -1
  468. package/dist/index405.js +27 -9
  469. package/dist/index405.js.map +1 -1
  470. package/dist/index406.js +33 -238
  471. package/dist/index406.js.map +1 -1
  472. package/dist/index407.js +11 -30
  473. package/dist/index407.js.map +1 -1
  474. package/dist/index408.js +118 -48
  475. package/dist/index408.js.map +1 -1
  476. package/dist/index409.js +39 -11
  477. package/dist/index409.js.map +1 -1
  478. package/dist/index410.js +18 -121
  479. package/dist/index410.js.map +1 -1
  480. package/dist/index411.js +11 -39
  481. package/dist/index411.js.map +1 -1
  482. package/dist/index412.js +21 -24
  483. package/dist/index412.js.map +1 -1
  484. package/dist/index413.js +17 -11
  485. package/dist/index413.js.map +1 -1
  486. package/dist/index414.js +10 -20
  487. package/dist/index414.js.map +1 -1
  488. package/dist/index415.js +4 -17
  489. package/dist/index415.js.map +1 -1
  490. package/dist/index416.js +300 -14
  491. package/dist/index416.js.map +1 -1
  492. package/dist/index417.js +61 -323
  493. package/dist/index417.js.map +1 -1
  494. package/dist/index418.js +4 -63
  495. package/dist/index418.js.map +1 -1
  496. package/dist/index419.js +28 -4
  497. package/dist/index419.js.map +1 -1
  498. package/dist/index420.js +468 -25
  499. package/dist/index420.js.map +1 -1
  500. package/dist/index421.js +250 -452
  501. package/dist/index421.js.map +1 -1
  502. package/dist/index6.js.map +1 -1
  503. package/dist/index7.js +91 -133
  504. package/dist/index7.js.map +1 -1
  505. package/dist/index70.js +2 -2
  506. package/dist/index70.js.map +1 -1
  507. package/dist/index71.js +11 -4
  508. package/dist/index71.js.map +1 -1
  509. package/dist/index72.js +1 -3
  510. package/dist/index72.js.map +1 -1
  511. package/dist/index8.js.map +1 -1
  512. package/dist/index9.js +16 -19
  513. package/dist/index9.js.map +1 -1
  514. package/dist/test-only/TestCoverageTestBadge/index.d.ts +1 -1
  515. package/dist/test-only/TestCoverageTestBadge/index.d.ts.map +1 -1
  516. package/package.json +15 -15
  517. package/dist/index422.js +0 -272
  518. package/dist/index422.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index363.js","names":["React","CountryCode","getCountryCallingCode","Select","Props","SelectProps","SingleValue","StylesConfig","cn","CountryOption","PhoneNumberChangeDetails","PhoneNumberInputProps","PhoneNumberSelectedCountry","resolveMessages","COMMON_IDD_PREFIXES","DEFAULT_COUNTRY","buildFallbackSelectedCountry","getCachedCountryOptions","getLocaleCacheKey","getValidCountry","normalizeSearchValue","optionMatchIndex","parseLocaleCacheKey","toSelectedCountry","formatWithAsYouType","getLengthIssue","sanitizeDigits","stripPrefix","LengthIssue","captureSelectionSnapshot","resolveSelection","skipFormattingCharactersLeft","skipFormattingCharactersRight","HiddenControl","NullComponent","SuggestionContext","SuggestionOption","formatCountryOption","suggestionSelectStyles","SuggestionContextValue","PhoneNumberInputMessages","PhoneNumberInputValidationCode","INVISIBLE_FORMATTING_CHARACTERS","ParsedInput","Omit","displayValue","lengthIssue","stripInvisibleFormatting","value","replace","stripIddPrefix","digits","prefix","startsWith","slice","length","normalizeImplicitInternationalInput","candidate","phoneNumber","detectedCountry","isValid","normalizeExplicitInternationalInput","cleaned","trim","digitsWithoutIdd","normalizeInternationalInput","explicitInternational","getDialCode","country","parsedDialCode","getInputValueForSelectedCountry","option","Pick","options","allowImplicitInternational","dialCode","normalizedInternational","normalizedDigits","currentDialCode","countryCallingCode","nationalDigits","nationalNumber","preferSelectedCountry","parsed","rawInput","parsePhoneInput","rawValue","baseCountry","formattedInternational","formattedNational","e164","shouldFormat","normalized","international","national","formatted","hasInternationalPrefix","formatInternational","formatNational","number","PhoneNumberInput","forwardRef","HTMLInputElement","props","forwardedRef","defaultCountry","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","controlledCountry","localeCacheKey","localeForBuild","useMemo","resolvedMessages","countryOptions","resolveSelectedCountry","useCallback","match","find","menuPriorityCountry","some","initialStateRef","useRef","current","initialState","undefined","uncontrolledCountry","setUncontrolledCountry","useState","inputValueState","setInputValueState","countryQuery","setCountryQuery","showSuggestions","setShowSuggestions","highlightedIndex","setHighlightedIndex","isFocused","setIsFocused","shouldRenderSelect","setShouldRenderSelect","setLengthIssue","manualSelectionCountryRef","keyboardBufferRef","bufferTimeoutRef","scrollBehaviorRef","ScrollBehavior","pendingSelectionRef","start","end","hasNotifiedCountryRef","lastNotifiedCountryRef","inputRef","activeCountry","explicitFormattingCountry","useImperativeHandle","useLayoutEffect","selection","input","setSelectionRange","selectOverrides","generatedSelectInstanceId","useId","styles","userSelectStyles","components","userSelectComponents","classNamePrefix","userClassNamePrefix","formatOptionLabel","userFormatOptionLabel","menuPortalTarget","userMenuPortalTarget","menuPosition","userMenuPosition","forwardedSelectProps","instanceId","userSelectInstanceId","noOptionsMessage","restForwardedSelectProps","selectInstanceId","defaultMenuPortalTarget","setDefaultMenuPortalTarget","HTMLElement","hasUserMenuPortalTarget","mergedSelectStyles","userMenuPortal","menuPortal","provided","state","baseWithZIndex","zIndex","base","document","body","portalRect","getBoundingClientRect","left","top","portalTarget","closest","mergedSelectComponents","baseComponents","Control","IndicatorsContainer","DropdownIndicator","IndicatorSeparator","ValueContainer","overrides","Option","useEffect","window","clearTimeout","emitChange","details","selectedCountry","scheduleBufferReset","setTimeout","applyParsedInput","snapshot","ReturnType","handleInputChange","event","ChangeEvent","target","raw","normalizedExplicitInternational","manualCountry","manualDialCode","activeManualCountry","rawDigits","manualOption","handleCountrySelect","nextInputValue","requestAnimationFrame","focus","filteredOptions","results","pushUnique","existing","push","priorityOption","currentOption","query","digitQuery","normalizedQuery","forEach","dialMatches","filter","sort","a","b","aExact","bExact","nameMatches","normalizedSearchableTokens","token","includes","aIndex","bIndex","localeCompare","suggestionMenuIsOpen","highlightedOption","consumeScrollBehavior","behavior","updateHighlightedOption","index","findIndex","selectFormatOptionLabel","NonNullable","meta","optionLabelRenderer","context","inputValue","selectValue","highlightContextValue","highlightedValue","setHighlightedOption","renderOptionLabel","activeOption","activeFlag","flag","inlineFlagLabel","selectedCountryLabel","selectCountryLabel","hasInlineFlag","Boolean","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","test","toLowerCase","targetOption","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 COMMON_IDD_PREFIXES,\n DEFAULT_COUNTRY,\n buildFallbackSelectedCountry,\n getCachedCountryOptions,\n getLocaleCacheKey,\n getValidCountry,\n normalizeSearchValue,\n optionMatchIndex,\n parseLocaleCacheKey,\n toSelectedCountry,\n} from \"./country-options\"\nimport {\n formatWithAsYouType,\n getLengthIssue,\n sanitizeDigits,\n stripPrefix,\n type LengthIssue,\n} from \"./normalization\"\nimport {\n captureSelectionSnapshot,\n resolveSelection,\n skipFormattingCharactersLeft,\n skipFormattingCharactersRight,\n} from \"./selection\"\nimport {\n HiddenControl,\n NullComponent,\n SuggestionContext,\n SuggestionOption,\n formatCountryOption,\n suggestionSelectStyles,\n type SuggestionContextValue,\n} from \"./suggestions\"\n\n\nexport type {\n CountryOption,\n PhoneNumberChangeDetails,\n PhoneNumberInputMessages,\n PhoneNumberInputProps,\n PhoneNumberInputValidationCode,\n PhoneNumberSelectedCountry,\n} from \"./types\"\n\nconst INVISIBLE_FORMATTING_CHARACTERS =\n /[\\u061C\\u200B-\\u200F\\u202A-\\u202E\\u2066-\\u2069\\uFEFF]/g\n\ntype ParsedInput = Omit<PhoneNumberChangeDetails, \"selectedCountry\"> & {\n displayValue: string\n lengthIssue: LengthIssue | null\n}\n\nfunction stripInvisibleFormatting(value: string) {\n return value.replace(INVISIBLE_FORMATTING_CHARACTERS, \"\")\n}\n\nfunction stripIddPrefix(digits: string) {\n for (const prefix of COMMON_IDD_PREFIXES) {\n if (digits.startsWith(prefix)) {\n return digits.slice(prefix.length)\n }\n }\n return digits\n}\n\nfunction normalizeImplicitInternationalInput(digits: string) {\n const candidate = `+${digits}`\n const { phoneNumber, detectedCountry } = formatWithAsYouType(candidate)\n\n if (phoneNumber?.isValid() && detectedCountry) {\n return candidate\n }\n\n return null\n}\n\nfunction normalizeExplicitInternationalInput(value: string) {\n const cleaned = stripInvisibleFormatting(value).trim()\n if (!cleaned) {\n return null\n }\n\n if (cleaned.startsWith(\"+\")) {\n const digits = sanitizeDigits(cleaned)\n if (!digits) {\n return \"+\"\n }\n\n const digitsWithoutIdd = stripIddPrefix(digits)\n return digitsWithoutIdd ? `+${digitsWithoutIdd}` : \"+\"\n }\n\n const digits = sanitizeDigits(cleaned)\n if (!digits) {\n return null\n }\n\n const digitsWithoutIdd = stripIddPrefix(digits)\n if (digitsWithoutIdd !== digits) {\n return digitsWithoutIdd ? `+${digitsWithoutIdd}` : \"+\"\n }\n\n return null\n}\n\nfunction normalizeInternationalInput(value: string) {\n const explicitInternational = normalizeExplicitInternationalInput(value)\n if (explicitInternational != null) {\n return explicitInternational\n }\n\n const cleaned = stripInvisibleFormatting(value).trim()\n const digits = sanitizeDigits(cleaned)\n if (!digits) {\n return null\n }\n\n return normalizeImplicitInternationalInput(digits)\n}\n\nfunction getDialCode(country: CountryCode | null, parsedDialCode: string | undefined) {\n if (parsedDialCode) {\n return parsedDialCode\n }\n return country ? getCountryCallingCode(country) : null\n}\n\nfunction getInputValueForSelectedCountry(\n value: string,\n option: Pick<CountryOption, \"dialCode\" | \"value\">,\n options?: { allowImplicitInternational?: boolean }\n) {\n const cleaned = stripInvisibleFormatting(value).trim()\n const digits = sanitizeDigits(cleaned)\n\n if (!digits) {\n return `+${option.dialCode}`\n }\n\n const normalizedInternational =\n options?.allowImplicitInternational === false\n ? normalizeExplicitInternationalInput(cleaned)\n : normalizeInternationalInput(cleaned)\n if (normalizedInternational) {\n const normalizedDigits = sanitizeDigits(normalizedInternational)\n if (normalizedDigits.startsWith(option.dialCode)) {\n return normalizedInternational\n }\n\n const { phoneNumber } = formatWithAsYouType(normalizedInternational)\n const currentDialCode = phoneNumber?.countryCallingCode\n const nationalDigits =\n currentDialCode && normalizedDigits.startsWith(currentDialCode)\n ? normalizedDigits.slice(currentDialCode.length)\n : phoneNumber?.nationalNumber ?? normalizedDigits\n\n return `+${option.dialCode}${nationalDigits}`\n }\n\n const { phoneNumber } = formatWithAsYouType(cleaned, option.value)\n return `+${option.dialCode}${phoneNumber?.nationalNumber ?? digits}`\n}\n\nfunction preferSelectedCountry(\n parsed: ParsedInput,\n option: Pick<CountryOption, \"dialCode\" | \"value\">\n): ParsedInput {\n return {\n ...parsed,\n country: option.value,\n countryCallingCode: option.dialCode,\n lengthIssue: getLengthIssue(parsed.rawInput, option.value),\n }\n}\n\nfunction parsePhoneInput(rawValue: string | undefined, baseCountry?: CountryCode): ParsedInput {\n const cleaned = stripInvisibleFormatting(rawValue ?? \"\").trim()\n\n if (!cleaned) {\n const country = baseCountry ?? null\n const countryCallingCode = country ? getCountryCallingCode(country) : null\n\n return {\n displayValue: \"\",\n formattedInternational: \"\",\n formattedNational: \"\",\n e164: null,\n country,\n countryCallingCode,\n nationalNumber: \"\",\n rawInput: \"\",\n isValid: false,\n lengthIssue: null,\n }\n }\n\n const normalizedInternational = normalizeInternationalInput(cleaned)\n const shouldFormat = normalizedInternational != null || baseCountry != null\n\n if (!shouldFormat) {\n return {\n displayValue: cleaned,\n formattedInternational: cleaned,\n formattedNational: cleaned,\n e164: null,\n country: null,\n countryCallingCode: null,\n nationalNumber: sanitizeDigits(cleaned),\n rawInput: cleaned,\n isValid: false,\n lengthIssue: null,\n }\n }\n\n const normalized = normalizedInternational ?? cleaned\n const {\n international,\n national,\n formatted,\n phoneNumber,\n detectedCountry,\n } = formatWithAsYouType(normalized, baseCountry)\n const hasInternationalPrefix = normalizedInternational != null\n const country = hasInternationalPrefix\n ? detectedCountry ?? baseCountry ?? null\n : baseCountry ?? detectedCountry ?? null\n const countryCallingCode = getDialCode(country, phoneNumber?.countryCallingCode)\n const normalizedDigits = sanitizeDigits(normalized)\n const nationalNumber =\n phoneNumber?.nationalNumber ??\n (countryCallingCode && normalized.startsWith(\"+\")\n ? stripPrefix(normalizedDigits, countryCallingCode)\n : sanitizeDigits(cleaned))\n const displayValue = hasInternationalPrefix ? international : formatted\n\n return {\n displayValue,\n formattedInternational: phoneNumber?.formatInternational() ?? international,\n formattedNational: phoneNumber?.formatNational() ?? national,\n e164: phoneNumber?.number ?? null,\n country,\n countryCallingCode,\n nationalNumber,\n rawInput: normalized,\n isValid: phoneNumber?.isValid() ?? false,\n lengthIssue: country ? getLengthIssue(normalized, country) : null,\n }\n}\n\nexport const PhoneNumberInput = React.forwardRef<HTMLInputElement, PhoneNumberInputProps>(\n function PhoneNumberInput(props, forwardedRef) {\n const {\n value,\n defaultCountry,\n country: countryProp,\n locale,\n onChange,\n onCountryChange,\n className,\n inputClassName,\n disabled,\n readOnly,\n selectProps,\n autofillShimName,\n messages: messagesProp,\n renderValidationMessage,\n ...restProps\n } = props\n\n const {\n onFocus: onInputFocus,\n onBlur: onInputBlur,\n onKeyDown: onInputKeyDown,\n name: inputName,\n autoComplete: inputAutoComplete,\n ...restInputProps\n } = restProps\n\n const controlledCountry = typeof countryProp === \"string\" ? countryProp : null\n const localeCacheKey = getLocaleCacheKey(locale)\n const localeForBuild = React.useMemo(\n () => parseLocaleCacheKey(localeCacheKey),\n [localeCacheKey]\n )\n const resolvedMessages = React.useMemo(\n () => resolveMessages(localeForBuild, messagesProp),\n [localeForBuild, messagesProp]\n )\n const countryOptions = React.useMemo(\n () => getCachedCountryOptions(localeForBuild, localeCacheKey),\n [localeCacheKey, localeForBuild]\n )\n const resolveSelectedCountry = React.useCallback(\n (country: CountryCode): PhoneNumberSelectedCountry => {\n const match = countryOptions.find((candidate) => candidate.value === country)\n if (match) {\n return toSelectedCountry(match)\n }\n return buildFallbackSelectedCountry(country)\n },\n [countryOptions]\n )\n const menuPriorityCountry = React.useMemo(() => {\n const candidate = getValidCountry(defaultCountry ?? countryProp ?? DEFAULT_COUNTRY)\n if (countryOptions.some((option) => option.value === candidate)) {\n return candidate\n }\n return countryOptions[0]?.value ?? DEFAULT_COUNTRY\n }, [countryOptions, countryProp, defaultCountry])\n\n const initialStateRef = React.useRef<ParsedInput | null>(null)\n\n if (!initialStateRef.current) {\n const initialState = parsePhoneInput(value, controlledCountry ?? undefined)\n initialStateRef.current = initialState\n }\n\n const initialState = initialStateRef.current\n\n const [uncontrolledCountry, setUncontrolledCountry] = React.useState<CountryCode | null>(\n controlledCountry ? null : initialState.country\n )\n const [inputValueState, setInputValueState] = React.useState(initialState.displayValue)\n const [countryQuery, setCountryQuery] = React.useState(\"\")\n const [showSuggestions, setShowSuggestions] = React.useState(false)\n const [highlightedIndex, setHighlightedIndex] = React.useState<number>(-1)\n const [isFocused, setIsFocused] = React.useState(false)\n const [shouldRenderSelect, setShouldRenderSelect] = React.useState(false)\n const [lengthIssue, setLengthIssue] = React.useState<LengthIssue | null>(\n initialState.lengthIssue\n )\n\n const manualSelectionCountryRef = React.useRef<CountryCode | null>(null)\n const keyboardBufferRef = React.useRef(\"\")\n const bufferTimeoutRef = React.useRef<number | null>(null)\n const scrollBehaviorRef = React.useRef<ScrollBehavior>(\"smooth\")\n const pendingSelectionRef = React.useRef<{ start: number; end: number } | null>(null)\n const hasNotifiedCountryRef = React.useRef(false)\n const lastNotifiedCountryRef = React.useRef<CountryCode | null>(null)\n const inputRef = React.useRef<HTMLInputElement | null>(null)\n\n const activeCountry = controlledCountry ?? uncontrolledCountry\n const explicitFormattingCountry = controlledCountry ?? manualSelectionCountryRef.current ?? undefined\n\n React.useImperativeHandle(forwardedRef, () => inputRef.current as HTMLInputElement, [])\n\n React.useLayoutEffect(() => {\n setShouldRenderSelect(true)\n }, [])\n\n React.useLayoutEffect(() => {\n const selection = pendingSelectionRef.current\n if (!selection) {\n return\n }\n\n const input = inputRef.current\n pendingSelectionRef.current = null\n if (!input) {\n return\n }\n\n const { start, end } = selection\n input.setSelectionRange(start, end)\n }, [inputValueState])\n\n const selectOverrides = selectProps ?? {}\n const generatedSelectInstanceId = React.useId()\n const {\n styles: userSelectStyles,\n components: userSelectComponents,\n classNamePrefix: userClassNamePrefix,\n formatOptionLabel: userFormatOptionLabel,\n menuPortalTarget: userMenuPortalTarget,\n menuPosition: userMenuPosition,\n ...forwardedSelectProps\n } = selectOverrides\n const {\n instanceId: userSelectInstanceId,\n noOptionsMessage,\n ...restForwardedSelectProps\n } = forwardedSelectProps\n const selectInstanceId = userSelectInstanceId ?? generatedSelectInstanceId\n const [defaultMenuPortalTarget, setDefaultMenuPortalTarget] =\n React.useState<HTMLElement | null>(null)\n const hasUserMenuPortalTarget = \"menuPortalTarget\" in selectOverrides\n const menuPortalTarget = hasUserMenuPortalTarget\n ? userMenuPortalTarget\n : defaultMenuPortalTarget\n\n const mergedSelectStyles = React.useMemo<StylesConfig<CountryOption, false>>(\n () => {\n const userMenuPortal = userSelectStyles?.menuPortal\n\n return {\n ...suggestionSelectStyles,\n ...(userSelectStyles ?? {}),\n menuPortal: (provided, state) => {\n const baseWithZIndex = {\n ...provided,\n zIndex: 1300,\n }\n const base = userMenuPortal ? userMenuPortal(baseWithZIndex, state) : baseWithZIndex\n\n if (typeof document === \"undefined\" || !menuPortalTarget || menuPortalTarget === document.body) {\n return base\n }\n\n const portalRect = menuPortalTarget.getBoundingClientRect()\n return {\n ...base,\n left: typeof base.left === \"number\" ? base.left - portalRect.left : base.left,\n top: typeof base.top === \"number\" ? base.top - portalRect.top : base.top,\n }\n },\n }\n },\n [menuPortalTarget, userSelectStyles]\n )\n\n React.useLayoutEffect(() => {\n if (hasUserMenuPortalTarget || typeof document === \"undefined\") {\n return\n }\n\n const portalTarget =\n inputRef.current?.closest<HTMLElement>(\n \"[data-slot='dialog-content'], [data-slot='sheet-content'], [role='dialog']\"\n ) ?? document.body\n setDefaultMenuPortalTarget(portalTarget)\n }, [hasUserMenuPortalTarget])\n\n const mergedSelectComponents = React.useMemo(() => {\n const baseComponents = {\n Control: HiddenControl,\n IndicatorsContainer: NullComponent,\n DropdownIndicator: NullComponent,\n IndicatorSeparator: NullComponent,\n ValueContainer: NullComponent,\n }\n\n const overrides = userSelectComponents ?? {}\n\n if (!overrides.Option) {\n return {\n ...baseComponents,\n ...overrides,\n Option: SuggestionOption,\n }\n }\n\n return {\n ...baseComponents,\n ...overrides,\n }\n }, [userSelectComponents])\n\n React.useEffect(() => () => {\n if (bufferTimeoutRef.current != null && typeof window !== \"undefined\") {\n window.clearTimeout(bufferTimeoutRef.current)\n }\n }, [])\n\n React.useEffect(() => {\n if (value == null) {\n return\n }\n\n const parsed = parsePhoneInput(value, explicitFormattingCountry)\n keyboardBufferRef.current = \"\"\n\n setInputValueState(parsed.displayValue)\n setShowSuggestions(false)\n setCountryQuery(\"\")\n setHighlightedIndex(-1)\n setLengthIssue(parsed.lengthIssue)\n\n if (!controlledCountry && parsed.country !== uncontrolledCountry) {\n setUncontrolledCountry(parsed.country)\n }\n }, [controlledCountry, explicitFormattingCountry, uncontrolledCountry, value])\n\n React.useEffect(() => {\n const country = activeCountry ?? null\n if (!hasNotifiedCountryRef.current && country == null) {\n return\n }\n\n if (hasNotifiedCountryRef.current && lastNotifiedCountryRef.current === country) {\n return\n }\n\n hasNotifiedCountryRef.current = true\n lastNotifiedCountryRef.current = country\n onCountryChange?.(country, country ? resolveSelectedCountry(country) : null)\n }, [activeCountry, onCountryChange, resolveSelectedCountry])\n\n const emitChange = React.useCallback(\n (details: Omit<PhoneNumberChangeDetails, \"selectedCountry\">) => {\n onChange?.({\n ...details,\n selectedCountry: details.country ? resolveSelectedCountry(details.country) : null,\n })\n },\n [onChange, resolveSelectedCountry]\n )\n\n const scheduleBufferReset = React.useCallback(() => {\n if (typeof window === \"undefined\") {\n return\n }\n\n if (bufferTimeoutRef.current != null) {\n window.clearTimeout(bufferTimeoutRef.current)\n }\n\n bufferTimeoutRef.current = window.setTimeout(() => {\n keyboardBufferRef.current = \"\"\n bufferTimeoutRef.current = null\n }, 800)\n }, [])\n\n const applyParsedInput = React.useCallback(\n (parsed: ParsedInput, snapshot: ReturnType<typeof captureSelectionSnapshot> | null) => {\n setInputValueState(parsed.displayValue)\n setShowSuggestions(false)\n setCountryQuery(\"\")\n setHighlightedIndex(-1)\n setLengthIssue(parsed.lengthIssue)\n\n if (!controlledCountry && parsed.country !== uncontrolledCountry) {\n setUncontrolledCountry(parsed.country)\n }\n\n if (snapshot) {\n pendingSelectionRef.current = resolveSelection(snapshot, parsed.displayValue)\n }\n\n emitChange({\n formattedInternational: parsed.formattedInternational,\n formattedNational: parsed.formattedNational,\n e164: parsed.e164,\n country: parsed.country,\n countryCallingCode: parsed.countryCallingCode,\n nationalNumber: parsed.nationalNumber,\n rawInput: parsed.rawInput,\n isValid: parsed.isValid,\n })\n },\n [controlledCountry, emitChange, uncontrolledCountry]\n )\n\n const handleInputChange = React.useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n const target = event.target\n const snapshot = captureSelectionSnapshot(target)\n const raw = target.value\n keyboardBufferRef.current = \"\"\n\n const normalizedExplicitInternational = normalizeExplicitInternationalInput(raw)\n const manualCountry = manualSelectionCountryRef.current\n if (normalizedExplicitInternational != null && manualCountry) {\n const manualDialCode = getCountryCallingCode(manualCountry)\n if (!sanitizeDigits(normalizedExplicitInternational).startsWith(manualDialCode)) {\n manualSelectionCountryRef.current = null\n }\n } else if (normalizedExplicitInternational != null) {\n manualSelectionCountryRef.current = null\n }\n\n const activeManualCountry = manualSelectionCountryRef.current\n const rawDigits = sanitizeDigits(raw)\n if (\n !controlledCountry &&\n activeManualCountry &&\n normalizedExplicitInternational == null &&\n rawDigits\n ) {\n const manualOption = {\n value: activeManualCountry,\n dialCode: getCountryCallingCode(activeManualCountry),\n }\n const parsed = preferSelectedCountry(\n parsePhoneInput(\n getInputValueForSelectedCountry(\n raw,\n {\n value: manualOption.value,\n dialCode: manualOption.dialCode,\n },\n { allowImplicitInternational: false }\n ),\n activeManualCountry\n ),\n manualOption\n )\n applyParsedInput(parsed, snapshot)\n return\n }\n\n const baseCountry = controlledCountry ?? activeManualCountry ?? undefined\n const parsed = parsePhoneInput(raw, baseCountry)\n applyParsedInput(parsed, snapshot)\n },\n [applyParsedInput, controlledCountry]\n )\n\n const handleCountrySelect = React.useCallback(\n (option: SingleValue<CountryOption>) => {\n if (!option) {\n return\n }\n\n manualSelectionCountryRef.current = option.value\n const nextInputValue = getInputValueForSelectedCountry(inputValueState, option)\n const parsed = preferSelectedCountry(\n parsePhoneInput(nextInputValue, option.value),\n option\n )\n\n setInputValueState(parsed.displayValue)\n pendingSelectionRef.current = {\n start: parsed.displayValue.length,\n end: parsed.displayValue.length,\n }\n setShowSuggestions(false)\n setCountryQuery(\"\")\n setHighlightedIndex(-1)\n setLengthIssue(parsed.lengthIssue)\n\n if (!controlledCountry) {\n setUncontrolledCountry(option.value)\n }\n\n emitChange({\n formattedInternational: parsed.formattedInternational,\n formattedNational: parsed.formattedNational,\n e164: parsed.e164,\n country: parsed.country,\n countryCallingCode: parsed.countryCallingCode,\n nationalNumber: parsed.nationalNumber,\n rawInput: parsed.rawInput,\n isValid: parsed.isValid,\n })\n\n requestAnimationFrame(() => {\n inputRef.current?.focus()\n })\n },\n [controlledCountry, emitChange, inputValueState]\n )\n\n const filteredOptions = React.useMemo(() => {\n if (!showSuggestions) {\n return [] as CountryOption[]\n }\n\n const results: CountryOption[] = []\n\n const pushUnique = (option: CountryOption | undefined) => {\n if (option && !results.some((existing) => existing.value === option.value)) {\n results.push(option)\n }\n }\n\n const priorityOption = countryOptions.find((option) => option.value === menuPriorityCountry)\n const currentOption = activeCountry\n ? countryOptions.find((option) => option.value === activeCountry)\n : undefined\n const query = countryQuery.trim()\n const digitQuery = sanitizeDigits(query)\n const normalizedQuery = normalizeSearchValue(query)\n\n if (!digitQuery && !normalizedQuery) {\n pushUnique(currentOption)\n pushUnique(priorityOption)\n countryOptions.forEach(pushUnique)\n return results\n }\n\n if (digitQuery) {\n const dialMatches = countryOptions\n .filter((option) => option.dialCode.startsWith(digitQuery))\n .sort((a, b) => {\n const aExact = a.dialCode === digitQuery\n const bExact = b.dialCode === digitQuery\n if (aExact && !bExact) {\n return -1\n }\n if (!aExact && bExact) {\n return 1\n }\n return a.dialCode.length - b.dialCode.length\n })\n dialMatches.forEach(pushUnique)\n }\n\n if (normalizedQuery) {\n const nameMatches = countryOptions\n .filter((option) =>\n option.normalizedSearchableTokens.some((token) => token.includes(normalizedQuery))\n )\n .sort((a, b) => {\n const aIndex = optionMatchIndex(a.normalizedSearchableTokens, normalizedQuery)\n const bIndex = optionMatchIndex(b.normalizedSearchableTokens, normalizedQuery)\n if (aIndex !== bIndex) {\n return aIndex - bIndex\n }\n return a.name.localeCompare(b.name)\n })\n nameMatches.forEach(pushUnique)\n }\n\n pushUnique(currentOption)\n pushUnique(priorityOption)\n if (results.length === 0) {\n countryOptions.forEach(pushUnique)\n }\n\n return results\n }, [activeCountry, countryOptions, countryQuery, menuPriorityCountry, showSuggestions])\n\n const suggestionMenuIsOpen = isFocused && showSuggestions && filteredOptions.length > 0\n\n React.useEffect(() => {\n if (!suggestionMenuIsOpen) {\n scrollBehaviorRef.current = \"smooth\"\n }\n }, [suggestionMenuIsOpen])\n\n React.useEffect(() => {\n if (!suggestionMenuIsOpen) {\n setHighlightedIndex(-1)\n return\n }\n\n if (filteredOptions.length === 0) {\n setHighlightedIndex(-1)\n return\n }\n\n setHighlightedIndex((current) => {\n if (current < 0 || current >= filteredOptions.length) {\n return 0\n }\n return current\n })\n }, [filteredOptions, suggestionMenuIsOpen])\n\n const highlightedOption =\n highlightedIndex >= 0 ? filteredOptions[highlightedIndex] ?? null : null\n\n React.useEffect(() => {\n if (highlightedIndex < 0) {\n scrollBehaviorRef.current = \"smooth\"\n }\n }, [highlightedIndex])\n\n const consumeScrollBehavior = React.useCallback(() => {\n const behavior = scrollBehaviorRef.current\n scrollBehaviorRef.current = \"smooth\"\n return behavior\n }, [])\n\n const updateHighlightedOption = React.useCallback(\n (option: CountryOption) => {\n const index = filteredOptions.findIndex((candidate) => candidate.value === option.value)\n if (index !== -1) {\n setHighlightedIndex(index)\n }\n },\n [filteredOptions]\n )\n\n const selectFormatOptionLabel = React.useCallback<\n NonNullable<SelectProps<CountryOption, false>[\"formatOptionLabel\"]>\n >(\n (option, meta) => {\n if (userFormatOptionLabel) {\n return userFormatOptionLabel(option, meta)\n }\n return formatCountryOption(option)\n },\n [userFormatOptionLabel]\n )\n\n const optionLabelRenderer = React.useCallback(\n (option: CountryOption) =>\n selectFormatOptionLabel(option, {\n context: \"menu\",\n inputValue: countryQuery,\n selectValue: [],\n }),\n [countryQuery, selectFormatOptionLabel]\n )\n\n const highlightContextValue = React.useMemo<SuggestionContextValue>(\n () => ({\n highlightedValue: highlightedOption?.value ?? null,\n setHighlightedOption: updateHighlightedOption,\n renderOptionLabel: optionLabelRenderer,\n consumeScrollBehavior,\n }),\n [consumeScrollBehavior, highlightedOption, optionLabelRenderer, updateHighlightedOption]\n )\n\n const activeOption = activeCountry\n ? countryOptions.find((option) => option.value === activeCountry)\n : undefined\n const activeFlag = activeOption?.flag ?? \"\"\n const inlineFlagLabel = activeCountry\n ? resolvedMessages.selectedCountryLabel(activeOption?.name ?? activeCountry)\n : resolvedMessages.selectCountryLabel\n const hasInlineFlag = Boolean(activeCountry && activeFlag)\n const lengthHint =\n lengthIssue === \"TOO_LONG\"\n ? resolvedMessages.lengthTooLong(activeOption?.name ?? activeCountry ?? null)\n : null\n const countryName = activeOption?.name ?? activeCountry ?? null\n\n let validationNode: React.ReactNode = null\n if (lengthHint) {\n const rendered = renderValidationMessage?.({\n message: lengthHint,\n code: \"TOO_LONG\",\n countryName,\n })\n validationNode =\n rendered === undefined ? (\n <p className=\"mt-1 text-xs text-destructive\">\n <span>{lengthHint}</span>\n </p>\n ) : (\n rendered\n )\n }\n\n const appendToBuffer = React.useCallback(\n (char: string) => {\n keyboardBufferRef.current = `${keyboardBufferRef.current}${char}`.slice(-12)\n setCountryQuery(keyboardBufferRef.current)\n setShowSuggestions(true)\n scheduleBufferReset()\n },\n [scheduleBufferReset]\n )\n\n const popBuffer = React.useCallback(() => {\n const current = keyboardBufferRef.current\n if (!current) {\n return\n }\n keyboardBufferRef.current = current.slice(0, -1)\n setCountryQuery(keyboardBufferRef.current)\n if (keyboardBufferRef.current) {\n scheduleBufferReset()\n }\n }, [scheduleBufferReset])\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLInputElement>) => {\n onInputKeyDown?.(event)\n if (event.defaultPrevented) {\n return\n }\n\n const key = event.key\n\n if (event.metaKey || event.ctrlKey || event.altKey) {\n return\n }\n\n const target = event.currentTarget\n const value = target.value\n const selectionStart = target.selectionStart ?? 0\n const selectionEnd = target.selectionEnd ?? selectionStart\n const isCollapsedSelection = selectionStart === selectionEnd\n\n if (key === \"Backspace\" && isCollapsedSelection) {\n const nextStart = skipFormattingCharactersLeft(value, selectionStart)\n if (nextStart !== selectionStart) {\n target.setSelectionRange(nextStart, nextStart)\n }\n } else if (key === \"ArrowLeft\" && isCollapsedSelection) {\n const nextStart = skipFormattingCharactersLeft(value, selectionStart)\n if (nextStart !== selectionStart) {\n event.preventDefault()\n target.setSelectionRange(nextStart, nextStart)\n return\n }\n } else if (key === \"ArrowRight\" && isCollapsedSelection) {\n const nextStart = skipFormattingCharactersRight(value, selectionEnd)\n if (nextStart !== selectionEnd) {\n event.preventDefault()\n target.setSelectionRange(nextStart, nextStart)\n return\n }\n }\n\n if (key === \"ArrowDown\") {\n scrollBehaviorRef.current = event.repeat ? \"auto\" : \"smooth\"\n event.preventDefault()\n if (!showSuggestions) {\n setShowSuggestions(true)\n setHighlightedIndex(filteredOptions.length > 0 ? 0 : -1)\n return\n }\n\n if (filteredOptions.length > 0) {\n setHighlightedIndex((current) => {\n const next = current < 0 ? 0 : (current + 1) % filteredOptions.length\n return next\n })\n }\n return\n }\n\n if (key === \"ArrowUp\") {\n scrollBehaviorRef.current = event.repeat ? \"auto\" : \"smooth\"\n event.preventDefault()\n if (!showSuggestions) {\n setShowSuggestions(true)\n setHighlightedIndex(filteredOptions.length > 0 ? filteredOptions.length - 1 : -1)\n return\n }\n\n if (filteredOptions.length > 0) {\n setHighlightedIndex((current) => {\n if (current < 0) {\n return filteredOptions.length - 1\n }\n return (current - 1 + filteredOptions.length) % filteredOptions.length\n })\n }\n return\n }\n\n if (/^[a-z]$/i.test(key)) {\n event.preventDefault()\n if (!showSuggestions) {\n setShowSuggestions(true)\n setHighlightedIndex(filteredOptions.length > 0 ? 0 : -1)\n }\n appendToBuffer(key.toLowerCase())\n return\n }\n\n if (suggestionMenuIsOpen) {\n if (key === \"Backspace\" && keyboardBufferRef.current) {\n event.preventDefault()\n popBuffer()\n return\n }\n\n if (key === \"Escape\") {\n event.preventDefault()\n keyboardBufferRef.current = \"\"\n setCountryQuery(\"\")\n setShowSuggestions(false)\n return\n }\n\n if (key === \"Enter\" && filteredOptions.length > 0) {\n event.preventDefault()\n const targetOption = highlightedOption ?? filteredOptions[0]\n handleCountrySelect(targetOption)\n return\n }\n }\n },\n [\n appendToBuffer,\n filteredOptions,\n handleCountrySelect,\n highlightedOption,\n onInputKeyDown,\n popBuffer,\n showSuggestions,\n suggestionMenuIsOpen,\n ]\n )\n\n const handleFocus = React.useCallback(\n (event: React.FocusEvent<HTMLInputElement>) => {\n setIsFocused(true)\n onInputFocus?.(event)\n },\n [onInputFocus]\n )\n\n const handleBlur = React.useCallback(\n (event: React.FocusEvent<HTMLInputElement>) => {\n setIsFocused(false)\n setShowSuggestions(false)\n keyboardBufferRef.current = \"\"\n setCountryQuery(\"\")\n onInputBlur?.(event)\n },\n [onInputBlur]\n )\n\n const openCountryMenu = React.useCallback(() => {\n if (disabled || readOnly) {\n return\n }\n\n keyboardBufferRef.current = \"\"\n setCountryQuery(\"\")\n setShowSuggestions(true)\n setHighlightedIndex((current) => (current < 0 ? 0 : current))\n\n requestAnimationFrame(() => {\n inputRef.current?.focus()\n })\n }, [disabled, readOnly])\n\n const shimName = autofillShimName ?? (inputName ? `${inputName}_shim` : undefined)\n\n return (\n <div className={cn(\"relative flex flex-col\", className)}>\n <div className=\"relative\">\n <input\n {...restInputProps}\n ref={inputRef}\n type=\"tel\"\n className={cn(\n \"flex h-10 w-full rounded-md border border-input bg-background py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n \"pl-11 pr-3\",\n inputClassName\n )}\n name={inputName}\n value={inputValueState}\n onChange={handleInputChange}\n onFocus={handleFocus}\n onBlur={handleBlur}\n onKeyDown={handleKeyDown}\n disabled={disabled}\n readOnly={readOnly}\n autoComplete={inputAutoComplete ?? \"off\"}\n />\n <button\n type=\"button\"\n className={cn(\n \"absolute left-3 top-1/2 flex h-6 w-6 -translate-y-1/2 items-center justify-center rounded border text-lg leading-none transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n hasInlineFlag\n ? \"border-transparent\"\n : \"border-dashed border-border text-muted-foreground\",\n disabled\n ? \"cursor-not-allowed opacity-50\"\n : readOnly\n ? \"cursor-default\"\n : \"cursor-pointer hover:bg-muted\"\n )}\n aria-label={inlineFlagLabel}\n onMouseDown={(event) => event.preventDefault()}\n onClick={openCountryMenu}\n tabIndex={-1}\n disabled={disabled}\n >\n <span aria-hidden=\"true\">\n {hasInlineFlag ? activeFlag : \"?\"}\n </span>\n </button>\n </div>\n\n {shimName ? (\n <input\n tabIndex={-1}\n autoComplete=\"tel\"\n name={shimName}\n aria-hidden=\"true\"\n className=\"pointer-events-none absolute left-0 top-0 h-0 w-0 opacity-0\"\n />\n ) : null}\n\n <div\n className=\"absolute left-0 top-full z-30 mt-1\"\n style={{\n pointerEvents: suggestionMenuIsOpen ? \"auto\" : \"none\",\n width: \"min(260px, 100%)\",\n }}\n onMouseDown={(event) => event.preventDefault()}\n >\n {shouldRenderSelect ? (\n <SuggestionContext.Provider value={highlightContextValue}>\n <Select<CountryOption, false>\n {...restForwardedSelectProps}\n instanceId={selectInstanceId}\n menuIsOpen={suggestionMenuIsOpen}\n options={filteredOptions}\n value={null}\n components={mergedSelectComponents}\n styles={mergedSelectStyles}\n isClearable={false}\n isSearchable={false}\n backspaceRemovesValue={false}\n tabSelectsValue={false}\n menuShouldScrollIntoView={false}\n menuPortalTarget={menuPortalTarget}\n menuPosition={userMenuPosition ?? (menuPortalTarget ? \"fixed\" : \"absolute\")}\n onChange={handleCountrySelect}\n classNamePrefix={userClassNamePrefix ?? \"phone-number-suggestions\"}\n placeholder=\"\"\n formatOptionLabel={selectFormatOptionLabel}\n noOptionsMessage={\n noOptionsMessage ?? (() => resolvedMessages.noMatches)\n }\n />\n </SuggestionContext.Provider>\n ) : null}\n </div>\n\n {validationNode}\n </div>\n )\n }\n)\n\nPhoneNumberInput.displayName = \"PhoneNumberInput\"\n"],"mappings":";;;;;;;;;;;AA+DA,IAAM0C,IACJ;AAOF,SAASK,EAAyBC,GAAe;CAC/C,OAAOA,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AAUA,EAAMwF,eAAe;cAE5C3K,KACC,kBAAC,GAAkB,UAAnB;KAA4B,OAAOwI;eACjC,kBAAC,IAAD;MACE,GAAIhG;MACJ,YAAYC;MACZ,YAAYiF;MACZ,SAASzB;MACT,OAAO;MACP,YAAYnC;MACZ,QAAQhB;MACR,aAAa;MACb,cAAc;MACd,uBAAuB;MACvB,iBAAiB;MACjB,0BAA0B;MACRd;MAClB,cAAcG,OAAqBH,IAAmB,UAAU;MAChE,UAAU6D;MACV,iBAAiBhE,MAAuB;MACxC,aAAY;MACZ,mBAAmBoG;MACnB,kBACE1F,aAA2BjE,EAAiBkN;KAC7C,CAAA;IAEuB,CAAA,IAC1B;GACD,CAAA;GAEJjC;EACE;;AAET,CACF;AAEApN,EAAiBsP,cAAc"}
1
+ {"version":3,"file":"index363.js","names":["React"],"sources":["../../../node_modules/@base-ui/utils/useOnFirstRender.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nexport function useOnFirstRender(fn) {\n const ref = React.useRef(true);\n if (ref.current) {\n ref.current = false;\n fn();\n }\n}"],"x_google_ignoreList":[0],"mappings":";;;AAGA,SAAgB,EAAiB,GAAI;CACnC,IAAM,IAAMA,EAAM,OAAO,EAAI;CAC7B,AAAI,EAAI,YACN,EAAI,UAAU,IACd,EAAG;AAEP"}
package/dist/index364.js CHANGED
@@ -6,7 +6,7 @@ function t(t) {
6
6
  current: t,
7
7
  previous: null
8
8
  });
9
- return t !== n.current && r({
9
+ return Object.is(t, n.current) || r({
10
10
  current: t,
11
11
  previous: n.current
12
12
  }), n.previous;
@@ -1 +1 @@
1
- {"version":3,"file":"index364.js","names":["React"],"sources":["../../../node_modules/@base-ui/utils/usePreviousValue.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\n/**\n * Returns a previous value of its argument.\n * @param value Current value.\n * @returns Previous value, or null if there is no previous value.\n */\nexport function usePreviousValue(value) {\n const [state, setState] = React.useState({\n current: value,\n previous: null\n });\n if (value !== state.current) {\n setState({\n current: value,\n previous: state.current\n });\n }\n return state.previous;\n}"],"x_google_ignoreList":[0],"mappings":";;;AASA,SAAgB,EAAiB,GAAO;CACtC,IAAM,CAAC,GAAO,KAAYA,EAAM,SAAS;EACvC,SAAS;EACT,UAAU;CACZ,CAAC;CAOD,OANI,MAAU,EAAM,WAClB,EAAS;EACP,SAAS;EACT,UAAU,EAAM;CAClB,CAAC,GAEI,EAAM;AACf"}
1
+ {"version":3,"file":"index364.js","names":["React"],"sources":["../../../node_modules/@base-ui/utils/usePreviousValue.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\n/**\n * Returns a previous value of its argument.\n * @param value Current value.\n * @returns Previous value, or null if there is no previous value.\n */\nexport function usePreviousValue(value) {\n const [state, setState] = React.useState({\n current: value,\n previous: null\n });\n if (!Object.is(value, state.current)) {\n setState({\n current: value,\n previous: state.current\n });\n }\n return state.previous;\n}"],"x_google_ignoreList":[0],"mappings":";;;AASA,SAAgB,EAAiB,GAAO;CACtC,IAAM,CAAC,GAAO,KAAYA,EAAM,SAAS;EACvC,SAAS;EACT,UAAU;CACZ,CAAC;CAOD,OANK,OAAO,GAAG,GAAO,EAAM,OAAO,KACjC,EAAS;EACP,SAAS;EACT,UAAU,EAAM;CAClB,CAAC,GAEI,EAAM;AACf"}
package/dist/index367.js CHANGED
@@ -4,19 +4,12 @@ import * as t from "react";
4
4
  //#region ../../node_modules/@base-ui/react/select/root/SelectRootContext.mjs
5
5
  var n = /*#__PURE__*/ t.createContext(null);
6
6
  process.env.NODE_ENV !== "production" && (n.displayName = "SelectRootContext");
7
- var r = /*#__PURE__*/ t.createContext(null);
8
- process.env.NODE_ENV !== "production" && (r.displayName = "SelectFloatingContext");
9
- function i() {
7
+ function r() {
10
8
  let r = t.useContext(n);
11
9
  if (r === null) throw Error(process.env.NODE_ENV === "production" ? e(60) : "Base UI: SelectRootContext is missing. Select parts must be placed within <Select.Root>.");
12
10
  return r;
13
11
  }
14
- function a() {
15
- let n = t.useContext(r);
16
- if (n === null) throw Error(process.env.NODE_ENV === "production" ? e(61) : "Base UI: SelectFloatingContext is missing. Select parts must be placed within <Select.Root>.");
17
- return n;
18
- }
19
12
  //#endregion
20
- export { r as SelectFloatingContext, n as SelectRootContext, a as useSelectFloatingContext, i as useSelectRootContext };
13
+ export { n as SelectRootContext, r as useSelectRootContext };
21
14
 
22
15
  //# sourceMappingURL=index367.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index367.js","names":["React","_formatErrorMessage"],"sources":["../../../node_modules/@base-ui/react/select/root/SelectRootContext.mjs"],"sourcesContent":["'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const SelectRootContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") SelectRootContext.displayName = \"SelectRootContext\";\nexport const SelectFloatingContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") SelectFloatingContext.displayName = \"SelectFloatingContext\";\nexport function useSelectRootContext() {\n const context = React.useContext(SelectRootContext);\n if (context === null) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: SelectRootContext is missing. Select parts must be placed within <Select.Root>.' : _formatErrorMessage(60));\n }\n return context;\n}\nexport function useSelectFloatingContext() {\n const context = React.useContext(SelectFloatingContext);\n if (context === null) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: SelectFloatingContext is missing. Select parts must be placed within <Select.Root>.' : _formatErrorMessage(61));\n }\n return context;\n}"],"x_google_ignoreList":[0],"mappings":";;;;AAIA,IAAa,IAAiC,gBAAM,cAAc,IAAI;AACtE,QAAA,IAAA,aAA6B,iBAAc,EAAkB,cAAc;AAC3E,IAAa,IAAqC,gBAAM,cAAc,IAAI;AAC1E,QAAA,IAAA,aAA6B,iBAAc,EAAsB,cAAc;AAC/E,SAAgB,IAAuB;CACrC,IAAM,IAAUA,EAAM,WAAW,CAAiB;CAClD,IAAI,MAAY,MACd,MAAU,MAAA,QAAA,IAAA,aAA+B,eAA4GC,EAAoB,EAAE,IAAnH,0FAAoH;CAE9K,OAAO;AACT;AACA,SAAgB,IAA2B;CACzC,IAAM,IAAUD,EAAM,WAAW,CAAqB;CACtD,IAAI,MAAY,MACd,MAAU,MAAA,QAAA,IAAA,aAA+B,eAAgHC,EAAoB,EAAE,IAAvH,8FAAwH;CAElL,OAAO;AACT"}
1
+ {"version":3,"file":"index367.js","names":["React","_formatErrorMessage"],"sources":["../../../node_modules/@base-ui/react/select/root/SelectRootContext.mjs"],"sourcesContent":["'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const SelectRootContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") SelectRootContext.displayName = \"SelectRootContext\";\nexport function useSelectRootContext() {\n const context = React.useContext(SelectRootContext);\n if (context === null) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: SelectRootContext is missing. Select parts must be placed within <Select.Root>.' : _formatErrorMessage(60));\n }\n return context;\n}"],"x_google_ignoreList":[0],"mappings":";;;;AAIA,IAAa,IAAiC,gBAAM,cAAc,IAAI;AACtE,QAAA,IAAA,aAA6B,iBAAc,EAAkB,cAAc;AAC3E,SAAgB,IAAuB;CACrC,IAAM,IAAUA,EAAM,WAAW,CAAiB;CAClD,IAAI,MAAY,MACd,MAAU,MAAA,QAAA,IAAA,aAA+B,eAA4GC,EAAoB,EAAE,IAAnH,0FAAoH;CAE9K,OAAO;AACT"}
package/dist/index368.js CHANGED
@@ -1,8 +1,29 @@
1
- //#region ../../node_modules/@base-ui/react/field/control/FieldControlDataAttributes.mjs
2
- var e = /*#__PURE__*/ function(e) {
3
- return e.disabled = "data-disabled", e.valid = "data-valid", e.invalid = "data-invalid", e.touched = "data-touched", e.dirty = "data-dirty", e.filled = "data-filled", e.focused = "data-focused", e;
4
- }({});
1
+ //#region ../../node_modules/@base-ui/react/internals/field-constants/constants.mjs
2
+ var e = {
3
+ badInput: !1,
4
+ customError: !1,
5
+ patternMismatch: !1,
6
+ rangeOverflow: !1,
7
+ rangeUnderflow: !1,
8
+ stepMismatch: !1,
9
+ tooLong: !1,
10
+ tooShort: !1,
11
+ typeMismatch: !1,
12
+ valid: null,
13
+ valueMissing: !1
14
+ }, t = {
15
+ valid: null,
16
+ touched: !1,
17
+ dirty: !1,
18
+ filled: !1,
19
+ focused: !1
20
+ }, n = {
21
+ disabled: !1,
22
+ ...t
23
+ }, r = { valid(e) {
24
+ return e === null ? null : e ? { "data-valid": "" } : { "data-invalid": "" };
25
+ } };
5
26
  //#endregion
6
- export { e as FieldControlDataAttributes };
27
+ export { n as DEFAULT_FIELD_ROOT_STATE, t as DEFAULT_FIELD_STATE_ATTRIBUTES, e as DEFAULT_VALIDITY_STATE, r as fieldValidityMapping };
7
28
 
8
29
  //# sourceMappingURL=index368.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index368.js","names":[],"sources":["../../../node_modules/@base-ui/react/field/control/FieldControlDataAttributes.mjs"],"sourcesContent":["export let FieldControlDataAttributes = /*#__PURE__*/function (FieldControlDataAttributes) {\n /**\n * Present when the field is disabled.\n */\n FieldControlDataAttributes[\"disabled\"] = \"data-disabled\";\n /**\n * Present when the field is in a valid state.\n */\n FieldControlDataAttributes[\"valid\"] = \"data-valid\";\n /**\n * Present when the field is in an invalid state.\n */\n FieldControlDataAttributes[\"invalid\"] = \"data-invalid\";\n /**\n * Present when the field has been touched.\n */\n FieldControlDataAttributes[\"touched\"] = \"data-touched\";\n /**\n * Present when the field's value has changed.\n */\n FieldControlDataAttributes[\"dirty\"] = \"data-dirty\";\n /**\n * Present when the field is filled.\n */\n FieldControlDataAttributes[\"filled\"] = \"data-filled\";\n /**\n * Present when the field control is focused.\n */\n FieldControlDataAttributes[\"focused\"] = \"data-focused\";\n return FieldControlDataAttributes;\n}({});"],"x_google_ignoreList":[0],"mappings":";AAAA,IAAW,IAA0C,uBAAU,GAA4B;CA6BzF,OAzBA,EAA2B,WAAc,iBAIzC,EAA2B,QAAW,cAItC,EAA2B,UAAa,gBAIxC,EAA2B,UAAa,gBAIxC,EAA2B,QAAW,cAItC,EAA2B,SAAY,eAIvC,EAA2B,UAAa,gBACjC;AACT,EAAE,CAAC,CAAC"}
1
+ {"version":3,"file":"index368.js","names":[],"sources":["../../../node_modules/@base-ui/react/internals/field-constants/constants.mjs"],"sourcesContent":["export const DEFAULT_VALIDITY_STATE = {\n badInput: false,\n customError: false,\n patternMismatch: false,\n rangeOverflow: false,\n rangeUnderflow: false,\n stepMismatch: false,\n tooLong: false,\n tooShort: false,\n typeMismatch: false,\n valid: null,\n valueMissing: false\n};\nexport const DEFAULT_FIELD_STATE_ATTRIBUTES = {\n valid: null,\n touched: false,\n dirty: false,\n filled: false,\n focused: false\n};\nexport const DEFAULT_FIELD_ROOT_STATE = {\n disabled: false,\n ...DEFAULT_FIELD_STATE_ATTRIBUTES\n};\nexport const fieldValidityMapping = {\n valid(value) {\n if (value === null) {\n return null;\n }\n if (value) {\n return {\n 'data-valid': ''\n };\n }\n return {\n 'data-invalid': ''\n };\n }\n};"],"x_google_ignoreList":[0],"mappings":";AAAA,IAAa,IAAyB;CACpC,UAAU;CACV,aAAa;CACb,iBAAiB;CACjB,eAAe;CACf,gBAAgB;CAChB,cAAc;CACd,SAAS;CACT,UAAU;CACV,cAAc;CACd,OAAO;CACP,cAAc;AAChB,GACa,IAAiC;CAC5C,OAAO;CACP,SAAS;CACT,OAAO;CACP,QAAQ;CACR,SAAS;AACX,GACa,IAA2B;CACtC,UAAU;CACV,GAAG;AACL,GACa,IAAuB,EAClC,MAAM,GAAO;CASX,OARI,MAAU,OACL,OAEL,IACK,EACL,cAAc,GAChB,IAEK,EACL,gBAAgB,GAClB;AACF,EACF"}
package/dist/index369.js CHANGED
@@ -1,30 +1,46 @@
1
- import { FieldControlDataAttributes as e } from "./index368.js";
2
- //#region ../../node_modules/@base-ui/react/internals/field-constants/constants.mjs
3
- var t = {
4
- badInput: !1,
5
- customError: !1,
6
- patternMismatch: !1,
7
- rangeOverflow: !1,
8
- rangeUnderflow: !1,
9
- stepMismatch: !1,
10
- tooLong: !1,
11
- tooShort: !1,
12
- typeMismatch: !1,
13
- valid: null,
14
- valueMissing: !1
15
- }, n = {
16
- valid: null,
17
- touched: !1,
18
- dirty: !1,
19
- filled: !1,
20
- focused: !1
21
- }, r = {
22
- disabled: !1,
23
- ...n
24
- }, i = { valid(t) {
25
- return t === null ? null : t ? { [e.valid]: "" } : { [e.invalid]: "" };
26
- } };
1
+ "use client";
2
+ import e from "./index183.js";
3
+ import { EMPTY_OBJECT as t, NOOP as n } from "./index191.js";
4
+ import { DEFAULT_FIELD_ROOT_STATE as r, DEFAULT_VALIDITY_STATE as i } from "./index368.js";
5
+ import * as a from "react";
6
+ //#region ../../node_modules/@base-ui/react/internals/field-root-context/FieldRootContext.mjs
7
+ var o = {
8
+ invalid: void 0,
9
+ name: void 0,
10
+ validityData: {
11
+ state: i,
12
+ errors: [],
13
+ error: "",
14
+ value: "",
15
+ initialValue: null
16
+ },
17
+ setValidityData: n,
18
+ disabled: void 0,
19
+ setTouched: n,
20
+ setDirty: n,
21
+ setFilled: n,
22
+ setFocused: n,
23
+ validationMode: "onSubmit",
24
+ shouldValidateOnChange: () => !1,
25
+ state: r,
26
+ registerFieldControl: n,
27
+ validation: {
28
+ getValidationProps: (e, n = t) => n,
29
+ inputRef: { current: null },
30
+ registeredInputs: /* @__PURE__ */ new Map(),
31
+ registerInput: n,
32
+ getInputControl: () => null,
33
+ commit: async () => {},
34
+ change: n
35
+ }
36
+ }, s = /*#__PURE__*/ a.createContext(o);
37
+ process.env.NODE_ENV !== "production" && (s.displayName = "FieldRootContext");
38
+ function c(t = !0) {
39
+ let r = a.useContext(s);
40
+ if (r.setValidityData === n && !t) throw Error(process.env.NODE_ENV === "production" ? e(28) : "Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.");
41
+ return r;
42
+ }
27
43
  //#endregion
28
- export { r as DEFAULT_FIELD_ROOT_STATE, n as DEFAULT_FIELD_STATE_ATTRIBUTES, t as DEFAULT_VALIDITY_STATE, i as fieldValidityMapping };
44
+ export { o as DEFAULT_FIELD_ROOT_CONTEXT, s as FieldRootContext, c as useFieldRootContext };
29
45
 
30
46
  //# sourceMappingURL=index369.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index369.js","names":[],"sources":["../../../node_modules/@base-ui/react/internals/field-constants/constants.mjs"],"sourcesContent":["import { FieldControlDataAttributes } from \"../../field/control/FieldControlDataAttributes.mjs\";\nexport const DEFAULT_VALIDITY_STATE = {\n badInput: false,\n customError: false,\n patternMismatch: false,\n rangeOverflow: false,\n rangeUnderflow: false,\n stepMismatch: false,\n tooLong: false,\n tooShort: false,\n typeMismatch: false,\n valid: null,\n valueMissing: false\n};\nexport const DEFAULT_FIELD_STATE_ATTRIBUTES = {\n valid: null,\n touched: false,\n dirty: false,\n filled: false,\n focused: false\n};\nexport const DEFAULT_FIELD_ROOT_STATE = {\n disabled: false,\n ...DEFAULT_FIELD_STATE_ATTRIBUTES\n};\nexport const fieldValidityMapping = {\n valid(value) {\n if (value === null) {\n return null;\n }\n if (value) {\n return {\n [FieldControlDataAttributes.valid]: ''\n };\n }\n return {\n [FieldControlDataAttributes.invalid]: ''\n };\n }\n};"],"x_google_ignoreList":[0],"mappings":";;AACA,IAAa,IAAyB;CACpC,UAAU;CACV,aAAa;CACb,iBAAiB;CACjB,eAAe;CACf,gBAAgB;CAChB,cAAc;CACd,SAAS;CACT,UAAU;CACV,cAAc;CACd,OAAO;CACP,cAAc;AAChB,GACa,IAAiC;CAC5C,OAAO;CACP,SAAS;CACT,OAAO;CACP,QAAQ;CACR,SAAS;AACX,GACa,IAA2B;CACtC,UAAU;CACV,GAAG;AACL,GACa,IAAuB,EAClC,MAAM,GAAO;CASX,OARI,MAAU,OACL,OAEL,IACK,GACJ,EAA2B,QAAQ,GACtC,IAEK,GACJ,EAA2B,UAAU,GACxC;AACF,EACF"}
1
+ {"version":3,"file":"index369.js","names":["React","_formatErrorMessage"],"sources":["../../../node_modules/@base-ui/react/internals/field-root-context/FieldRootContext.mjs"],"sourcesContent":["'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nimport { EMPTY_OBJECT } from '@base-ui/utils/empty';\nimport { NOOP } from \"../noop.mjs\";\nimport { DEFAULT_FIELD_ROOT_STATE, DEFAULT_VALIDITY_STATE } from \"../field-constants/constants.mjs\";\nexport const DEFAULT_FIELD_ROOT_CONTEXT = {\n invalid: undefined,\n name: undefined,\n validityData: {\n state: DEFAULT_VALIDITY_STATE,\n errors: [],\n error: '',\n value: '',\n initialValue: null\n },\n setValidityData: NOOP,\n disabled: undefined,\n setTouched: NOOP,\n setDirty: NOOP,\n setFilled: NOOP,\n setFocused: NOOP,\n validationMode: 'onSubmit',\n shouldValidateOnChange: () => false,\n state: DEFAULT_FIELD_ROOT_STATE,\n registerFieldControl: NOOP,\n validation: {\n getValidationProps: (_disabled, props = EMPTY_OBJECT) => props,\n inputRef: {\n current: null\n },\n registeredInputs: new Map(),\n registerInput: NOOP,\n getInputControl: () => null,\n commit: async () => {},\n change: NOOP\n }\n};\nexport const FieldRootContext = /*#__PURE__*/React.createContext(DEFAULT_FIELD_ROOT_CONTEXT);\nif (process.env.NODE_ENV !== \"production\") FieldRootContext.displayName = \"FieldRootContext\";\nexport function useFieldRootContext(optional = true) {\n const context = React.useContext(FieldRootContext);\n if (context.setValidityData === NOOP && !optional) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.' : _formatErrorMessage(28));\n }\n return context;\n}"],"x_google_ignoreList":[0],"mappings":";;;;;;AAOA,IAAa,IAA6B;CACxC,SAAS,KAAA;CACT,MAAM,KAAA;CACN,cAAc;EACZ,OAAO;EACP,QAAQ,CAAC;EACT,OAAO;EACP,OAAO;EACP,cAAc;CAChB;CACA,iBAAiB;CACjB,UAAU,KAAA;CACV,YAAY;CACZ,UAAU;CACV,WAAW;CACX,YAAY;CACZ,gBAAgB;CAChB,8BAA8B;CAC9B,OAAO;CACP,sBAAsB;CACtB,YAAY;EACV,qBAAqB,GAAW,IAAQ,MAAiB;EACzD,UAAU,EACR,SAAS,KACX;EACA,kCAAkB,IAAI,IAAI;EAC1B,eAAe;EACf,uBAAuB;EACvB,QAAQ,YAAY,CAAC;EACrB,QAAQ;CACV;AACF,GACa,IAAgC,gBAAM,cAAc,CAA0B;AAC3F,QAAA,IAAA,aAA6B,iBAAc,EAAiB,cAAc;AAC1E,SAAgB,EAAoB,IAAW,IAAM;CACnD,IAAM,IAAUA,EAAM,WAAW,CAAgB;CACjD,IAAI,EAAQ,oBAAoB,KAAQ,CAAC,GACvC,MAAU,MAAA,QAAA,IAAA,aAA+B,eAAyGC,EAAoB,EAAE,IAAhH,uFAAiH;CAE3K,OAAO;AACT"}
package/dist/index370.js CHANGED
@@ -1,51 +1,40 @@
1
1
  "use client";
2
- import e from "./index183.js";
3
- import { EMPTY_OBJECT as t, NOOP as n } from "./index191.js";
4
- import { DEFAULT_FIELD_ROOT_STATE as r, DEFAULT_FIELD_STATE_ATTRIBUTES as i, DEFAULT_VALIDITY_STATE as a } from "./index369.js";
5
- import * as o from "react";
6
- //#region ../../node_modules/@base-ui/react/internals/field-root-context/FieldRootContext.mjs
7
- var s = {
8
- invalid: void 0,
9
- name: void 0,
10
- validityData: {
11
- state: a,
12
- errors: [],
13
- error: "",
14
- value: "",
15
- initialValue: null
16
- },
17
- setValidityData: n,
18
- disabled: void 0,
19
- touched: i.touched,
20
- setTouched: n,
21
- dirty: i.dirty,
22
- setDirty: n,
23
- filled: i.filled,
24
- setFilled: n,
25
- focused: i.focused,
26
- setFocused: n,
27
- validate: () => null,
28
- validationMode: "onSubmit",
29
- validationDebounceTime: 0,
30
- shouldValidateOnChange: () => !1,
31
- state: r,
32
- markedDirtyRef: { current: !1 },
33
- registerFieldControl: n,
34
- validation: {
35
- getValidationProps: (e, n = t) => n,
36
- inputRef: { current: null },
37
- registerInput: n,
38
- commit: async () => {},
39
- change: n
40
- }
41
- }, c = /*#__PURE__*/ o.createContext(s);
42
- process.env.NODE_ENV !== "production" && (c.displayName = "FieldRootContext");
43
- function l(t = !0) {
44
- let r = o.useContext(c);
45
- if (r.setValidityData === n && !t) throw Error(process.env.NODE_ENV === "production" ? e(28) : "Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.");
46
- return r;
2
+ import { useRefWithInit as e } from "./index185.js";
3
+ import { useIsoLayoutEffect as t } from "./index204.js";
4
+ import { useFieldRootContext as n } from "./index369.js";
5
+ //#region ../../node_modules/@base-ui/react/internals/field-register-control/useRegisterFieldControl.mjs
6
+ function r(r, i, a, o, s = !0, c) {
7
+ let { registerFieldControl: l } = n(), u = e(() => Symbol());
8
+ t(() => {
9
+ let e = u.current;
10
+ if (!s) {
11
+ l(e, void 0);
12
+ return;
13
+ }
14
+ l(e, {
15
+ controlRef: r,
16
+ getValue: o,
17
+ id: i,
18
+ name: c,
19
+ value: a
20
+ });
21
+ }, [
22
+ r,
23
+ s,
24
+ o,
25
+ i,
26
+ c,
27
+ l,
28
+ u,
29
+ a
30
+ ]), t(() => {
31
+ let e = u.current;
32
+ return () => {
33
+ l(e, void 0);
34
+ };
35
+ }, [l, u]);
47
36
  }
48
37
  //#endregion
49
- export { s as DEFAULT_FIELD_ROOT_CONTEXT, c as FieldRootContext, l as useFieldRootContext };
38
+ export { r as useRegisterFieldControl };
50
39
 
51
40
  //# sourceMappingURL=index370.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index370.js","names":["React","_formatErrorMessage"],"sources":["../../../node_modules/@base-ui/react/internals/field-root-context/FieldRootContext.mjs"],"sourcesContent":["'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nimport { EMPTY_OBJECT } from '@base-ui/utils/empty';\nimport { NOOP } from \"../noop.mjs\";\nimport { DEFAULT_FIELD_ROOT_STATE, DEFAULT_FIELD_STATE_ATTRIBUTES, DEFAULT_VALIDITY_STATE } from \"../field-constants/constants.mjs\";\nexport const DEFAULT_FIELD_ROOT_CONTEXT = {\n invalid: undefined,\n name: undefined,\n validityData: {\n state: DEFAULT_VALIDITY_STATE,\n errors: [],\n error: '',\n value: '',\n initialValue: null\n },\n setValidityData: NOOP,\n disabled: undefined,\n touched: DEFAULT_FIELD_STATE_ATTRIBUTES.touched,\n setTouched: NOOP,\n dirty: DEFAULT_FIELD_STATE_ATTRIBUTES.dirty,\n setDirty: NOOP,\n filled: DEFAULT_FIELD_STATE_ATTRIBUTES.filled,\n setFilled: NOOP,\n focused: DEFAULT_FIELD_STATE_ATTRIBUTES.focused,\n setFocused: NOOP,\n validate: () => null,\n validationMode: 'onSubmit',\n validationDebounceTime: 0,\n shouldValidateOnChange: () => false,\n state: DEFAULT_FIELD_ROOT_STATE,\n markedDirtyRef: {\n current: false\n },\n registerFieldControl: NOOP,\n validation: {\n getValidationProps: (_disabled, props = EMPTY_OBJECT) => props,\n inputRef: {\n current: null\n },\n registerInput: NOOP,\n commit: async () => {},\n change: NOOP\n }\n};\nexport const FieldRootContext = /*#__PURE__*/React.createContext(DEFAULT_FIELD_ROOT_CONTEXT);\nif (process.env.NODE_ENV !== \"production\") FieldRootContext.displayName = \"FieldRootContext\";\nexport function useFieldRootContext(optional = true) {\n const context = React.useContext(FieldRootContext);\n if (context.setValidityData === NOOP && !optional) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.' : _formatErrorMessage(28));\n }\n return context;\n}"],"x_google_ignoreList":[0],"mappings":";;;;;;AAOA,IAAa,IAA6B;CACxC,SAAS,KAAA;CACT,MAAM,KAAA;CACN,cAAc;EACZ,OAAO;EACP,QAAQ,CAAC;EACT,OAAO;EACP,OAAO;EACP,cAAc;CAChB;CACA,iBAAiB;CACjB,UAAU,KAAA;CACV,SAAS,EAA+B;CACxC,YAAY;CACZ,OAAO,EAA+B;CACtC,UAAU;CACV,QAAQ,EAA+B;CACvC,WAAW;CACX,SAAS,EAA+B;CACxC,YAAY;CACZ,gBAAgB;CAChB,gBAAgB;CAChB,wBAAwB;CACxB,8BAA8B;CAC9B,OAAO;CACP,gBAAgB,EACd,SAAS,GACX;CACA,sBAAsB;CACtB,YAAY;EACV,qBAAqB,GAAW,IAAQ,MAAiB;EACzD,UAAU,EACR,SAAS,KACX;EACA,eAAe;EACf,QAAQ,YAAY,CAAC;EACrB,QAAQ;CACV;AACF,GACa,IAAgC,gBAAM,cAAc,CAA0B;AAC3F,QAAA,IAAA,aAA6B,iBAAc,EAAiB,cAAc;AAC1E,SAAgB,EAAoB,IAAW,IAAM;CACnD,IAAM,IAAUA,EAAM,WAAW,CAAgB;CACjD,IAAI,EAAQ,oBAAoB,KAAQ,CAAC,GACvC,MAAU,MAAA,QAAA,IAAA,aAA+B,eAAyGC,EAAoB,EAAE,IAAhH,uFAAiH;CAE3K,OAAO;AACT"}
1
+ {"version":3,"file":"index370.js","names":[],"sources":["../../../node_modules/@base-ui/react/internals/field-register-control/useRegisterFieldControl.mjs"],"sourcesContent":["'use client';\n\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useRefWithInit } from '@base-ui/utils/useRefWithInit';\nimport { useFieldRootContext } from \"../field-root-context/FieldRootContext.mjs\";\nexport function useRegisterFieldControl(controlRef, id, value, getFormValueOverride, enabled = true, name) {\n const {\n registerFieldControl\n } = useFieldRootContext();\n const sourceRef = useRefWithInit(() => Symbol());\n\n // Re-register without unregistering first: re-registration with the same id updates the\n // form's fields Map entry in place, while a delete + re-add would move the field to the\n // end of the Map every time its value changes.\n useIsoLayoutEffect(() => {\n const source = sourceRef.current;\n if (!enabled) {\n registerFieldControl(source, undefined);\n return;\n }\n const registration = {\n controlRef,\n getValue: getFormValueOverride,\n id,\n name,\n value\n };\n registerFieldControl(source, registration);\n }, [controlRef, enabled, getFormValueOverride, id, name, registerFieldControl, sourceRef, value]);\n useIsoLayoutEffect(() => {\n const source = sourceRef.current;\n return () => {\n registerFieldControl(source, undefined);\n };\n }, [registerFieldControl, sourceRef]);\n}"],"x_google_ignoreList":[0],"mappings":";;;;;AAKA,SAAgB,EAAwB,GAAY,GAAI,GAAO,GAAsB,IAAU,IAAM,GAAM;CACzG,IAAM,EACJ,4BACE,EAAoB,GAClB,IAAY,QAAqB,OAAO,CAAC;CAoB/C,AAfA,QAAyB;EACvB,IAAM,IAAS,EAAU;EACzB,IAAI,CAAC,GAAS;GACZ,EAAqB,GAAQ,KAAA,CAAS;GACtC;EACF;EAQA,EAAqB,GAAQ;GAN3B;GACA,UAAU;GACV;GACA;GACA;EAEsC,CAAC;CAC3C,GAAG;EAAC;EAAY;EAAS;EAAsB;EAAI;EAAM;EAAsB;EAAW;CAAK,CAAC,GAChG,QAAyB;EACvB,IAAM,IAAS,EAAU;EACzB,aAAa;GACX,EAAqB,GAAQ,KAAA,CAAS;EACxC;CACF,GAAG,CAAC,GAAsB,CAAS,CAAC;AACtC"}
package/dist/index371.js CHANGED
@@ -1,32 +1,21 @@
1
1
  "use client";
2
- import { useIsoLayoutEffect as e } from "./index204.js";
3
- import { useFieldRootContext as t } from "./index370.js";
4
- import * as n from "react";
5
- //#region ../../node_modules/@base-ui/react/internals/field-register-control/useRegisterFieldControl.mjs
6
- function r(r, i, a, o, s = !0, c) {
7
- let { registerFieldControl: l } = t(), u = n.useRef(null);
8
- u.current ||= Symbol(), e(() => {
9
- let e = u.current;
10
- if (!(!e || !s)) return l(e, {
11
- controlRef: r,
12
- getValue: o,
13
- id: i,
14
- name: c,
15
- value: a
16
- }), () => {
17
- l(e, void 0);
18
- };
19
- }, [
20
- r,
21
- s,
22
- o,
23
- i,
24
- c,
25
- l,
26
- a
27
- ]);
2
+ import { NOOP as e } from "./index191.js";
3
+ import * as t from "react";
4
+ //#region ../../node_modules/@base-ui/react/internals/labelable-provider/LabelableContext.mjs
5
+ var n = /*#__PURE__*/ t.createContext({
6
+ controlId: void 0,
7
+ registerControlId: e,
8
+ labelId: void 0,
9
+ setLabelId: e,
10
+ messageIds: [],
11
+ setMessageIds: e,
12
+ getDescriptionProps: (e) => e
13
+ });
14
+ process.env.NODE_ENV !== "production" && (n.displayName = "LabelableContext");
15
+ function r() {
16
+ return t.useContext(n);
28
17
  }
29
18
  //#endregion
30
- export { r as useRegisterFieldControl };
19
+ export { n as LabelableContext, r as useLabelableContext };
31
20
 
32
21
  //# sourceMappingURL=index371.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index371.js","names":["React"],"sources":["../../../node_modules/@base-ui/react/internals/field-register-control/useRegisterFieldControl.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useFieldRootContext } from \"../field-root-context/FieldRootContext.mjs\";\nexport function useRegisterFieldControl(controlRef, id, value, getFormValueOverride, enabled = true, name) {\n const {\n registerFieldControl\n } = useFieldRootContext();\n const sourceRef = React.useRef(null);\n if (!sourceRef.current) {\n sourceRef.current = Symbol();\n }\n useIsoLayoutEffect(() => {\n const source = sourceRef.current;\n if (!source || !enabled) {\n return undefined;\n }\n const registration = {\n controlRef,\n getValue: getFormValueOverride,\n id,\n name,\n value\n };\n registerFieldControl(source, registration);\n return () => {\n registerFieldControl(source, undefined);\n };\n }, [controlRef, enabled, getFormValueOverride, id, name, registerFieldControl, value]);\n}"],"x_google_ignoreList":[0],"mappings":";;;;;AAKA,SAAgB,EAAwB,GAAY,GAAI,GAAO,GAAsB,IAAU,IAAM,GAAM;CACzG,IAAM,EACJ,4BACE,EAAoB,GAClB,IAAYA,EAAM,OAAO,IAAI;CAInC,AAHA,AACE,EAAU,YAAU,OAAO,GAE7B,QAAyB;EACvB,IAAM,IAAS,EAAU;EACrB,OAAC,KAAU,CAAC,IAWhB,OADA,EAAqB,GAAQ;GAN3B;GACA,UAAU;GACV;GACA;GACA;EAEsC,CAAC,SAC5B;GACX,EAAqB,GAAQ,KAAA,CAAS;EACxC;CACF,GAAG;EAAC;EAAY;EAAS;EAAsB;EAAI;EAAM;EAAsB;CAAK,CAAC;AACvF"}
1
+ {"version":3,"file":"index371.js","names":["React"],"sources":["../../../node_modules/@base-ui/react/internals/labelable-provider/LabelableContext.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { NOOP } from \"../noop.mjs\";\n/**\n * A context for providing [labelable elements](https://html.spec.whatwg.org/multipage/forms.html#category-label)\\\n * with an accessible name (label) and description.\n */\nexport const LabelableContext = /*#__PURE__*/React.createContext({\n controlId: undefined,\n registerControlId: NOOP,\n labelId: undefined,\n setLabelId: NOOP,\n messageIds: [],\n setMessageIds: NOOP,\n getDescriptionProps: externalProps => externalProps\n});\nif (process.env.NODE_ENV !== \"production\") LabelableContext.displayName = \"LabelableContext\";\nexport function useLabelableContext() {\n return React.useContext(LabelableContext);\n}"],"x_google_ignoreList":[0],"mappings":";;;;AAQA,IAAa,IAAgC,gBAAM,cAAc;CAC/D,WAAW,KAAA;CACX,mBAAmB;CACnB,SAAS,KAAA;CACT,YAAY;CACZ,YAAY,CAAC;CACb,eAAe;CACf,sBAAqB,MAAiB;AACxC,CAAC;AACD,QAAA,IAAA,aAA6B,iBAAc,EAAiB,cAAc;AAC1E,SAAgB,IAAsB;CACpC,OAAOA,EAAM,WAAW,CAAgB;AAC1C"}
package/dist/index372.js CHANGED
@@ -1,21 +1,46 @@
1
1
  "use client";
2
- import { NOOP as e } from "./index191.js";
3
- import * as t from "react";
4
- //#region ../../node_modules/@base-ui/react/internals/labelable-provider/LabelableContext.mjs
5
- var n = /*#__PURE__*/ t.createContext({
6
- controlId: void 0,
7
- registerControlId: e,
8
- labelId: void 0,
9
- setLabelId: e,
10
- messageIds: [],
11
- setMessageIds: e,
12
- getDescriptionProps: (e) => e
13
- });
14
- process.env.NODE_ENV !== "production" && (n.displayName = "LabelableContext");
15
- function r() {
16
- return t.useContext(n);
2
+ import { useRefWithInit as e } from "./index185.js";
3
+ import { NOOP as t } from "./index191.js";
4
+ import { isElement as n } from "./index200.js";
5
+ import { useStableCallback as r } from "./index202.js";
6
+ import { useIsoLayoutEffect as i } from "./index204.js";
7
+ import { useBaseUiId as a } from "./index214.js";
8
+ import { useLabelableContext as o } from "./index371.js";
9
+ import * as s from "react";
10
+ //#region ../../node_modules/@base-ui/react/internals/labelable-provider/useLabelableId.mjs
11
+ function c(c = {}) {
12
+ let { id: l, implicit: u = !1, controlRef: d } = c, { controlId: f, registerControlId: p } = o(), m = a(l), h = u ? f : void 0, g = e(() => Symbol()), _ = s.useRef(!1), v = s.useRef(l != null), y = r(() => {
13
+ !_.current || p === t || (_.current = !1, p(g.current, void 0));
14
+ });
15
+ return i(() => {
16
+ if (p === t) return;
17
+ let e;
18
+ if (u) {
19
+ let t = d?.current;
20
+ e = n(t) && t.closest("label") != null ? l ?? null : h ?? m;
21
+ } else if (l != null) v.current = !0, e = l;
22
+ else if (v.current) e = m;
23
+ else {
24
+ y();
25
+ return;
26
+ }
27
+ if (e === void 0) {
28
+ y();
29
+ return;
30
+ }
31
+ _.current = !0, p(g.current, e);
32
+ }, [
33
+ l,
34
+ d,
35
+ h,
36
+ p,
37
+ u,
38
+ m,
39
+ g,
40
+ y
41
+ ]), s.useEffect(() => y, [y]), f ?? m;
17
42
  }
18
43
  //#endregion
19
- export { n as LabelableContext, r as useLabelableContext };
44
+ export { c as useLabelableId };
20
45
 
21
46
  //# sourceMappingURL=index372.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index372.js","names":["React"],"sources":["../../../node_modules/@base-ui/react/internals/labelable-provider/LabelableContext.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { NOOP } from \"../noop.mjs\";\n/**\n * A context for providing [labelable elements](https://html.spec.whatwg.org/multipage/forms.html#category-label)\\\n * with an accessible name (label) and description.\n */\nexport const LabelableContext = /*#__PURE__*/React.createContext({\n controlId: undefined,\n registerControlId: NOOP,\n labelId: undefined,\n setLabelId: NOOP,\n messageIds: [],\n setMessageIds: NOOP,\n getDescriptionProps: externalProps => externalProps\n});\nif (process.env.NODE_ENV !== \"production\") LabelableContext.displayName = \"LabelableContext\";\nexport function useLabelableContext() {\n return React.useContext(LabelableContext);\n}"],"x_google_ignoreList":[0],"mappings":";;;;AAQA,IAAa,IAAgC,gBAAM,cAAc;CAC/D,WAAW,KAAA;CACX,mBAAmB;CACnB,SAAS,KAAA;CACT,YAAY;CACZ,YAAY,CAAC;CACb,eAAe;CACf,sBAAqB,MAAiB;AACxC,CAAC;AACD,QAAA,IAAA,aAA6B,iBAAc,EAAiB,cAAc;AAC1E,SAAgB,IAAsB;CACpC,OAAOA,EAAM,WAAW,CAAgB;AAC1C"}
1
+ {"version":3,"file":"index372.js","names":["React"],"sources":["../../../node_modules/@base-ui/react/internals/labelable-provider/useLabelableId.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useRefWithInit } from '@base-ui/utils/useRefWithInit';\nimport { isElement } from '@floating-ui/utils/dom';\nimport { NOOP } from \"../noop.mjs\";\nimport { useBaseUiId } from \"../useBaseUiId.mjs\";\nimport { useLabelableContext } from \"./LabelableContext.mjs\";\nexport function useLabelableId(params = {}) {\n const {\n id,\n implicit = false,\n controlRef\n } = params;\n const {\n controlId,\n registerControlId\n } = useLabelableContext();\n const defaultId = useBaseUiId(id);\n const controlIdForEffect = implicit ? controlId : undefined;\n const controlSourceRef = useRefWithInit(() => Symbol());\n const hasRegisteredRef = React.useRef(false);\n const hadExplicitIdRef = React.useRef(id != null);\n const unregisterControlId = useStableCallback(() => {\n if (!hasRegisteredRef.current || registerControlId === NOOP) {\n return;\n }\n hasRegisteredRef.current = false;\n registerControlId(controlSourceRef.current, undefined);\n });\n useIsoLayoutEffect(() => {\n if (registerControlId === NOOP) {\n return undefined;\n }\n let nextId;\n if (implicit) {\n const elem = controlRef?.current;\n if (isElement(elem) && elem.closest('label') != null) {\n nextId = id ?? null;\n } else {\n nextId = controlIdForEffect ?? defaultId;\n }\n } else if (id != null) {\n hadExplicitIdRef.current = true;\n nextId = id;\n } else if (hadExplicitIdRef.current) {\n nextId = defaultId;\n } else {\n unregisterControlId();\n return undefined;\n }\n if (nextId === undefined) {\n unregisterControlId();\n return undefined;\n }\n hasRegisteredRef.current = true;\n registerControlId(controlSourceRef.current, nextId);\n return undefined;\n }, [id, controlRef, controlIdForEffect, registerControlId, implicit, defaultId, controlSourceRef, unregisterControlId]);\n React.useEffect(() => {\n return unregisterControlId;\n }, [unregisterControlId]);\n return controlId ?? defaultId;\n}"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;AAUA,SAAgB,EAAe,IAAS,CAAC,GAAG;CAC1C,IAAM,EACJ,OACA,cAAW,IACX,kBACE,GACE,EACJ,cACA,yBACE,EAAoB,GAClB,IAAY,EAAY,CAAE,GAC1B,IAAqB,IAAW,IAAY,KAAA,GAC5C,IAAmB,QAAqB,OAAO,CAAC,GAChD,IAAmBA,EAAM,OAAO,EAAK,GACrC,IAAmBA,EAAM,OAAO,KAAM,IAAI,GAC1C,IAAsB,QAAwB;EAC9C,CAAC,EAAiB,WAAW,MAAsB,MAGvD,EAAiB,UAAU,IAC3B,EAAkB,EAAiB,SAAS,KAAA,CAAS;CACvD,CAAC;CAiCD,OAhCA,QAAyB;EACvB,IAAI,MAAsB,GACxB;EAEF,IAAI;EACJ,IAAI,GAAU;GACZ,IAAM,IAAO,GAAY;GACzB,AAGE,IAHE,EAAU,CAAI,KAAK,EAAK,QAAQ,OAAO,KAAK,OACrC,KAAM,OAEN,KAAsB;EAEnC,OAAO,IAAI,KAAM,MAEf,AADA,EAAiB,UAAU,IAC3B,IAAS;OACJ,IAAI,EAAiB,SAC1B,IAAS;OACJ;GACL,EAAoB;GACpB;EACF;EACA,IAAI,MAAW,KAAA,GAAW;GACxB,EAAoB;GACpB;EACF;EAEA,AADA,EAAiB,UAAU,IAC3B,EAAkB,EAAiB,SAAS,CAAM;CAEpD,GAAG;EAAC;EAAI;EAAY;EAAoB;EAAmB;EAAU;EAAW;EAAkB;CAAmB,CAAC,GACtH,EAAM,gBACG,GACN,CAAC,CAAmB,CAAC,GACjB,KAAa;AACtB"}