mainstack-design-system 1.3.4 → 1.3.6

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 (565) hide show
  1. package/dist/{DayPickerExtended-BsUWFsM9.cjs → DayPickerExtended-BOmHoN_C.cjs} +1 -1
  2. package/dist/{DayPickerExtended-DQyzHm72.js → DayPickerExtended-D_HqIWm_.js} +1 -1
  3. package/dist/assets/styles.css +1 -1
  4. package/dist/index-8BR3dtTN.js +6389 -0
  5. package/dist/{index-C5YYEtQG.cjs → index-B0aqKYqj.cjs} +1 -1
  6. package/dist/index-C7rXc8w3.cjs +19 -0
  7. package/dist/{index-DivqSV6G.js → index-CqwPI5PC.js} +1 -1
  8. package/dist/{index-qXBwwKNh.js → index-DDHQjaCF.js} +16 -16
  9. package/dist/{index-Czas6QFh.js → index-eeqUt-Tb.js} +1 -1
  10. package/dist/index.d.ts +28 -35
  11. package/dist/mainstack-design-system.cjs +1 -1
  12. package/dist/mainstack-design-system.js +406 -404
  13. package/dist/mainstack-design-system16.cjs +1 -1
  14. package/dist/mainstack-design-system16.js +1 -1
  15. package/dist/mainstack-design-system17.cjs +1 -1
  16. package/dist/mainstack-design-system17.js +1 -1
  17. package/dist/mainstack-design-system18.cjs +1 -1
  18. package/dist/mainstack-design-system18.js +6 -6
  19. package/dist/mainstack-design-system19.cjs +1 -1
  20. package/dist/mainstack-design-system19.js +6 -6
  21. package/dist/mainstack-design-system2.cjs +1 -1
  22. package/dist/mainstack-design-system2.js +1 -1
  23. package/dist/mainstack-design-system20.cjs +1 -1
  24. package/dist/mainstack-design-system20.js +5 -5
  25. package/dist/mainstack-design-system21.cjs +1 -1
  26. package/dist/mainstack-design-system21.js +1 -1
  27. package/dist/mainstack-design-system22.cjs +1 -1
  28. package/dist/mainstack-design-system22.js +1 -1
  29. package/dist/mainstack-design-system23.cjs +1 -1
  30. package/dist/mainstack-design-system23.js +2 -2
  31. package/dist/mainstack-design-system26.cjs +1 -1
  32. package/dist/mainstack-design-system26.js +1 -1
  33. package/dist/mainstack-design-system27.cjs +1 -1
  34. package/dist/mainstack-design-system27.js +5 -5
  35. package/dist/mainstack-design-system28.cjs +1 -1
  36. package/dist/mainstack-design-system28.js +1 -1
  37. package/dist/mainstack-design-system29.cjs +1 -1
  38. package/dist/mainstack-design-system29.js +1 -1
  39. package/dist/mainstack-design-system30.cjs +1 -1
  40. package/dist/mainstack-design-system30.js +1 -1
  41. package/dist/mainstack-design-system31.cjs +1 -1
  42. package/dist/mainstack-design-system31.js +5 -5
  43. package/dist/mainstack-design-system32.cjs +1 -1
  44. package/dist/mainstack-design-system32.js +2 -2
  45. package/dist/mainstack-design-system34.cjs +1 -1
  46. package/dist/mainstack-design-system34.js +5 -5
  47. package/dist/mainstack-design-system35.cjs +1 -1
  48. package/dist/mainstack-design-system35.js +3 -3
  49. package/dist/mainstack-design-system355.cjs +1 -1
  50. package/dist/mainstack-design-system355.js +1 -1
  51. package/dist/mainstack-design-system356.cjs +1 -1
  52. package/dist/mainstack-design-system356.js +3 -3
  53. package/dist/mainstack-design-system357.cjs +1 -1
  54. package/dist/mainstack-design-system357.js +3 -3
  55. package/dist/mainstack-design-system358.cjs +1 -1
  56. package/dist/mainstack-design-system358.js +8 -8
  57. package/dist/mainstack-design-system359.cjs +1 -1
  58. package/dist/mainstack-design-system359.js +9 -9
  59. package/dist/mainstack-design-system36.cjs +1 -1
  60. package/dist/mainstack-design-system36.js +7 -7
  61. package/dist/mainstack-design-system360.cjs +1 -1
  62. package/dist/mainstack-design-system360.js +1 -1
  63. package/dist/mainstack-design-system361.cjs +1 -1
  64. package/dist/mainstack-design-system361.js +1 -1
  65. package/dist/mainstack-design-system362.cjs +1 -1
  66. package/dist/mainstack-design-system362.js +6 -6
  67. package/dist/mainstack-design-system363.cjs +1 -1
  68. package/dist/mainstack-design-system363.js +4 -4
  69. package/dist/mainstack-design-system364.cjs +1 -1
  70. package/dist/mainstack-design-system364.js +9 -9
  71. package/dist/mainstack-design-system365.cjs +1 -1
  72. package/dist/mainstack-design-system365.js +4 -4
  73. package/dist/mainstack-design-system366.cjs +1 -1
  74. package/dist/mainstack-design-system366.js +5 -5
  75. package/dist/mainstack-design-system367.cjs +1 -1
  76. package/dist/mainstack-design-system367.js +3 -3
  77. package/dist/mainstack-design-system368.cjs +1 -1
  78. package/dist/mainstack-design-system368.js +18 -18
  79. package/dist/mainstack-design-system369.cjs +1 -1
  80. package/dist/mainstack-design-system369.js +7 -7
  81. package/dist/mainstack-design-system37.cjs +1 -1
  82. package/dist/mainstack-design-system37.js +7 -7
  83. package/dist/mainstack-design-system370.cjs +1 -1
  84. package/dist/mainstack-design-system370.js +7 -7
  85. package/dist/mainstack-design-system371.cjs +1 -1
  86. package/dist/mainstack-design-system371.js +7 -7
  87. package/dist/mainstack-design-system372.cjs +1 -1
  88. package/dist/mainstack-design-system372.js +5 -5
  89. package/dist/mainstack-design-system373.cjs +1 -1
  90. package/dist/mainstack-design-system373.js +5 -5
  91. package/dist/mainstack-design-system374.cjs +1 -1
  92. package/dist/mainstack-design-system374.js +6 -6
  93. package/dist/mainstack-design-system375.cjs +1 -1
  94. package/dist/mainstack-design-system375.js +12 -12
  95. package/dist/mainstack-design-system376.cjs +1 -1
  96. package/dist/mainstack-design-system376.js +2 -2
  97. package/dist/mainstack-design-system377.cjs +1 -1
  98. package/dist/mainstack-design-system377.js +2 -2
  99. package/dist/mainstack-design-system378.cjs +1 -1
  100. package/dist/mainstack-design-system378.js +2 -2
  101. package/dist/mainstack-design-system379.cjs +1 -1
  102. package/dist/mainstack-design-system379.js +5 -5
  103. package/dist/mainstack-design-system38.cjs +1 -1
  104. package/dist/mainstack-design-system38.js +6 -6
  105. package/dist/mainstack-design-system380.cjs +1 -1
  106. package/dist/mainstack-design-system380.js +10 -10
  107. package/dist/mainstack-design-system381.cjs +1 -1
  108. package/dist/mainstack-design-system381.js +5 -5
  109. package/dist/mainstack-design-system382.cjs +1 -1
  110. package/dist/mainstack-design-system382.js +23 -15
  111. package/dist/mainstack-design-system383.cjs +1 -1
  112. package/dist/mainstack-design-system383.js +16 -18
  113. package/dist/mainstack-design-system384.cjs +1 -1
  114. package/dist/mainstack-design-system384.js +14 -13
  115. package/dist/mainstack-design-system385.cjs +1 -1
  116. package/dist/mainstack-design-system385.js +16 -68
  117. package/dist/mainstack-design-system386.cjs +1 -1
  118. package/dist/mainstack-design-system386.js +69 -7
  119. package/dist/mainstack-design-system387.cjs +1 -87
  120. package/dist/mainstack-design-system387.js +7 -238
  121. package/dist/mainstack-design-system388.cjs +87 -1
  122. package/dist/mainstack-design-system388.js +236 -18
  123. package/dist/mainstack-design-system389.cjs +1 -1
  124. package/dist/mainstack-design-system389.js +20 -5
  125. package/dist/mainstack-design-system39.cjs +1 -1
  126. package/dist/mainstack-design-system39.js +5 -5
  127. package/dist/mainstack-design-system390.cjs +1 -2
  128. package/dist/mainstack-design-system390.js +5 -31
  129. package/dist/mainstack-design-system391.cjs +1 -1
  130. package/dist/mainstack-design-system391.js +27 -13
  131. package/dist/mainstack-design-system392.cjs +2 -1
  132. package/dist/mainstack-design-system392.js +17 -7
  133. package/dist/mainstack-design-system393.cjs +1 -1
  134. package/dist/mainstack-design-system393.js +7 -32
  135. package/dist/mainstack-design-system394.cjs +1 -1
  136. package/dist/mainstack-design-system394.js +32 -7
  137. package/dist/mainstack-design-system395.cjs +1 -1
  138. package/dist/mainstack-design-system395.js +7 -16
  139. package/dist/mainstack-design-system396.cjs +1 -1
  140. package/dist/mainstack-design-system396.js +9 -9
  141. package/dist/mainstack-design-system397.cjs +1 -1
  142. package/dist/mainstack-design-system397.js +10 -10
  143. package/dist/mainstack-design-system398.cjs +1 -1
  144. package/dist/mainstack-design-system398.js +11 -13
  145. package/dist/mainstack-design-system399.cjs +1 -1
  146. package/dist/mainstack-design-system399.js +14 -14
  147. package/dist/mainstack-design-system40.cjs +1 -1
  148. package/dist/mainstack-design-system40.js +6 -6
  149. package/dist/mainstack-design-system400.cjs +1 -1
  150. package/dist/mainstack-design-system400.js +14 -20
  151. package/dist/mainstack-design-system401.cjs +1 -1
  152. package/dist/mainstack-design-system401.js +19 -16
  153. package/dist/mainstack-design-system402.cjs +1 -1
  154. package/dist/mainstack-design-system402.js +16 -26
  155. package/dist/mainstack-design-system403.cjs +1 -1
  156. package/dist/mainstack-design-system403.js +27 -15
  157. package/dist/mainstack-design-system404.cjs +1 -1
  158. package/dist/mainstack-design-system404.js +19 -17
  159. package/dist/mainstack-design-system405.cjs +1 -1
  160. package/dist/mainstack-design-system405.js +17 -18
  161. package/dist/mainstack-design-system406.cjs +1 -1
  162. package/dist/mainstack-design-system406.js +14 -16
  163. package/dist/mainstack-design-system407.cjs +1 -1
  164. package/dist/mainstack-design-system407.js +20 -15
  165. package/dist/mainstack-design-system408.cjs +1 -1
  166. package/dist/mainstack-design-system408.js +15 -16
  167. package/dist/mainstack-design-system409.cjs +1 -1
  168. package/dist/mainstack-design-system409.js +11 -11
  169. package/dist/mainstack-design-system41.cjs +1 -1
  170. package/dist/mainstack-design-system41.js +8 -8
  171. package/dist/mainstack-design-system410.cjs +1 -1
  172. package/dist/mainstack-design-system410.js +14 -6
  173. package/dist/mainstack-design-system411.cjs +1 -1
  174. package/dist/mainstack-design-system411.js +7 -24
  175. package/dist/mainstack-design-system412.cjs +1 -1
  176. package/dist/mainstack-design-system412.js +21 -13
  177. package/dist/mainstack-design-system413.cjs +1 -1
  178. package/dist/mainstack-design-system413.js +13 -16
  179. package/dist/mainstack-design-system414.cjs +1 -1
  180. package/dist/mainstack-design-system414.js +20 -18
  181. package/dist/mainstack-design-system415.cjs +1 -1
  182. package/dist/mainstack-design-system415.js +17 -68
  183. package/dist/mainstack-design-system416.cjs +1 -1
  184. package/dist/mainstack-design-system416.js +68 -17
  185. package/dist/mainstack-design-system417.cjs +1 -1
  186. package/dist/mainstack-design-system417.js +12 -15
  187. package/dist/mainstack-design-system418.cjs +1 -1
  188. package/dist/mainstack-design-system418.js +17 -17
  189. package/dist/mainstack-design-system419.cjs +1 -1
  190. package/dist/mainstack-design-system419.js +21 -13
  191. package/dist/mainstack-design-system420.cjs +1 -1
  192. package/dist/mainstack-design-system420.js +13 -38
  193. package/dist/mainstack-design-system421.cjs +1 -1
  194. package/dist/mainstack-design-system421.js +37 -29
  195. package/dist/mainstack-design-system422.cjs +1 -1
  196. package/dist/mainstack-design-system422.js +25 -10
  197. package/dist/mainstack-design-system423.cjs +1 -1
  198. package/dist/mainstack-design-system423.js +9 -10
  199. package/dist/mainstack-design-system424.cjs +1 -1
  200. package/dist/mainstack-design-system424.js +15 -19
  201. package/dist/mainstack-design-system425.cjs +1 -1
  202. package/dist/mainstack-design-system425.js +17 -11
  203. package/dist/mainstack-design-system426.cjs +1 -1
  204. package/dist/mainstack-design-system426.js +11 -17
  205. package/dist/mainstack-design-system427.cjs +1 -1
  206. package/dist/mainstack-design-system427.js +19 -14
  207. package/dist/mainstack-design-system428.cjs +1 -1
  208. package/dist/mainstack-design-system428.js +13 -6
  209. package/dist/mainstack-design-system429.cjs +1 -1
  210. package/dist/mainstack-design-system429.js +7 -7
  211. package/dist/mainstack-design-system430.cjs +1 -1
  212. package/dist/mainstack-design-system430.js +7 -21
  213. package/dist/mainstack-design-system431.cjs +1 -1
  214. package/dist/mainstack-design-system431.js +17 -24
  215. package/dist/mainstack-design-system432.cjs +1 -2
  216. package/dist/mainstack-design-system432.js +25 -37
  217. package/dist/mainstack-design-system433.cjs +1 -1
  218. package/dist/mainstack-design-system433.js +48 -25
  219. package/dist/mainstack-design-system434.cjs +1 -1
  220. package/dist/mainstack-design-system434.js +22 -29
  221. package/dist/mainstack-design-system435.cjs +1 -1
  222. package/dist/mainstack-design-system435.js +29 -16
  223. package/dist/mainstack-design-system436.cjs +1 -1
  224. package/dist/mainstack-design-system436.js +14 -24
  225. package/dist/mainstack-design-system437.cjs +1 -1
  226. package/dist/mainstack-design-system437.js +37 -16
  227. package/dist/mainstack-design-system438.cjs +1 -1
  228. package/dist/mainstack-design-system438.js +17 -36
  229. package/dist/mainstack-design-system439.cjs +1 -1
  230. package/dist/mainstack-design-system439.js +40 -32
  231. package/dist/mainstack-design-system440.cjs +1 -1
  232. package/dist/mainstack-design-system440.js +37 -39
  233. package/dist/mainstack-design-system441.cjs +1 -1
  234. package/dist/mainstack-design-system441.js +42 -49
  235. package/dist/mainstack-design-system442.cjs +1 -1
  236. package/dist/mainstack-design-system442.js +36 -20
  237. package/dist/mainstack-design-system443.cjs +1 -1
  238. package/dist/mainstack-design-system443.js +21 -28
  239. package/dist/mainstack-design-system444.cjs +1 -1
  240. package/dist/mainstack-design-system444.js +29 -16
  241. package/dist/mainstack-design-system445.cjs +1 -1
  242. package/dist/mainstack-design-system445.js +15 -25
  243. package/dist/mainstack-design-system446.cjs +1 -1
  244. package/dist/mainstack-design-system446.js +34 -15
  245. package/dist/mainstack-design-system447.cjs +1 -1
  246. package/dist/mainstack-design-system447.js +17 -36
  247. package/dist/mainstack-design-system448.cjs +1 -1
  248. package/dist/mainstack-design-system448.js +40 -32
  249. package/dist/mainstack-design-system449.cjs +2 -1
  250. package/dist/mainstack-design-system449.js +38 -18
  251. package/dist/mainstack-design-system450.cjs +1 -1
  252. package/dist/mainstack-design-system450.js +15 -15
  253. package/dist/mainstack-design-system451.cjs +1 -1
  254. package/dist/mainstack-design-system451.js +14 -12
  255. package/dist/mainstack-design-system452.cjs +1 -1
  256. package/dist/mainstack-design-system452.js +11 -15
  257. package/dist/mainstack-design-system453.cjs +1 -1
  258. package/dist/mainstack-design-system453.js +14 -13
  259. package/dist/mainstack-design-system454.cjs +1 -1
  260. package/dist/mainstack-design-system454.js +19 -17
  261. package/dist/mainstack-design-system455.cjs +1 -2
  262. package/dist/mainstack-design-system455.js +18 -53
  263. package/dist/mainstack-design-system456.cjs +1 -1
  264. package/dist/mainstack-design-system456.js +28 -30
  265. package/dist/mainstack-design-system457.cjs +1 -1
  266. package/dist/mainstack-design-system457.js +53 -98
  267. package/dist/mainstack-design-system458.cjs +1 -1
  268. package/dist/mainstack-design-system458.js +95 -31
  269. package/dist/mainstack-design-system459.cjs +1 -1
  270. package/dist/mainstack-design-system459.js +29 -70
  271. package/dist/mainstack-design-system460.cjs +1 -1
  272. package/dist/mainstack-design-system460.js +65 -63
  273. package/dist/mainstack-design-system461.cjs +1 -1
  274. package/dist/mainstack-design-system461.js +68 -39
  275. package/dist/mainstack-design-system462.cjs +1 -1
  276. package/dist/mainstack-design-system462.js +38 -73
  277. package/dist/mainstack-design-system463.cjs +2 -1
  278. package/dist/mainstack-design-system463.js +81 -8
  279. package/dist/mainstack-design-system464.cjs +1 -1
  280. package/dist/mainstack-design-system464.js +8 -13
  281. package/dist/mainstack-design-system465.cjs +1 -1
  282. package/dist/mainstack-design-system465.js +13 -17
  283. package/dist/mainstack-design-system466.cjs +1 -1
  284. package/dist/mainstack-design-system466.js +17 -13
  285. package/dist/mainstack-design-system467.cjs +1 -1
  286. package/dist/mainstack-design-system467.js +13 -21
  287. package/dist/mainstack-design-system468.cjs +1 -1
  288. package/dist/mainstack-design-system468.js +17 -23
  289. package/dist/mainstack-design-system469.cjs +1 -1
  290. package/dist/mainstack-design-system469.js +25 -33
  291. package/dist/mainstack-design-system470.cjs +1 -1
  292. package/dist/mainstack-design-system470.js +35 -7
  293. package/dist/mainstack-design-system471.cjs +1 -1
  294. package/dist/mainstack-design-system471.js +7 -85
  295. package/dist/mainstack-design-system472.cjs +1 -1
  296. package/dist/mainstack-design-system472.js +83 -26
  297. package/dist/mainstack-design-system473.cjs +1 -1
  298. package/dist/mainstack-design-system473.js +27 -21
  299. package/dist/mainstack-design-system474.cjs +1 -1
  300. package/dist/mainstack-design-system474.js +16 -16
  301. package/dist/mainstack-design-system475.cjs +1 -2
  302. package/dist/mainstack-design-system475.js +21 -31
  303. package/dist/mainstack-design-system476.cjs +1 -1
  304. package/dist/mainstack-design-system476.js +20 -20
  305. package/dist/mainstack-design-system477.cjs +1 -1
  306. package/dist/mainstack-design-system477.js +23 -36
  307. package/dist/mainstack-design-system478.cjs +1 -1
  308. package/dist/mainstack-design-system478.js +39 -25
  309. package/dist/mainstack-design-system479.cjs +1 -1
  310. package/dist/mainstack-design-system479.js +25 -55
  311. package/dist/mainstack-design-system480.cjs +1 -1
  312. package/dist/mainstack-design-system480.js +56 -24
  313. package/dist/mainstack-design-system481.cjs +1 -1
  314. package/dist/mainstack-design-system481.js +25 -97
  315. package/dist/mainstack-design-system482.cjs +1 -1
  316. package/dist/mainstack-design-system482.js +97 -26
  317. package/dist/mainstack-design-system483.cjs +1 -1
  318. package/dist/mainstack-design-system483.js +20 -20
  319. package/dist/mainstack-design-system484.cjs +1 -1
  320. package/dist/mainstack-design-system484.js +27 -75
  321. package/dist/mainstack-design-system485.cjs +1 -1
  322. package/dist/mainstack-design-system485.js +78 -20
  323. package/dist/mainstack-design-system486.cjs +1 -1
  324. package/dist/mainstack-design-system486.js +19 -124
  325. package/dist/mainstack-design-system487.cjs +1 -1
  326. package/dist/mainstack-design-system487.js +122 -32
  327. package/dist/mainstack-design-system488.cjs +1 -1
  328. package/dist/mainstack-design-system488.js +27 -22
  329. package/dist/mainstack-design-system489.cjs +1 -1
  330. package/dist/mainstack-design-system489.js +28 -28
  331. package/dist/mainstack-design-system490.cjs +1 -1
  332. package/dist/mainstack-design-system490.js +28 -35
  333. package/dist/mainstack-design-system491.cjs +2 -3
  334. package/dist/mainstack-design-system491.js +38 -16
  335. package/dist/mainstack-design-system492.cjs +3 -1
  336. package/dist/mainstack-design-system492.js +14 -15
  337. package/dist/mainstack-design-system493.cjs +1 -1
  338. package/dist/mainstack-design-system493.js +15 -13
  339. package/dist/mainstack-design-system494.cjs +1 -1
  340. package/dist/mainstack-design-system494.js +11 -11
  341. package/dist/mainstack-design-system495.cjs +1 -1
  342. package/dist/mainstack-design-system495.js +12 -12
  343. package/dist/mainstack-design-system496.cjs +1 -1
  344. package/dist/mainstack-design-system496.js +12 -12
  345. package/dist/mainstack-design-system497.cjs +1 -1
  346. package/dist/mainstack-design-system497.js +14 -7
  347. package/dist/mainstack-design-system498.cjs +1 -1
  348. package/dist/mainstack-design-system498.js +8 -14
  349. package/dist/mainstack-design-system499.cjs +1 -1
  350. package/dist/mainstack-design-system499.js +10 -14
  351. package/dist/mainstack-design-system500.cjs +1 -1
  352. package/dist/mainstack-design-system500.js +15 -13
  353. package/dist/mainstack-design-system501.cjs +1 -1
  354. package/dist/mainstack-design-system501.js +13 -14
  355. package/dist/mainstack-design-system502.cjs +1 -1
  356. package/dist/mainstack-design-system502.js +16 -30
  357. package/dist/mainstack-design-system503.cjs +1 -1
  358. package/dist/mainstack-design-system503.js +31 -16
  359. package/dist/mainstack-design-system504.cjs +1 -1
  360. package/dist/mainstack-design-system504.js +16 -43
  361. package/dist/mainstack-design-system505.cjs +1 -2
  362. package/dist/mainstack-design-system505.js +40 -28
  363. package/dist/mainstack-design-system506.cjs +2 -1
  364. package/dist/mainstack-design-system506.js +29 -73
  365. package/dist/mainstack-design-system507.cjs +1 -1
  366. package/dist/mainstack-design-system507.js +72 -19
  367. package/dist/mainstack-design-system508.cjs +1 -2
  368. package/dist/mainstack-design-system508.js +22 -14
  369. package/dist/mainstack-design-system509.cjs +1 -1
  370. package/dist/mainstack-design-system509.js +13 -37
  371. package/dist/mainstack-design-system510.cjs +1 -1
  372. package/dist/mainstack-design-system510.js +36 -31
  373. package/dist/mainstack-design-system511.cjs +1 -1
  374. package/dist/mainstack-design-system511.js +31 -38
  375. package/dist/mainstack-design-system512.cjs +1 -1
  376. package/dist/mainstack-design-system512.js +34 -41
  377. package/dist/mainstack-design-system513.cjs +1 -1
  378. package/dist/mainstack-design-system513.js +46 -13
  379. package/dist/mainstack-design-system514.cjs +1 -1
  380. package/dist/mainstack-design-system514.js +13 -32
  381. package/dist/mainstack-design-system515.cjs +1 -1
  382. package/dist/mainstack-design-system515.js +31 -38
  383. package/dist/mainstack-design-system516.cjs +1 -1
  384. package/dist/mainstack-design-system516.js +34 -41
  385. package/dist/mainstack-design-system517.cjs +2 -1
  386. package/dist/mainstack-design-system517.js +48 -17
  387. package/dist/mainstack-design-system518.cjs +1 -1
  388. package/dist/mainstack-design-system518.js +12 -17
  389. package/dist/mainstack-design-system519.cjs +1 -1
  390. package/dist/mainstack-design-system519.js +17 -44
  391. package/dist/mainstack-design-system520.cjs +1 -1
  392. package/dist/mainstack-design-system520.js +49 -27
  393. package/dist/mainstack-design-system521.cjs +1 -2
  394. package/dist/mainstack-design-system521.js +26 -24
  395. package/dist/mainstack-design-system522.cjs +1 -1
  396. package/dist/mainstack-design-system522.js +20 -31
  397. package/dist/mainstack-design-system523.cjs +2 -1
  398. package/dist/mainstack-design-system523.js +32 -15
  399. package/dist/mainstack-design-system524.cjs +1 -1
  400. package/dist/mainstack-design-system524.js +13 -13
  401. package/dist/mainstack-design-system525.cjs +1 -1
  402. package/dist/mainstack-design-system525.js +11 -11
  403. package/dist/mainstack-design-system526.cjs +1 -1
  404. package/dist/mainstack-design-system526.js +13 -11
  405. package/dist/mainstack-design-system527.cjs +1 -1
  406. package/dist/mainstack-design-system527.js +11 -10
  407. package/dist/mainstack-design-system528.cjs +1 -2
  408. package/dist/mainstack-design-system528.js +11 -16
  409. package/dist/mainstack-design-system529.cjs +1 -1
  410. package/dist/mainstack-design-system529.js +20 -4
  411. package/dist/mainstack-design-system530.cjs +1 -1
  412. package/dist/mainstack-design-system530.js +4 -8
  413. package/dist/mainstack-design-system531.cjs +1 -1
  414. package/dist/mainstack-design-system531.js +8 -5
  415. package/dist/mainstack-design-system532.cjs +2 -1
  416. package/dist/mainstack-design-system532.js +6 -15
  417. package/dist/mainstack-design-system533.cjs +1 -1
  418. package/dist/mainstack-design-system533.js +14 -13
  419. package/dist/mainstack-design-system534.cjs +1 -2
  420. package/dist/mainstack-design-system534.js +13 -17
  421. package/dist/mainstack-design-system535.cjs +1 -1
  422. package/dist/mainstack-design-system535.js +15 -21
  423. package/dist/mainstack-design-system536.cjs +1 -1
  424. package/dist/mainstack-design-system536.js +16 -9
  425. package/dist/mainstack-design-system537.cjs +1 -1
  426. package/dist/mainstack-design-system537.js +11 -18
  427. package/dist/mainstack-design-system538.cjs +2 -1
  428. package/dist/mainstack-design-system538.js +24 -29
  429. package/dist/mainstack-design-system539.cjs +1 -1
  430. package/dist/mainstack-design-system539.js +29 -15
  431. package/dist/mainstack-design-system540.cjs +1 -1
  432. package/dist/mainstack-design-system540.js +12 -9
  433. package/dist/mainstack-design-system541.cjs +1 -1
  434. package/dist/mainstack-design-system541.js +8 -18
  435. package/dist/mainstack-design-system542.cjs +1 -1
  436. package/dist/mainstack-design-system542.js +18 -15
  437. package/dist/mainstack-design-system543.cjs +1 -1
  438. package/dist/mainstack-design-system543.js +14 -14
  439. package/dist/mainstack-design-system544.cjs +1 -1
  440. package/dist/mainstack-design-system544.js +16 -18
  441. package/dist/mainstack-design-system545.cjs +1 -1
  442. package/dist/mainstack-design-system545.js +17 -11
  443. package/dist/mainstack-design-system546.cjs +1 -1
  444. package/dist/mainstack-design-system546.js +11 -11
  445. package/dist/mainstack-design-system547.cjs +1 -1
  446. package/dist/mainstack-design-system547.js +15 -55
  447. package/dist/mainstack-design-system548.cjs +1 -1
  448. package/dist/mainstack-design-system548.js +55 -35
  449. package/dist/mainstack-design-system549.cjs +1 -1
  450. package/dist/mainstack-design-system549.js +35 -23
  451. package/dist/mainstack-design-system550.cjs +1 -1
  452. package/dist/mainstack-design-system550.js +13 -13
  453. package/dist/mainstack-design-system551.cjs +1 -5
  454. package/dist/mainstack-design-system551.js +19 -50
  455. package/dist/mainstack-design-system552.cjs +5 -1
  456. package/dist/mainstack-design-system552.js +51 -30
  457. package/dist/mainstack-design-system553.cjs +1 -1
  458. package/dist/mainstack-design-system553.js +33 -7
  459. package/dist/mainstack-design-system554.cjs +1 -2
  460. package/dist/mainstack-design-system554.js +6 -84
  461. package/dist/mainstack-design-system555.cjs +2 -1
  462. package/dist/mainstack-design-system555.js +85 -203
  463. package/dist/mainstack-design-system556.cjs +1 -1
  464. package/dist/mainstack-design-system556.js +153 -33
  465. package/dist/mainstack-design-system557.cjs +1 -1
  466. package/dist/mainstack-design-system557.js +29 -13
  467. package/dist/mainstack-design-system558.cjs +1 -1
  468. package/dist/mainstack-design-system558.js +67 -11
  469. package/dist/mainstack-design-system559.cjs +1 -1
  470. package/dist/mainstack-design-system559.js +255 -5
  471. package/dist/mainstack-design-system560.cjs +1 -1
  472. package/dist/mainstack-design-system560.js +11 -23
  473. package/dist/mainstack-design-system561.cjs +1 -1
  474. package/dist/mainstack-design-system561.js +5 -9
  475. package/dist/mainstack-design-system562.cjs +1 -1
  476. package/dist/mainstack-design-system562.js +22 -42
  477. package/dist/mainstack-design-system563.cjs +1 -1
  478. package/dist/mainstack-design-system563.js +9 -14
  479. package/dist/mainstack-design-system564.cjs +1 -1
  480. package/dist/mainstack-design-system564.js +41 -47
  481. package/dist/mainstack-design-system565.cjs +1 -1
  482. package/dist/mainstack-design-system565.js +13 -18
  483. package/dist/mainstack-design-system566.cjs +1 -1
  484. package/dist/mainstack-design-system566.js +47 -97
  485. package/dist/mainstack-design-system567.cjs +1 -1
  486. package/dist/mainstack-design-system567.js +18 -37
  487. package/dist/mainstack-design-system568.cjs +1 -1
  488. package/dist/mainstack-design-system568.js +97 -13
  489. package/dist/mainstack-design-system569.cjs +1 -1
  490. package/dist/mainstack-design-system569.js +38 -255
  491. package/dist/mainstack-design-system570.cjs +1 -1
  492. package/dist/mainstack-design-system570.js +11 -9
  493. package/dist/mainstack-design-system571.cjs +1 -1
  494. package/dist/mainstack-design-system571.js +10 -7
  495. package/dist/mainstack-design-system572.cjs +1 -1
  496. package/dist/mainstack-design-system572.js +9 -47
  497. package/dist/mainstack-design-system573.cjs +1 -1
  498. package/dist/mainstack-design-system573.js +47 -14
  499. package/dist/mainstack-design-system574.cjs +1 -1
  500. package/dist/mainstack-design-system574.js +13 -21
  501. package/dist/mainstack-design-system575.cjs +1 -1
  502. package/dist/mainstack-design-system575.js +21 -13
  503. package/dist/mainstack-design-system576.cjs +1 -1
  504. package/dist/mainstack-design-system576.js +14 -14
  505. package/dist/mainstack-design-system577.cjs +1 -1
  506. package/dist/mainstack-design-system577.js +14 -12
  507. package/dist/mainstack-design-system578.cjs +1 -1
  508. package/dist/mainstack-design-system578.js +9 -11
  509. package/dist/mainstack-design-system579.cjs +1 -1
  510. package/dist/mainstack-design-system579.js +9 -9
  511. package/dist/mainstack-design-system580.cjs +1 -1
  512. package/dist/mainstack-design-system580.js +14 -16
  513. package/dist/mainstack-design-system581.cjs +1 -1
  514. package/dist/mainstack-design-system581.js +16 -16
  515. package/dist/mainstack-design-system582.cjs +1 -1
  516. package/dist/mainstack-design-system582.js +15 -11
  517. package/dist/mainstack-design-system583.cjs +1 -2
  518. package/dist/mainstack-design-system583.js +10 -11
  519. package/dist/mainstack-design-system584.cjs +2 -1
  520. package/dist/mainstack-design-system584.js +11 -24
  521. package/dist/mainstack-design-system585.cjs +1 -2
  522. package/dist/mainstack-design-system585.js +24 -258
  523. package/dist/mainstack-design-system586.cjs +1 -1
  524. package/dist/mainstack-design-system586.js +228 -121
  525. package/dist/mainstack-design-system587.cjs +2 -1
  526. package/dist/mainstack-design-system587.js +147 -49
  527. package/dist/mainstack-design-system588.cjs +1 -1
  528. package/dist/mainstack-design-system588.js +51 -2853
  529. package/dist/mainstack-design-system589.cjs +1 -2
  530. package/dist/mainstack-design-system589.js +2886 -95
  531. package/dist/mainstack-design-system590.cjs +2 -1
  532. package/dist/mainstack-design-system590.js +97 -74
  533. package/dist/mainstack-design-system591.cjs +1 -1
  534. package/dist/mainstack-design-system591.js +75 -20
  535. package/dist/mainstack-design-system592.cjs +1 -2
  536. package/dist/mainstack-design-system592.js +20 -124
  537. package/dist/mainstack-design-system593.cjs +2 -2
  538. package/dist/mainstack-design-system593.js +193 -267
  539. package/dist/mainstack-design-system594.cjs +2 -5
  540. package/dist/mainstack-design-system594.js +123 -2161
  541. package/dist/mainstack-design-system595.cjs +5 -10
  542. package/dist/mainstack-design-system595.js +2144 -166
  543. package/dist/mainstack-design-system596.cjs +9 -41
  544. package/dist/mainstack-design-system596.js +162 -23710
  545. package/dist/mainstack-design-system597.cjs +41 -3
  546. package/dist/mainstack-design-system597.js +23491 -7195
  547. package/dist/mainstack-design-system598.cjs +3 -1
  548. package/dist/mainstack-design-system598.js +7192 -2604
  549. package/dist/mainstack-design-system599.cjs +2 -1
  550. package/dist/mainstack-design-system599.js +2852 -1
  551. package/dist/mainstack-design-system600.cjs +1 -1
  552. package/dist/mainstack-design-system600.js +1 -11
  553. package/dist/mainstack-design-system601.cjs +1 -0
  554. package/dist/mainstack-design-system601.js +11 -0
  555. package/package.json +1 -1
  556. package/dist/_commonjsHelpers-C6fGbg64.js +0 -6
  557. package/dist/_commonjsHelpers-DwGv2jUC.cjs +0 -1
  558. package/dist/en.json-C_LsdSZ9.cjs +0 -1
  559. package/dist/en.json-x2mHjhnP.js +0 -263
  560. package/dist/getInternationalPhoneNumberPrefix-2_e9S-q4.js +0 -3704
  561. package/dist/getInternationalPhoneNumberPrefix-oZHfGGGj.cjs +0 -15
  562. package/dist/index-BaLp3DZq.js +0 -1728
  563. package/dist/index-CQkZgGe1.cjs +0 -2
  564. package/dist/index-CeH95e4J.js +0 -646
  565. package/dist/index-D6rpLeOg.cjs +0 -4
@@ -1,1728 +0,0 @@
1
- import { n as Ve, p as We, M as ve, i as De, g as N, a as W, A as D, v as ge, I as Ze, c as Xe, m as be, l as he, d as Ce } from "./getInternationalPhoneNumberPrefix-2_e9S-q4.js";
2
- import c, { useMemo as Oe, useCallback as ze } from "react";
3
- import { c as Ke } from "./en.json-x2mHjhnP.js";
4
- import { P as u } from "./index-CeH95e4J.js";
5
- import { g as Ge } from "./_commonjsHelpers-C6fGbg64.js";
6
- var H = { exports: {} };
7
- var ae;
8
- function He() {
9
- return ae || (ae = 1, (function(e) {
10
- (function() {
11
- var n = {}.hasOwnProperty;
12
- function r() {
13
- for (var a = "", i = 0; i < arguments.length; i++) {
14
- var l = arguments[i];
15
- l && (a = o(a, t(l)));
16
- }
17
- return a;
18
- }
19
- function t(a) {
20
- if (typeof a == "string" || typeof a == "number")
21
- return a;
22
- if (typeof a != "object")
23
- return "";
24
- if (Array.isArray(a))
25
- return r.apply(null, a);
26
- if (a.toString !== Object.prototype.toString && !a.toString.toString().includes("[native code]"))
27
- return a.toString();
28
- var i = "";
29
- for (var l in a)
30
- n.call(a, l) && a[l] && (i = o(i, l));
31
- return i;
32
- }
33
- function o(a, i) {
34
- return i ? a ? a + " " + i : a + i : a;
35
- }
36
- e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
37
- })();
38
- })(H)), H.exports;
39
- }
40
- var Ye = He();
41
- const B = /* @__PURE__ */ Ge(Ye);
42
- function Je() {
43
- var e = Ve(arguments), n = e.text, r = e.options, t = e.metadata;
44
- return We(n, r, t);
45
- }
46
- function Y(e) {
47
- return new ve(e).getCountries();
48
- }
49
- function Qe(e) {
50
- return ie(e[0]) + ie(e[1]);
51
- }
52
- function ie(e) {
53
- return String.fromCodePoint(127397 + e.toUpperCase().charCodeAt(0));
54
- }
55
- var et = ["value", "onChange", "options", "disabled", "readOnly"], tt = ["value", "options", "className", "iconComponent", "getIconAspectRatio", "arrowComponent", "unicodeFlags"];
56
- function nt(e, n) {
57
- var r = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
58
- if (r) return (r = r.call(e)).next.bind(r);
59
- if (Array.isArray(e) || (r = rt(e)) || n) {
60
- r && (e = r);
61
- var t = 0;
62
- return function() {
63
- return t >= e.length ? { done: !0 } : { done: !1, value: e[t++] };
64
- };
65
- }
66
- throw new TypeError(`Invalid attempt to iterate non-iterable instance.
67
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
68
- }
69
- function rt(e, n) {
70
- if (e) {
71
- if (typeof e == "string") return ue(e, n);
72
- var r = Object.prototype.toString.call(e).slice(8, -1);
73
- if (r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set") return Array.from(e);
74
- if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return ue(e, n);
75
- }
76
- }
77
- function ue(e, n) {
78
- (n == null || n > e.length) && (n = e.length);
79
- for (var r = 0, t = new Array(n); r < n; r++) t[r] = e[r];
80
- return t;
81
- }
82
- function q() {
83
- return q = Object.assign ? Object.assign.bind() : function(e) {
84
- for (var n = 1; n < arguments.length; n++) {
85
- var r = arguments[n];
86
- for (var t in r)
87
- Object.prototype.hasOwnProperty.call(r, t) && (e[t] = r[t]);
88
- }
89
- return e;
90
- }, q.apply(this, arguments);
91
- }
92
- function Se(e, n) {
93
- if (e == null) return {};
94
- var r = ot(e, n), t, o;
95
- if (Object.getOwnPropertySymbols) {
96
- var a = Object.getOwnPropertySymbols(e);
97
- for (o = 0; o < a.length; o++)
98
- t = a[o], !(n.indexOf(t) >= 0) && Object.prototype.propertyIsEnumerable.call(e, t) && (r[t] = e[t]);
99
- }
100
- return r;
101
- }
102
- function ot(e, n) {
103
- if (e == null) return {};
104
- var r = {}, t = Object.keys(e), o, a;
105
- for (a = 0; a < t.length; a++)
106
- o = t[a], !(n.indexOf(o) >= 0) && (r[o] = e[o]);
107
- return r;
108
- }
109
- function Pe(e) {
110
- var n = e.value, r = e.onChange, t = e.options, o = e.disabled, a = e.readOnly, i = Se(e, et), l = ze(function(s) {
111
- var y = s.target.value;
112
- r(y === "ZZ" ? void 0 : y);
113
- }, [r]);
114
- return Oe(function() {
115
- return je(t, n);
116
- }, [t, n]), /* @__PURE__ */ c.createElement("select", q({}, i, {
117
- disabled: o || a,
118
- readOnly: a,
119
- value: n || "ZZ",
120
- onChange: l
121
- }), t.map(function(s) {
122
- var y = s.value, v = s.label, m = s.divider;
123
- return /* @__PURE__ */ c.createElement("option", {
124
- key: m ? "|" : y || "ZZ",
125
- value: m ? "|" : y || "ZZ",
126
- disabled: !!m,
127
- style: m ? at : void 0
128
- }, v);
129
- }));
130
- }
131
- Pe.propTypes = {
132
- /**
133
- * A two-letter country code.
134
- * Example: "US", "RU", etc.
135
- */
136
- value: u.string,
137
- /**
138
- * A function of `value: string`.
139
- * Updates the `value` property.
140
- */
141
- onChange: u.func.isRequired,
142
- // `<select/>` options.
143
- options: u.arrayOf(u.shape({
144
- value: u.string,
145
- label: u.string,
146
- divider: u.bool
147
- })).isRequired,
148
- // `readonly` attribute doesn't work on a `<select/>`.
149
- // https://github.com/catamphetamine/react-phone-number-input/issues/419#issuecomment-1764384480
150
- // https://www.delftstack.com/howto/html/html-select-readonly/
151
- // To work around that, if `readOnly: true` property is passed
152
- // to this component, it behaves analogous to `disabled: true`.
153
- disabled: u.bool,
154
- readOnly: u.bool
155
- };
156
- var at = {
157
- fontSize: "1px",
158
- backgroundColor: "currentColor",
159
- color: "inherit"
160
- };
161
- function Ie(e) {
162
- var n = e.value, r = e.options, t = e.className, o = e.iconComponent;
163
- e.getIconAspectRatio;
164
- var a = e.arrowComponent, i = a === void 0 ? it : a, l = e.unicodeFlags, s = Se(e, tt), y = Oe(function() {
165
- return je(r, n);
166
- }, [r, n]);
167
- return /* @__PURE__ */ c.createElement("div", {
168
- className: "PhoneInputCountry"
169
- }, /* @__PURE__ */ c.createElement(Pe, q({}, s, {
170
- value: n,
171
- options: r,
172
- className: B("PhoneInputCountrySelect", t)
173
- })), y && (l && n ? /* @__PURE__ */ c.createElement("div", {
174
- className: "PhoneInputCountryIconUnicode"
175
- }, Qe(n)) : /* @__PURE__ */ c.createElement(o, {
176
- "aria-hidden": !0,
177
- country: n,
178
- label: y.label,
179
- aspectRatio: l ? 1 : void 0
180
- })), /* @__PURE__ */ c.createElement(i, null));
181
- }
182
- Ie.propTypes = {
183
- // Country flag component.
184
- iconComponent: u.elementType,
185
- // Select arrow component.
186
- arrowComponent: u.elementType,
187
- // Set to `true` to render Unicode flag icons instead of SVG images.
188
- unicodeFlags: u.bool
189
- };
190
- function it() {
191
- return /* @__PURE__ */ c.createElement("div", {
192
- className: "PhoneInputCountrySelectArrow"
193
- });
194
- }
195
- function je(e, n) {
196
- for (var r = nt(e), t; !(t = r()).done; ) {
197
- var o = t.value;
198
- if (!o.divider && ut(o.value, n))
199
- return o;
200
- }
201
- }
202
- function ut(e, n) {
203
- return e == null ? n == null : e === n;
204
- }
205
- var lt = ["country", "countryName", "flags", "flagUrl"];
206
- function J() {
207
- return J = Object.assign ? Object.assign.bind() : function(e) {
208
- for (var n = 1; n < arguments.length; n++) {
209
- var r = arguments[n];
210
- for (var t in r)
211
- Object.prototype.hasOwnProperty.call(r, t) && (e[t] = r[t]);
212
- }
213
- return e;
214
- }, J.apply(this, arguments);
215
- }
216
- function ct(e, n) {
217
- if (e == null) return {};
218
- var r = st(e, n), t, o;
219
- if (Object.getOwnPropertySymbols) {
220
- var a = Object.getOwnPropertySymbols(e);
221
- for (o = 0; o < a.length; o++)
222
- t = a[o], !(n.indexOf(t) >= 0) && Object.prototype.propertyIsEnumerable.call(e, t) && (r[t] = e[t]);
223
- }
224
- return r;
225
- }
226
- function st(e, n) {
227
- if (e == null) return {};
228
- var r = {}, t = Object.keys(e), o, a;
229
- for (a = 0; a < t.length; a++)
230
- o = t[a], !(n.indexOf(o) >= 0) && (r[o] = e[o]);
231
- return r;
232
- }
233
- function ne(e) {
234
- var n = e.country, r = e.countryName, t = e.flags, o = e.flagUrl, a = ct(e, lt);
235
- return t && t[n] ? t[n]({
236
- title: r
237
- }) : /* @__PURE__ */ c.createElement("img", J({}, a, {
238
- alt: r,
239
- role: r ? void 0 : "presentation",
240
- src: o.replace("{XX}", n).replace("{xx}", n.toLowerCase())
241
- }));
242
- }
243
- ne.propTypes = {
244
- // The country to be selected by default.
245
- // Two-letter country code ("ISO 3166-1 alpha-2").
246
- country: u.string.isRequired,
247
- // Will be HTML `title` attribute of the `<img/>`.
248
- countryName: u.string.isRequired,
249
- // Country flag icon components.
250
- // By default flag icons are inserted as `<img/>`s
251
- // with their `src` pointed to `country-flag-icons` gitlab pages website.
252
- // There might be cases (e.g. an offline application)
253
- // where having a large (3 megabyte) `<svg/>` flags
254
- // bundle is more appropriate.
255
- // `import flags from 'react-phone-number-input/flags'`.
256
- flags: u.objectOf(u.elementType),
257
- // A URL for a country flag icon.
258
- // By default it points to `country-flag-icons` gitlab pages website.
259
- flagUrl: u.string.isRequired
260
- };
261
- var ft = ["aspectRatio"], pt = ["title"], yt = ["title"];
262
- function k() {
263
- return k = Object.assign ? Object.assign.bind() : function(e) {
264
- for (var n = 1; n < arguments.length; n++) {
265
- var r = arguments[n];
266
- for (var t in r)
267
- Object.prototype.hasOwnProperty.call(r, t) && (e[t] = r[t]);
268
- }
269
- return e;
270
- }, k.apply(this, arguments);
271
- }
272
- function re(e, n) {
273
- if (e == null) return {};
274
- var r = dt(e, n), t, o;
275
- if (Object.getOwnPropertySymbols) {
276
- var a = Object.getOwnPropertySymbols(e);
277
- for (o = 0; o < a.length; o++)
278
- t = a[o], !(n.indexOf(t) >= 0) && Object.prototype.propertyIsEnumerable.call(e, t) && (r[t] = e[t]);
279
- }
280
- return r;
281
- }
282
- function dt(e, n) {
283
- if (e == null) return {};
284
- var r = {}, t = Object.keys(e), o, a;
285
- for (a = 0; a < t.length; a++)
286
- o = t[a], !(n.indexOf(o) >= 0) && (r[o] = e[o]);
287
- return r;
288
- }
289
- function Z(e) {
290
- var n = e.aspectRatio, r = re(e, ft);
291
- return n === 1 ? /* @__PURE__ */ c.createElement(Ne, r) : /* @__PURE__ */ c.createElement(we, r);
292
- }
293
- Z.propTypes = {
294
- title: u.string.isRequired,
295
- aspectRatio: u.number
296
- };
297
- function we(e) {
298
- var n = e.title, r = re(e, pt);
299
- return /* @__PURE__ */ c.createElement("svg", k({}, r, {
300
- xmlns: "http://www.w3.org/2000/svg",
301
- viewBox: "0 0 75 50"
302
- }), /* @__PURE__ */ c.createElement("title", null, n), /* @__PURE__ */ c.createElement("g", {
303
- className: "PhoneInputInternationalIconGlobe",
304
- stroke: "currentColor",
305
- fill: "none",
306
- strokeWidth: "2",
307
- strokeMiterlimit: "10"
308
- }, /* @__PURE__ */ c.createElement("path", {
309
- strokeLinecap: "round",
310
- d: "M47.2,36.1C48.1,36,49,36,50,36c7.4,0,14,1.7,18.5,4.3"
311
- }), /* @__PURE__ */ c.createElement("path", {
312
- d: "M68.6,9.6C64.2,12.3,57.5,14,50,14c-7.4,0-14-1.7-18.5-4.3"
313
- }), /* @__PURE__ */ c.createElement("line", {
314
- x1: "26",
315
- y1: "25",
316
- x2: "74",
317
- y2: "25"
318
- }), /* @__PURE__ */ c.createElement("line", {
319
- x1: "50",
320
- y1: "1",
321
- x2: "50",
322
- y2: "49"
323
- }), /* @__PURE__ */ c.createElement("path", {
324
- strokeLinecap: "round",
325
- d: "M46.3,48.7c1.2,0.2,2.5,0.3,3.7,0.3c13.3,0,24-10.7,24-24S63.3,1,50,1S26,11.7,26,25c0,2,0.3,3.9,0.7,5.8"
326
- }), /* @__PURE__ */ c.createElement("path", {
327
- strokeLinecap: "round",
328
- d: "M46.8,48.2c1,0.6,2.1,0.8,3.2,0.8c6.6,0,12-10.7,12-24S56.6,1,50,1S38,11.7,38,25c0,1.4,0.1,2.7,0.2,4c0,0.1,0,0.2,0,0.2"
329
- })), /* @__PURE__ */ c.createElement("path", {
330
- className: "PhoneInputInternationalIconPhone",
331
- stroke: "none",
332
- fill: "currentColor",
333
- d: "M12.4,17.9c2.9-2.9,5.4-4.8,0.3-11.2S4.1,5.2,1.3,8.1C-2,11.4,1.1,23.5,13.1,35.6s24.3,15.2,27.5,11.9c2.8-2.8,7.8-6.3,1.4-11.5s-8.3-2.6-11.2,0.3c-2,2-7.2-2.2-11.7-6.7S10.4,19.9,12.4,17.9z"
334
- }));
335
- }
336
- we.propTypes = {
337
- title: u.string.isRequired
338
- };
339
- function Ne(e) {
340
- var n = e.title, r = re(e, yt);
341
- return /* @__PURE__ */ c.createElement("svg", k({}, r, {
342
- xmlns: "http://www.w3.org/2000/svg",
343
- viewBox: "0 0 50 50"
344
- }), /* @__PURE__ */ c.createElement("title", null, n), /* @__PURE__ */ c.createElement("g", {
345
- className: "PhoneInputInternationalIconGlobe",
346
- stroke: "currentColor",
347
- fill: "none",
348
- strokeWidth: "2",
349
- strokeLinecap: "round"
350
- }, /* @__PURE__ */ c.createElement("path", {
351
- d: "M8.45,13A21.44,21.44,0,1,1,37.08,41.56"
352
- }), /* @__PURE__ */ c.createElement("path", {
353
- d: "M19.36,35.47a36.9,36.9,0,0,1-2.28-13.24C17.08,10.39,21.88.85,27.8.85s10.72,9.54,10.72,21.38c0,6.48-1.44,12.28-3.71,16.21"
354
- }), /* @__PURE__ */ c.createElement("path", {
355
- d: "M17.41,33.4A39,39,0,0,1,27.8,32.06c6.62,0,12.55,1.5,16.48,3.86"
356
- }), /* @__PURE__ */ c.createElement("path", {
357
- d: "M44.29,8.53c-3.93,2.37-9.86,3.88-16.49,3.88S15.25,10.9,11.31,8.54"
358
- }), /* @__PURE__ */ c.createElement("line", {
359
- x1: "27.8",
360
- y1: "0.85",
361
- x2: "27.8",
362
- y2: "34.61"
363
- }), /* @__PURE__ */ c.createElement("line", {
364
- x1: "15.2",
365
- y1: "22.23",
366
- x2: "49.15",
367
- y2: "22.23"
368
- })), /* @__PURE__ */ c.createElement("path", {
369
- className: "PhoneInputInternationalIconPhone",
370
- stroke: "transparent",
371
- fill: "currentColor",
372
- d: "M9.42,26.64c2.22-2.22,4.15-3.59.22-8.49S3.08,17,.93,19.17c-2.49,2.48-.13,11.74,9,20.89s18.41,11.5,20.89,9c2.15-2.15,5.91-4.77,1-8.71s-6.27-2-8.49.22c-1.55,1.55-5.48-1.69-8.86-5.08S7.87,28.19,9.42,26.64Z"
373
- }));
374
- }
375
- Ne.propTypes = {
376
- title: u.string.isRequired
377
- };
378
- function mt(e, n) {
379
- var r = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
380
- if (r) return (r = r.call(e)).next.bind(r);
381
- if (Array.isArray(e) || (r = vt(e)) || n) {
382
- r && (e = r);
383
- var t = 0;
384
- return function() {
385
- return t >= e.length ? { done: !0 } : { done: !1, value: e[t++] };
386
- };
387
- }
388
- throw new TypeError(`Invalid attempt to iterate non-iterable instance.
389
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
390
- }
391
- function vt(e, n) {
392
- if (e) {
393
- if (typeof e == "string") return le(e, n);
394
- var r = Object.prototype.toString.call(e).slice(8, -1);
395
- if (r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set") return Array.from(e);
396
- if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return le(e, n);
397
- }
398
- }
399
- function le(e, n) {
400
- (n == null || n > e.length) && (n = e.length);
401
- for (var r = 0, t = new Array(n); r < n; r++) t[r] = e[r];
402
- return t;
403
- }
404
- function gt(e, n) {
405
- if (!n)
406
- return e;
407
- for (var r = [], t = [], o = r, a = function() {
408
- var y = l.value;
409
- if (y === "|")
410
- o.push({
411
- divider: !0
412
- });
413
- else if (y === "..." || y === "…")
414
- o = t;
415
- else {
416
- var v;
417
- y === "🌐" ? v = void 0 : v = y;
418
- var m = e.indexOf(e.filter(function(b) {
419
- return b.value === v;
420
- })[0]), d = e[m];
421
- e.splice(m, 1), o.push(d);
422
- }
423
- }, i = mt(n), l; !(l = i()).done; )
424
- a();
425
- return r.concat(e).concat(t);
426
- }
427
- function bt(e, n) {
428
- if (e && (e = e.filter(function(r) {
429
- switch (r) {
430
- case "🌐":
431
- case "|":
432
- case "...":
433
- case "…":
434
- return !0;
435
- default:
436
- return X(r, n);
437
- }
438
- }), e.length > 0))
439
- return e;
440
- }
441
- function X(e, n) {
442
- return De(e, n) ? !0 : (console.error("Country not found: ".concat(e)), !1);
443
- }
444
- function Ee(e, n) {
445
- return e && (e = e.filter(function(r) {
446
- return X(r, n);
447
- }), e.length === 0 && (e = void 0)), e;
448
- }
449
- var ht = ["country", "label", "aspectRatio"];
450
- function Q() {
451
- return Q = Object.assign ? Object.assign.bind() : function(e) {
452
- for (var n = 1; n < arguments.length; n++) {
453
- var r = arguments[n];
454
- for (var t in r)
455
- Object.prototype.hasOwnProperty.call(r, t) && (e[t] = r[t]);
456
- }
457
- return e;
458
- }, Q.apply(this, arguments);
459
- }
460
- function Ct(e, n) {
461
- if (e == null) return {};
462
- var r = Ot(e, n), t, o;
463
- if (Object.getOwnPropertySymbols) {
464
- var a = Object.getOwnPropertySymbols(e);
465
- for (o = 0; o < a.length; o++)
466
- t = a[o], !(n.indexOf(t) >= 0) && Object.prototype.propertyIsEnumerable.call(e, t) && (r[t] = e[t]);
467
- }
468
- return r;
469
- }
470
- function Ot(e, n) {
471
- if (e == null) return {};
472
- var r = {}, t = Object.keys(e), o, a;
473
- for (a = 0; a < t.length; a++)
474
- o = t[a], !(n.indexOf(o) >= 0) && (r[o] = e[o]);
475
- return r;
476
- }
477
- function xe(e) {
478
- var n = e.flags, r = e.flagUrl, t = e.flagComponent, o = e.internationalIcon;
479
- function a(i) {
480
- var l = i.country, s = i.label, y = i.aspectRatio, v = Ct(i, ht), m = o === Z ? y : void 0;
481
- return /* @__PURE__ */ c.createElement("div", Q({}, v, {
482
- className: B("PhoneInputCountryIcon", {
483
- "PhoneInputCountryIcon--square": m === 1,
484
- "PhoneInputCountryIcon--border": l
485
- })
486
- }), l ? /* @__PURE__ */ c.createElement(t, {
487
- country: l,
488
- countryName: s,
489
- flags: n,
490
- flagUrl: r,
491
- className: "PhoneInputCountryIconImg"
492
- }) : /* @__PURE__ */ c.createElement(o, {
493
- title: s,
494
- aspectRatio: m,
495
- className: "PhoneInputCountryIconImg"
496
- }));
497
- }
498
- return a.propTypes = {
499
- country: u.string,
500
- label: u.string.isRequired,
501
- aspectRatio: u.number
502
- }, a;
503
- }
504
- xe({
505
- // Must be equal to `defaultProps.flagUrl` in `./PhoneInputWithCountry.js`.
506
- flagUrl: "https://purecatamphetamine.github.io/country-flag-icons/3x2/{XX}.svg",
507
- flagComponent: ne,
508
- internationalIcon: Z
509
- });
510
- function St(e, n) {
511
- var r = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
512
- if (r) return (r = r.call(e)).next.bind(r);
513
- if (Array.isArray(e) || (r = Pt(e)) || n) {
514
- r && (e = r);
515
- var t = 0;
516
- return function() {
517
- return t >= e.length ? { done: !0 } : { done: !1, value: e[t++] };
518
- };
519
- }
520
- throw new TypeError(`Invalid attempt to iterate non-iterable instance.
521
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
522
- }
523
- function Pt(e, n) {
524
- if (e) {
525
- if (typeof e == "string") return ce(e, n);
526
- var r = Object.prototype.toString.call(e).slice(8, -1);
527
- if (r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set") return Array.from(e);
528
- if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return ce(e, n);
529
- }
530
- }
531
- function ce(e, n) {
532
- (n == null || n > e.length) && (n = e.length);
533
- for (var r = 0, t = new Array(n); r < n; r++) t[r] = e[r];
534
- return t;
535
- }
536
- function It(e, n) {
537
- for (var r = St(e), t; !(t = r()).done; ) {
538
- var o = t.value;
539
- o && jt(o, n);
540
- }
541
- }
542
- function jt(e, n) {
543
- typeof e == "function" ? e(n) : e.current = n;
544
- }
545
- function wt(e) {
546
- var n = e.value, r = e.phoneNumber, t = e.defaultCountry, o = e.getAnyCountry, a = e.countries, i = e.required, l = e.metadata, s;
547
- return r && r.country ? s = r.country : t && (!n || $(n, t, l)) && (s = t), a && a.indexOf(s) < 0 && (s = void 0), !s && i && a && a.length > 0 && (s = o()), s;
548
- }
549
- function Nt(e) {
550
- var n = e.countries, r = e.countryNames, t = e.addInternationalOption, o = e.compareStringsLocales, a = e.compareStrings;
551
- a || (a = Tt);
552
- var i = n.map(function(l) {
553
- return {
554
- value: l,
555
- // All `locale` country names included in this library
556
- // include all countries (this is checked at build time).
557
- // The only case when a country name might be missing
558
- // is when a developer supplies their own `labels` property.
559
- // To guard against such cases, a missing country name
560
- // is substituted by country code.
561
- label: r[l] || l
562
- };
563
- });
564
- return i.sort(function(l, s) {
565
- return a(l.label, s.label, o);
566
- }), t && i.unshift({
567
- label: r.ZZ
568
- }), i;
569
- }
570
- function Ae(e, n) {
571
- return Je(e || "", n);
572
- }
573
- function Et(e) {
574
- return e.formatNational().replace(/\D/g, "");
575
- }
576
- function xt(e, n) {
577
- var r = n.prevCountry, t = n.newCountry, o = n.metadata, a = n.useNationalFormat;
578
- if (r === t)
579
- return e;
580
- if (!e)
581
- return a ? "" : t ? N(t, o) : "";
582
- if (t) {
583
- if (e[0] === "+") {
584
- if (a)
585
- return e.indexOf("+" + W(t, o)) === 0 ? _t(e, t, o) : "";
586
- if (r) {
587
- var i = N(t, o);
588
- return e.indexOf(i) === 0 ? e : i;
589
- } else {
590
- var l = N(t, o);
591
- return e.indexOf(l) === 0 ? e : l;
592
- }
593
- }
594
- } else if (e[0] !== "+")
595
- return R(e, r, o) || "";
596
- return e;
597
- }
598
- function R(e, n, r) {
599
- if (e) {
600
- if (e[0] === "+") {
601
- if (e === "+")
602
- return;
603
- var t = new D(n, r);
604
- return t.input(e), t.getNumberValue();
605
- }
606
- if (n) {
607
- var o = $e(e, n, r);
608
- return "+".concat(W(n, r)).concat(o || "");
609
- }
610
- }
611
- }
612
- function At(e, n, r) {
613
- var t = $e(e, n, r);
614
- if (t) {
615
- var o = t.length - Rt(n, r);
616
- if (o > 0)
617
- return e.slice(0, e.length - o);
618
- }
619
- return e;
620
- }
621
- function Rt(e, n) {
622
- return n = new ve(n), n.selectNumberingPlan(e), n.numberingPlan.possibleLengths()[n.numberingPlan.possibleLengths().length - 1];
623
- }
624
- function Re(e, n) {
625
- var r = n.country, t = n.countries, o = n.defaultCountry, a = n.latestCountrySelectedByUser, i = n.required, l = n.metadata;
626
- if (e === "+")
627
- return r;
628
- var s = Ft(e, l);
629
- if (s)
630
- return !t || t.indexOf(s) >= 0 ? s : void 0;
631
- if (r) {
632
- if ($(e, r, l)) {
633
- if (a && $(e, a, l))
634
- return a;
635
- if (o && $(e, o, l))
636
- return o;
637
- if (!i)
638
- return;
639
- } else if (!i)
640
- return;
641
- }
642
- return r;
643
- }
644
- function $t(e, n) {
645
- var r = n.prevPhoneDigits, t = n.country, o = n.defaultCountry, a = n.latestCountrySelectedByUser, i = n.countryRequired, l = n.getAnyCountry, s = n.countries, y = n.international, v = n.limitMaxLength, m = n.countryCallingCodeEditable, d = n.metadata;
646
- if (y && m === !1 && t) {
647
- var b = N(t, d);
648
- if (e.indexOf(b) !== 0) {
649
- var h, A = e && e[0] !== "+";
650
- return A ? (e = b + e, h = R(e, t, d)) : e = b, {
651
- phoneDigits: e,
652
- value: h,
653
- country: t
654
- };
655
- }
656
- }
657
- y === !1 && t && e && e[0] === "+" && (e = se(e, t, d)), e && t && v && (e = At(e, t, d)), e && e[0] !== "+" && (!t || y) && (e = "+" + e), !e && r && r[0] === "+" && (y ? t = void 0 : t = o), e === "+" && r && r[0] === "+" && r.length > 1 && (t = void 0);
658
- var f;
659
- return e && (e[0] === "+" && (e === "+" || t && N(t, d).indexOf(e) === 0) ? f = void 0 : f = R(e, t, d)), f && (t = Re(f, {
660
- country: t,
661
- countries: s,
662
- defaultCountry: o,
663
- latestCountrySelectedByUser: a,
664
- // `countryRequired` flag is not passed here.
665
- // Instead, it's explicitly checked a bit later in the code.
666
- required: !1,
667
- metadata: d
668
- }), y === !1 && t && e && e[0] === "+" && (e = se(e, t, d), f = R(e, t, d))), !t && i && (t = o || l()), {
669
- // `phoneDigits` returned here are a "normalized" version of the original `phoneDigits`.
670
- // The returned `phoneDigits` shouldn't be used anywhere except for passing it as
671
- // `prevPhoneDigits` parameter to this same function on next input change event.
672
- phoneDigits: e,
673
- country: t,
674
- value: f
675
- };
676
- }
677
- function se(e, n, r) {
678
- if (e.indexOf(N(n, r)) === 0) {
679
- var t = new D(n, r);
680
- t.input(e);
681
- var o = t.getNumber();
682
- return o ? o.formatNational().replace(/\D/g, "") : "";
683
- } else
684
- return e.replace(/\D/g, "");
685
- }
686
- function Ft(e, n) {
687
- var r = new D(null, n);
688
- return r.input(e), r.getCountry();
689
- }
690
- function Tt(e, n, r) {
691
- return String.prototype.localeCompare ? e.localeCompare(n, r) : e < n ? -1 : e > n ? 1 : 0;
692
- }
693
- function _t(e, n, r) {
694
- if (n) {
695
- var t = "+" + W(n, r);
696
- if (e.length < t.length) {
697
- if (t.indexOf(e) === 0)
698
- return "";
699
- } else if (e.indexOf(t) === 0)
700
- return e.slice(t.length);
701
- }
702
- for (var o = 0, a = Object.keys(r.country_calling_codes); o < a.length; o++) {
703
- var i = a[o];
704
- if (e.indexOf(i) === 1)
705
- return e.slice(1 + i.length);
706
- }
707
- return "";
708
- }
709
- function $e(e, n, r) {
710
- var t = new D(n, r);
711
- t.input(e);
712
- var o = t.getNumber();
713
- return o && o.nationalNumber;
714
- }
715
- function $(e, n, r) {
716
- for (var t = N(n, r), o = 0; o < e.length && o < t.length; ) {
717
- if (e[o] !== t[o])
718
- return !1;
719
- o++;
720
- }
721
- return !0;
722
- }
723
- function Fe(e) {
724
- var n = e.value, r = e.phoneNumber, t = e.defaultCountry, o = e.international, a = e.useNationalFormat, i = e.metadata;
725
- return (o === !1 || a) && r && r.country ? Et(r) : !n && o && t ? N(t, i) : n;
726
- }
727
- function U(e) {
728
- "@babel/helpers - typeof";
729
- return U = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(n) {
730
- return typeof n;
731
- } : function(n) {
732
- return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
733
- }, U(e);
734
- }
735
- function fe(e, n) {
736
- var r = Object.keys(e);
737
- if (Object.getOwnPropertySymbols) {
738
- var t = Object.getOwnPropertySymbols(e);
739
- n && (t = t.filter(function(o) {
740
- return Object.getOwnPropertyDescriptor(e, o).enumerable;
741
- })), r.push.apply(r, t);
742
- }
743
- return r;
744
- }
745
- function M(e) {
746
- for (var n = 1; n < arguments.length; n++) {
747
- var r = arguments[n] != null ? arguments[n] : {};
748
- n % 2 ? fe(Object(r), !0).forEach(function(t) {
749
- Lt(e, t, r[t]);
750
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : fe(Object(r)).forEach(function(t) {
751
- Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t));
752
- });
753
- }
754
- return e;
755
- }
756
- function Lt(e, n, r) {
757
- return n = Ut(n), n in e ? Object.defineProperty(e, n, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[n] = r, e;
758
- }
759
- function Ut(e) {
760
- var n = Mt(e, "string");
761
- return U(n) == "symbol" ? n : n + "";
762
- }
763
- function Mt(e, n) {
764
- if (U(e) != "object" || !e) return e;
765
- var r = e[Symbol.toPrimitive];
766
- if (r !== void 0) {
767
- var t = r.call(e, n);
768
- if (U(t) != "object") return t;
769
- throw new TypeError("@@toPrimitive must return a primitive value.");
770
- }
771
- return (n === "string" ? String : Number)(e);
772
- }
773
- function Bt(e, n, r) {
774
- var t = e.metadata, o = e.countries, a = e.defaultCountry, i = e.value, l = e.reset, s = e.international, y = e.displayInitialValueAsLocalNumber, v = e.initialValueFormat, m = n.defaultCountry, d = n.value, b = n.reset;
775
- r.country;
776
- var h = r.value, A = r.hasUserSelectedACountry, f = r.latestCountrySelectedByUser, p = function(_) {
777
- return Fe(M(M({}, _), {}, {
778
- international: s,
779
- useNationalFormat: y || v === "national",
780
- metadata: t
781
- }));
782
- };
783
- if (l !== b)
784
- return {
785
- phoneDigits: p({
786
- value: void 0,
787
- defaultCountry: a
788
- }),
789
- value: void 0,
790
- country: a,
791
- latestCountrySelectedByUser: void 0,
792
- hasUserSelectedACountry: void 0
793
- };
794
- if (a !== m) {
795
- var O = !a || X(a, t), S = (
796
- // By default, "no value has been entered" means `value` is `undefined`.
797
- !h || // When `international` is `true`, and some country has been pre-selected,
798
- // then the `<input/>` contains a pre-filled value of `+${countryCallingCode}${leadingDigits}`,
799
- // so in case of `international` being `true`, "the user hasn't entered anything" situation
800
- // doesn't just mean `value` is `undefined`, but could also mean `value` is `+${countryCallingCode}`.
801
- s && h === p({
802
- value: void 0,
803
- defaultCountry: m
804
- })
805
- ), E = !i && S;
806
- if (!A && O && E)
807
- return {
808
- country: a,
809
- // If `phoneDigits` is empty, then automatically select the new `country`
810
- // and set `phoneDigits` to `+{getCountryCallingCode(newCountry)}`.
811
- // The code assumes that "no phone number has been entered by the user",
812
- // and no `value` property has been passed, so the `phoneNumber` parameter
813
- // of `_getInitialPhoneDigits({ value, phoneNumber, ... })` is `undefined`.
814
- phoneDigits: p({
815
- value: void 0,
816
- defaultCountry: a
817
- }),
818
- // `value` is `undefined` and it stays so.
819
- value: void 0
820
- };
821
- }
822
- if (!pe(i, d) && !pe(i, h)) {
823
- var C, g;
824
- if (i) {
825
- i && ge(i), C = Ae(i, t);
826
- var j = Ee(o, t);
827
- C && C.country ? (!j || j.indexOf(C.country) >= 0) && (g = C.country) : (g = Re(i, {
828
- country: void 0,
829
- countries: j,
830
- metadata: t
831
- }), g || a && i.indexOf(N(a, t)) === 0 && (g = a));
832
- }
833
- var w;
834
- if (i) {
835
- if (f) {
836
- var P = g ? f === g : $(i, f, t);
837
- P ? g || (g = f) : w = {
838
- latestCountrySelectedByUser: void 0
839
- };
840
- }
841
- } else
842
- w = {
843
- latestCountrySelectedByUser: void 0,
844
- hasUserSelectedACountry: void 0
845
- };
846
- return M(M({}, w), {}, {
847
- phoneDigits: p({
848
- phoneNumber: C,
849
- value: i,
850
- defaultCountry: a
851
- }),
852
- value: i,
853
- country: i ? g : a
854
- });
855
- }
856
- }
857
- function pe(e, n) {
858
- return e === null && (e = void 0), n === null && (n = void 0), e === n;
859
- }
860
- var qt = ["name", "disabled", "readOnly", "autoComplete", "style", "className", "inputRef", "inputComponent", "numberInputProps", "smartCaret", "countrySelectComponent", "countrySelectProps", "containerComponent", "containerComponentProps", "defaultCountry", "countries", "countryOptionsOrder", "labels", "flags", "flagComponent", "flagUrl", "addInternationalOption", "internationalIcon", "displayInitialValueAsLocalNumber", "initialValueFormat", "onCountryChange", "limitMaxLength", "countryCallingCodeEditable", "focusInputOnCountrySelection", "reset", "metadata", "international", "locales"];
861
- function T(e) {
862
- "@babel/helpers - typeof";
863
- return T = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(n) {
864
- return typeof n;
865
- } : function(n) {
866
- return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
867
- }, T(e);
868
- }
869
- function ye(e, n) {
870
- var r = Object.keys(e);
871
- if (Object.getOwnPropertySymbols) {
872
- var t = Object.getOwnPropertySymbols(e);
873
- n && (t = t.filter(function(o) {
874
- return Object.getOwnPropertyDescriptor(e, o).enumerable;
875
- })), r.push.apply(r, t);
876
- }
877
- return r;
878
- }
879
- function Te(e) {
880
- for (var n = 1; n < arguments.length; n++) {
881
- var r = arguments[n] != null ? arguments[n] : {};
882
- n % 2 ? ye(Object(r), !0).forEach(function(t) {
883
- I(e, t, r[t]);
884
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : ye(Object(r)).forEach(function(t) {
885
- Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t));
886
- });
887
- }
888
- return e;
889
- }
890
- function F() {
891
- return F = Object.assign ? Object.assign.bind() : function(e) {
892
- for (var n = 1; n < arguments.length; n++) {
893
- var r = arguments[n];
894
- for (var t in r)
895
- Object.prototype.hasOwnProperty.call(r, t) && (e[t] = r[t]);
896
- }
897
- return e;
898
- }, F.apply(this, arguments);
899
- }
900
- function kt(e, n) {
901
- if (e == null) return {};
902
- var r = Vt(e, n), t, o;
903
- if (Object.getOwnPropertySymbols) {
904
- var a = Object.getOwnPropertySymbols(e);
905
- for (o = 0; o < a.length; o++)
906
- t = a[o], !(n.indexOf(t) >= 0) && Object.prototype.propertyIsEnumerable.call(e, t) && (r[t] = e[t]);
907
- }
908
- return r;
909
- }
910
- function Vt(e, n) {
911
- if (e == null) return {};
912
- var r = {}, t = Object.keys(e), o, a;
913
- for (a = 0; a < t.length; a++)
914
- o = t[a], !(n.indexOf(o) >= 0) && (r[o] = e[o]);
915
- return r;
916
- }
917
- function Wt(e, n) {
918
- if (!(e instanceof n))
919
- throw new TypeError("Cannot call a class as a function");
920
- }
921
- function de(e, n) {
922
- for (var r = 0; r < n.length; r++) {
923
- var t = n[r];
924
- t.enumerable = t.enumerable || !1, t.configurable = !0, "value" in t && (t.writable = !0), Object.defineProperty(e, Le(t.key), t);
925
- }
926
- }
927
- function Dt(e, n, r) {
928
- return n && de(e.prototype, n), r && de(e, r), Object.defineProperty(e, "prototype", { writable: !1 }), e;
929
- }
930
- function Zt(e, n, r) {
931
- return n = V(n), Xt(e, _e() ? Reflect.construct(n, r || [], V(e).constructor) : n.apply(e, r));
932
- }
933
- function Xt(e, n) {
934
- if (n && (T(n) === "object" || typeof n == "function"))
935
- return n;
936
- if (n !== void 0)
937
- throw new TypeError("Derived constructors may only return object or undefined");
938
- return zt(e);
939
- }
940
- function zt(e) {
941
- if (e === void 0)
942
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
943
- return e;
944
- }
945
- function _e() {
946
- try {
947
- var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
948
- }));
949
- } catch {
950
- }
951
- return (_e = function() {
952
- return !!e;
953
- })();
954
- }
955
- function V(e) {
956
- return V = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(r) {
957
- return r.__proto__ || Object.getPrototypeOf(r);
958
- }, V(e);
959
- }
960
- function Kt(e, n) {
961
- if (typeof n != "function" && n !== null)
962
- throw new TypeError("Super expression must either be null or a function");
963
- e.prototype = Object.create(n && n.prototype, { constructor: { value: e, writable: !0, configurable: !0 } }), Object.defineProperty(e, "prototype", { writable: !1 }), n && ee(e, n);
964
- }
965
- function ee(e, n) {
966
- return ee = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, o) {
967
- return t.__proto__ = o, t;
968
- }, ee(e, n);
969
- }
970
- function I(e, n, r) {
971
- return n = Le(n), n in e ? Object.defineProperty(e, n, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[n] = r, e;
972
- }
973
- function Le(e) {
974
- var n = Gt(e, "string");
975
- return T(n) == "symbol" ? n : n + "";
976
- }
977
- function Gt(e, n) {
978
- if (T(e) != "object" || !e) return e;
979
- var r = e[Symbol.toPrimitive];
980
- if (r !== void 0) {
981
- var t = r.call(e, n);
982
- if (T(t) != "object") return t;
983
- throw new TypeError("@@toPrimitive must return a primitive value.");
984
- }
985
- return (n === "string" ? String : Number)(e);
986
- }
987
- var Ht = /* @__PURE__ */ (function(e) {
988
- function n(r) {
989
- var t;
990
- Wt(this, n), t = Zt(this, n, [r]), I(t, "setInputRef", function(f) {
991
- It([t.props.inputRef, t.inputRef], f);
992
- }), I(t, "isCountrySupportedWithError", function(f) {
993
- var p = t.props.metadata;
994
- return X(f, p);
995
- }), I(t, "onCountryChange", function(f) {
996
- var p = t.props, O = p.international, S = p.metadata, E = p.onChange, C = p.focusInputOnCountrySelection, g = t.state, j = g.phoneDigits, w = g.country, P = xt(j, {
997
- prevCountry: w,
998
- newCountry: f,
999
- metadata: S,
1000
- // Convert the phone number to "national" format
1001
- // when the user changes the selected country by hand.
1002
- useNationalFormat: !O
1003
- }), x = R(P, f, S);
1004
- C && t.inputRef.current.focus(), t.setState({
1005
- country: f,
1006
- latestCountrySelectedByUser: f,
1007
- hasUserSelectedACountry: !0,
1008
- phoneDigits: P,
1009
- value: x
1010
- }, function() {
1011
- E(x);
1012
- });
1013
- }), I(t, "onChange", function(f) {
1014
- var p = t.props, O = p.defaultCountry, S = p.onChange, E = p.addInternationalOption, C = p.international, g = p.limitMaxLength, j = p.countryCallingCodeEditable, w = p.metadata, P = t.state, x = P.countries, _ = P.phoneDigits, qe = P.country, z = P.latestCountrySelectedByUser, K = $t(f, {
1015
- prevPhoneDigits: _,
1016
- country: qe,
1017
- countryRequired: !E,
1018
- defaultCountry: O,
1019
- latestCountrySelectedByUser: z,
1020
- getAnyCountry: function() {
1021
- return t.getFirstSupportedCountry({
1022
- countries: x
1023
- });
1024
- },
1025
- countries: x,
1026
- international: C,
1027
- limitMaxLength: g,
1028
- countryCallingCodeEditable: j,
1029
- metadata: w
1030
- }), oe = K.phoneDigits, ke = K.country, L = K.value, G = {
1031
- phoneDigits: oe,
1032
- value: L,
1033
- country: ke
1034
- };
1035
- z && L && !$(L, z, w) && (G.latestCountrySelectedByUser = void 0), j === !1 && !L && oe === t.state.phoneDigits && (G.forceRerender = {}), t.setState(
1036
- G,
1037
- // Update the new `value` property.
1038
- // Doing it after the `state` has been updated
1039
- // because `onChange()` will trigger `getDerivedStateFromProps()`
1040
- // with the new `value` which will be compared to `state.value` there.
1041
- function() {
1042
- return S(L);
1043
- }
1044
- );
1045
- }), I(t, "_onFocus", function() {
1046
- return t.setState({
1047
- isFocused: !0
1048
- });
1049
- }), I(t, "_onBlur", function() {
1050
- return t.setState({
1051
- isFocused: !1
1052
- });
1053
- }), I(t, "onFocus", function(f) {
1054
- t._onFocus();
1055
- var p = t.props.onFocus;
1056
- p && p(f);
1057
- }), I(t, "onBlur", function(f) {
1058
- var p = t.props.onBlur;
1059
- t._onBlur(), p && p(f);
1060
- }), I(t, "onCountryFocus", function(f) {
1061
- t._onFocus();
1062
- var p = t.props.countrySelectProps;
1063
- if (p) {
1064
- var O = p.onFocus;
1065
- O && O(f);
1066
- }
1067
- }), I(t, "onCountryBlur", function(f) {
1068
- t._onBlur();
1069
- var p = t.props.countrySelectProps;
1070
- if (p) {
1071
- var O = p.onBlur;
1072
- O && O(f);
1073
- }
1074
- }), t.inputRef = /* @__PURE__ */ c.createRef();
1075
- var o = t.props, a = o.value;
1076
- o.labels;
1077
- var i = o.international, l = o.addInternationalOption, s = o.displayInitialValueAsLocalNumber, y = o.initialValueFormat, v = o.metadata, m = t.props, d = m.defaultCountry, b = m.countries;
1078
- d && (t.isCountrySupportedWithError(d) || (d = void 0)), a && ge(a), b = Ee(b, v);
1079
- var h = Ae(a, v);
1080
- t.CountryIcon = xe(t.props);
1081
- var A = wt({
1082
- value: a,
1083
- phoneNumber: h,
1084
- defaultCountry: d,
1085
- required: !l,
1086
- countries: b || Y(v),
1087
- getAnyCountry: function() {
1088
- return t.getFirstSupportedCountry({
1089
- countries: b
1090
- });
1091
- },
1092
- metadata: v
1093
- });
1094
- return t.state = {
1095
- // Workaround for `this.props` inside `getDerivedStateFromProps()`.
1096
- props: t.props,
1097
- // The country selected.
1098
- country: A,
1099
- // `countries` are stored in `this.state` because they're filtered.
1100
- // For example, a developer might theoretically pass some unsupported
1101
- // countries as part of the `countries` property, and because of that
1102
- // the component uses `this.state.countries` (which are filtered)
1103
- // instead of `this.props.countries`
1104
- // (which could potentially contain unsupported countries).
1105
- countries: b,
1106
- // `phoneDigits` state property holds non-formatted user's input.
1107
- // The reason is that there's no way of finding out
1108
- // in which form should `value` be displayed: international or national.
1109
- // E.g. if `value` is `+78005553535` then it could be input
1110
- // by a user both as `8 (800) 555-35-35` and `+7 800 555 35 35`.
1111
- // Hence storing just `value` is not sufficient for correct formatting.
1112
- // E.g. if a user entered `8 (800) 555-35-35`
1113
- // then value is `+78005553535` and `phoneDigits` are `88005553535`
1114
- // and if a user entered `+7 800 555 35 35`
1115
- // then value is `+78005553535` and `phoneDigits` are `+78005553535`.
1116
- phoneDigits: Fe({
1117
- value: a,
1118
- phoneNumber: h,
1119
- defaultCountry: d,
1120
- international: i,
1121
- useNationalFormat: s || y === "national",
1122
- metadata: v
1123
- }),
1124
- // `value` property is duplicated in state.
1125
- // The reason is that `getDerivedStateFromProps()`
1126
- // needs this `value` to compare to the new `value` property
1127
- // to find out if `phoneDigits` needs updating:
1128
- // If the `value` property was changed externally
1129
- // then it won't be equal to `state.value`
1130
- // in which case `phoneDigits` and `country` should be updated.
1131
- value: a
1132
- }, t;
1133
- }
1134
- return Kt(n, e), Dt(n, [{
1135
- key: "componentDidMount",
1136
- value: function() {
1137
- var t = this.props.onCountryChange, o = this.props.defaultCountry, a = this.state.country;
1138
- t && (o && (this.isCountrySupportedWithError(o) || (o = void 0)), a !== o && t(a));
1139
- }
1140
- }, {
1141
- key: "componentDidUpdate",
1142
- value: function(t, o) {
1143
- var a = this.props.onCountryChange, i = this.state.country;
1144
- a && i !== o.country && a(i);
1145
- }
1146
- }, {
1147
- key: "getCountrySelectOptions",
1148
- value: function(t) {
1149
- var o = t.countries, a = this.props, i = a.international, l = a.countryCallingCodeEditable, s = a.countryOptionsOrder, y = a.addInternationalOption, v = a.labels, m = a.locales, d = a.metadata;
1150
- return this.useMemoCountrySelectOptions(function() {
1151
- return gt(Nt({
1152
- countries: o || Y(d),
1153
- countryNames: v,
1154
- addInternationalOption: i && l === !1 ? !1 : y,
1155
- compareStringsLocales: m
1156
- // compareStrings
1157
- }), bt(s, d));
1158
- }, [o, s, y, v, d]);
1159
- }
1160
- }, {
1161
- key: "useMemoCountrySelectOptions",
1162
- value: function(t, o) {
1163
- return (!this.countrySelectOptionsMemoDependencies || !Jt(o, this.countrySelectOptionsMemoDependencies)) && (this.countrySelectOptionsMemo = t(), this.countrySelectOptionsMemoDependencies = o), this.countrySelectOptionsMemo;
1164
- }
1165
- }, {
1166
- key: "getFirstSupportedCountry",
1167
- value: function(t) {
1168
- var o = t.countries, a = this.getCountrySelectOptions({
1169
- countries: o
1170
- });
1171
- return a[0].value;
1172
- }
1173
- }, {
1174
- key: "render",
1175
- value: function() {
1176
- var t = this.props, o = t.name, a = t.disabled, i = t.readOnly, l = t.autoComplete, s = t.style, y = t.className;
1177
- t.inputRef;
1178
- var v = t.inputComponent, m = t.numberInputProps, d = t.smartCaret, b = t.countrySelectComponent, h = t.countrySelectProps, A = t.containerComponent, f = t.containerComponentProps;
1179
- t.defaultCountry, t.countries, t.countryOptionsOrder;
1180
- var p = t.labels;
1181
- t.flags, t.flagComponent, t.flagUrl, t.addInternationalOption, t.internationalIcon, t.displayInitialValueAsLocalNumber, t.initialValueFormat, t.onCountryChange, t.limitMaxLength, t.countryCallingCodeEditable, t.focusInputOnCountrySelection, t.reset;
1182
- var O = t.metadata, S = t.international;
1183
- t.locales;
1184
- var E = kt(t, qt), C = this.state, g = C.country, j = C.countries, w = C.phoneDigits, P = C.isFocused, x = d ? Ze : Xe, _ = this.getCountrySelectOptions({
1185
- countries: j
1186
- });
1187
- return /* @__PURE__ */ c.createElement(A, F({
1188
- style: s,
1189
- className: B(y, "PhoneInput", {
1190
- "PhoneInput--focus": P,
1191
- "PhoneInput--disabled": a,
1192
- "PhoneInput--readOnly": i
1193
- })
1194
- }, f), /* @__PURE__ */ c.createElement(b, F({
1195
- name: o ? "".concat(o, "Country") : void 0,
1196
- "aria-label": p.country
1197
- }, h, {
1198
- value: g,
1199
- options: _,
1200
- onChange: this.onCountryChange,
1201
- onFocus: this.onCountryFocus,
1202
- onBlur: this.onCountryBlur,
1203
- disabled: a || h && h.disabled,
1204
- readOnly: i || h && h.readOnly,
1205
- iconComponent: this.CountryIcon
1206
- })), /* @__PURE__ */ c.createElement(x, F({
1207
- ref: this.setInputRef,
1208
- type: "tel",
1209
- autoComplete: l
1210
- }, m, E, {
1211
- inputFormat: S === !0 ? "INTERNATIONAL" : S === !1 ? "NATIONAL" : "INTERNATIONAL_OR_NATIONAL",
1212
- international: S ? !0 : void 0,
1213
- withCountryCallingCode: S ? !0 : void 0,
1214
- name: o,
1215
- metadata: O,
1216
- country: g,
1217
- value: w || "",
1218
- onChange: this.onChange,
1219
- onFocus: this.onFocus,
1220
- onBlur: this.onBlur,
1221
- disabled: a,
1222
- readOnly: i,
1223
- inputComponent: v,
1224
- className: B("PhoneInputInput", m && m.className, E.className)
1225
- })));
1226
- }
1227
- }], [{
1228
- key: "getDerivedStateFromProps",
1229
- value: (
1230
- // `state` holds previous props as `props`, and also:
1231
- // * `country` — The currently selected country, e.g. `"RU"`.
1232
- // * `value` — The currently entered phone number (E.164), e.g. `+78005553535`.
1233
- // * `phoneDigits` — The parsed `<input/>` value, e.g. `8005553535`.
1234
- // (and a couple of other less significant properties)
1235
- function(t, o) {
1236
- return Te({
1237
- // Emulate `prevProps` via `state.props`.
1238
- props: t
1239
- }, Bt(t, o.props, o));
1240
- }
1241
- )
1242
- }]);
1243
- })(c.PureComponent), Ue = /* @__PURE__ */ c.forwardRef(function(e, n) {
1244
- return /* @__PURE__ */ c.createElement(Ht, F({}, Yt(e), {
1245
- inputRef: n
1246
- }));
1247
- });
1248
- Ue.propTypes = {
1249
- /**
1250
- * Phone number in `E.164` format.
1251
- *
1252
- * Example:
1253
- *
1254
- * `"+12223333333"`
1255
- *
1256
- * Any "falsy" value like `undefined`, `null` or an empty string `""` is treated like "empty".
1257
- */
1258
- value: u.string,
1259
- /**
1260
- * A function of `value: string?`.
1261
- *
1262
- * Updates the `value` property as the user inputs a phone number.
1263
- *
1264
- * If the user erases the input value, the argument is `undefined`.
1265
- */
1266
- onChange: u.func.isRequired,
1267
- /**
1268
- * Toggles the `--focus` CSS class.
1269
- * @ignore
1270
- */
1271
- onFocus: u.func,
1272
- /**
1273
- * `onBlur` is usually passed by `redux-form`.
1274
- * @ignore
1275
- */
1276
- onBlur: u.func,
1277
- /**
1278
- * Set to `true` to mark both the phone number `<input/>`
1279
- * and the country `<select/>` as `disabled`.
1280
- */
1281
- disabled: u.bool,
1282
- /**
1283
- * Set to `true` to mark both the phone number `<input/>`
1284
- * and the country `<select/>` as `readonly`.
1285
- */
1286
- readOnly: u.bool,
1287
- /**
1288
- * Sets `autoComplete` property for phone number `<input/>`.
1289
- *
1290
- * Web browser's "autocomplete" feature
1291
- * remembers the phone number being input
1292
- * and can also autofill the `<input/>`
1293
- * with previously remembered phone numbers.
1294
- *
1295
- * https://developers.google.com
1296
- * /web/updates/2015/06/checkout-faster-with-autofill
1297
- *
1298
- * For example, can be used to turn it off:
1299
- *
1300
- * "So when should you use `autocomplete="off"`?
1301
- * One example is when you've implemented your own version
1302
- * of autocomplete for search. Another example is any form field
1303
- * where users will input and submit different kinds of information
1304
- * where it would not be useful to have the browser remember
1305
- * what was submitted previously".
1306
- */
1307
- // (is `"tel"` by default)
1308
- autoComplete: u.string,
1309
- /**
1310
- * Set to `"national"` to show the initial `value` in
1311
- * "national" format rather than "international".
1312
- *
1313
- * For example, if `initialValueFormat` is `"national"`
1314
- * and the initial `value="+12133734253"` is passed
1315
- * then the `<input/>` value will be `"(213) 373-4253"`.
1316
- *
1317
- * By default, `initialValueFormat` is `undefined`,
1318
- * meaning that if the initial `value="+12133734253"` is passed
1319
- * then the `<input/>` value will be `"+1 213 373 4253"`.
1320
- *
1321
- * The reason for such default behaviour is that
1322
- * the newer generation grows up when there are no stationary phones
1323
- * and therefore everyone inputs phone numbers in international format
1324
- * in their smartphones so people gradually get more accustomed to
1325
- * writing phone numbers in international format rather than in local format.
1326
- * Future people won't be using "national" format, only "international".
1327
- */
1328
- // (is `undefined` by default)
1329
- initialValueFormat: u.oneOf(["national"]),
1330
- // `displayInitialValueAsLocalNumber` property has been
1331
- // superceded by `initialValueFormat` property.
1332
- displayInitialValueAsLocalNumber: u.bool,
1333
- /**
1334
- * The country to be selected by default.
1335
- * For example, can be set after a GeoIP lookup.
1336
- *
1337
- * Example: `"US"`.
1338
- */
1339
- // A two-letter country code ("ISO 3166-1 alpha-2").
1340
- defaultCountry: u.string,
1341
- /**
1342
- * If specified, only these countries will be available for selection.
1343
- *
1344
- * Example:
1345
- *
1346
- * `["RU", "UA", "KZ"]`
1347
- */
1348
- countries: u.arrayOf(u.string),
1349
- /**
1350
- * Custom country `<select/>` option names.
1351
- * Also some labels like "ext" and country `<select/>` `aria-label`.
1352
- *
1353
- * Example:
1354
- *
1355
- * `{ "ZZ": "Международный", RU: "Россия", US: "США", ... }`
1356
- *
1357
- * See the `locales` directory for examples.
1358
- */
1359
- labels: he,
1360
- /**
1361
- * Country `<select/>` options are sorted by their labels.
1362
- * The default sorting function uses `a.localeCompare(b, locales)`,
1363
- * and, if that's not available, falls back to simple `a > b` / `a < b`.
1364
- * Some languages, like Chinese, support multiple sorting variants
1365
- * (called "collations"), and the user might prefer one or another.
1366
- * Also, sometimes the Operating System language is not always
1367
- * the preferred language for a person using a website or an application,
1368
- * so there should be a way to specify custom locale.
1369
- * This `locales` property mimicks the `locales` argument of `Intl` constructors,
1370
- * and can be either a Unicode BCP 47 locale identifier or an array of such locale identifiers.
1371
- * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument
1372
- */
1373
- locales: u.oneOfType([u.string, u.arrayOf(u.string)]),
1374
- /*
1375
- * Custom country `<select/>` options sorting function.
1376
- * The default one uses `a.localeCompare(b)`, and,
1377
- * if that's not available, falls back to simple `a > b`/`a < b`.
1378
- * There have been requests to add custom sorter for cases
1379
- * like Chinese language and "pinyin" (non-default) sorting order.
1380
- * https://stackoverflow.com/questions/22907288/chinese-sorting-by-pinyin-in-javascript-with-localecompare
1381
- compareStrings: PropTypes.func,
1382
- */
1383
- /**
1384
- * A URL template of a country flag, where
1385
- * "{XX}" is a two-letter country code in upper case,
1386
- * or where "{xx}" is a two-letter country code in lower case.
1387
- * By default it points to `country-flag-icons` gitlab pages website.
1388
- * I imagine someone might want to download those country flag icons
1389
- * and host them on their own servers instead
1390
- * (all flags are available in the `country-flag-icons` library).
1391
- * There's a catch though: new countries may be added in future,
1392
- * so when hosting country flag icons on your own server
1393
- * one should check the `CHANGELOG.md` every time before updating this library,
1394
- * otherwise there's a possibility that some new country flag would be missing.
1395
- */
1396
- flagUrl: u.string,
1397
- /**
1398
- * Custom country flag icon components.
1399
- * These flags will be used instead of the default ones.
1400
- * The the "Flags" section of the readme for more info.
1401
- *
1402
- * The shape is an object where keys are country codes
1403
- * and values are flag icon components.
1404
- * Flag icon components receive the same properties
1405
- * as `flagComponent` (see below).
1406
- *
1407
- * Example:
1408
- *
1409
- * `{ "RU": (props) => <img src="..."/> }`
1410
- *
1411
- * Example:
1412
- *
1413
- * `import flags from 'country-flag-icons/react/3x2'`
1414
- *
1415
- * `import PhoneInput from 'react-phone-number-input'`
1416
- *
1417
- * `<PhoneInput flags={flags} .../>`
1418
- */
1419
- flags: u.objectOf(u.elementType),
1420
- /**
1421
- * Country flag icon component.
1422
- *
1423
- * Takes properties:
1424
- *
1425
- * * `country: string` — The country code.
1426
- * * `countryName: string` — The country name.
1427
- * * `flagUrl: string` — The `flagUrl` property (see above).
1428
- * * `flags: object` — The `flags` property (see above).
1429
- */
1430
- flagComponent: u.elementType,
1431
- /**
1432
- * Set to `false` to remove the "International" option from country `<select/>`.
1433
- */
1434
- addInternationalOption: u.bool,
1435
- /**
1436
- * "International" icon component.
1437
- * Should have the same aspect ratio.
1438
- *
1439
- * Receives properties:
1440
- *
1441
- * * `title: string` — "International" country option label.
1442
- */
1443
- internationalIcon: u.elementType,
1444
- /**
1445
- * Can be used to place some countries on top of the list of country `<select/>` options.
1446
- *
1447
- * * `"XX"` — inserts an option for "XX" country.
1448
- * * `"🌐"` — inserts "International" option.
1449
- * * `"|"` — inserts a separator.
1450
- * * `"..."` — inserts options for the rest of the countries (can be omitted, in which case it will be automatically added at the end).
1451
- *
1452
- * Example:
1453
- *
1454
- * `["US", "CA", "AU", "|", "..."]`
1455
- */
1456
- countryOptionsOrder: u.arrayOf(u.string),
1457
- /**
1458
- * `<Phone/>` component CSS style object.
1459
- */
1460
- style: u.object,
1461
- /**
1462
- * `<Phone/>` component CSS class.
1463
- */
1464
- className: u.string,
1465
- /**
1466
- * Country `<select/>` component.
1467
- *
1468
- * Receives properties:
1469
- *
1470
- * * `name: string?` — HTML `name` attribute.
1471
- * * `value: string?` — The currently selected country code.
1472
- * * `onChange(value: string?)` — Updates the `value`.
1473
- * * `onFocus()` — Is used to toggle the `--focus` CSS class.
1474
- * * `onBlur()` — Is used to toggle the `--focus` CSS class.
1475
- * * `options: object[]` — The list of all selectable countries (including "International") each being an object of shape `{ value: string?, label: string }`.
1476
- * * `iconComponent: PropTypes.elementType` — React component that renders a country icon: `<Icon country={value}/>`. If `country` is `undefined` then it renders an "International" icon.
1477
- * * `disabled: boolean?` — HTML `disabled` attribute.
1478
- * * `readOnly: boolean?` — HTML `readOnly` attribute.
1479
- * * `tabIndex: (number|string)?` — HTML `tabIndex` attribute.
1480
- * * `className: string` — CSS class name.
1481
- */
1482
- countrySelectComponent: u.elementType,
1483
- /**
1484
- * Country `<select/>` component props.
1485
- * Along with the usual DOM properties such as `aria-label` and `tabIndex`,
1486
- * some custom properties are supported, such as `arrowComponent` and `unicodeFlags`.
1487
- */
1488
- countrySelectProps: u.object,
1489
- /**
1490
- * Phone number `<input/>` component.
1491
- *
1492
- * Receives properties:
1493
- *
1494
- * * `value: string` — The formatted `value`.
1495
- * * `onChange(event: Event)` — Updates the formatted `value` from `event.target.value`.
1496
- * * `onFocus()` — Is used to toggle the `--focus` CSS class.
1497
- * * `onBlur()` — Is used to toggle the `--focus` CSS class.
1498
- * * Other properties like `type="tel"` or `autoComplete="tel"` that should be passed through to the DOM `<input/>`.
1499
- *
1500
- * Must also either use `React.forwardRef()` to "forward" `ref` to the `<input/>` or implement `.focus()` method.
1501
- */
1502
- inputComponent: u.elementType,
1503
- /**
1504
- * Phone number `<input/>` component props.
1505
- */
1506
- numberInputProps: u.object,
1507
- /**
1508
- * Wrapping `<div/>` component.
1509
- *
1510
- * Receives properties:
1511
- *
1512
- * * `style: object` — A component CSS style object.
1513
- * * `className: string` — Classes to attach to the component, typically changes when component focuses or blurs.
1514
- */
1515
- containerComponent: u.elementType,
1516
- /**
1517
- * Wrapping `<div/>` component props.
1518
- */
1519
- containerComponentProps: u.object,
1520
- /**
1521
- * When the user attempts to insert a digit somewhere in the middle of a phone number,
1522
- * the caret position is moved right before the next available digit skipping
1523
- * any punctuation in between. This is called "smart" caret positioning.
1524
- * Another case would be the phone number format changing as a result of
1525
- * the user inserting the digit somewhere in the middle, which would require
1526
- * re-positioning the caret because all digit positions have changed.
1527
- * This "smart" caret positioning feature can be turned off by passing
1528
- * `smartCaret={false}` property: use it in case of any possible issues
1529
- * with caret position during phone number input.
1530
- */
1531
- // Is `true` by default.
1532
- smartCaret: u.bool,
1533
- /**
1534
- * Set to `true` to force "international" phone number format.
1535
- * Set to `false` to force "national" phone number format.
1536
- * By default it's `undefined` meaning that it doesn't enforce any phone number format:
1537
- * the user can input their phone number in either "national" or "international" format.
1538
- */
1539
- international: u.bool,
1540
- /**
1541
- * If set to `true`, the phone number input will get trimmed
1542
- * if it exceeds the maximum length for the country.
1543
- */
1544
- limitMaxLength: u.bool,
1545
- /**
1546
- * If set to `false`, and `international` is `true`, then
1547
- * users won't be able to erase the "country calling part"
1548
- * of a phone number in the `<input/>`.
1549
- */
1550
- countryCallingCodeEditable: u.bool,
1551
- /**
1552
- * `libphonenumber-js` metadata.
1553
- *
1554
- * Can be used to pass custom `libphonenumber-js` metadata
1555
- * to reduce the overall bundle size for those who compile "custom" metadata.
1556
- */
1557
- metadata: be,
1558
- /**
1559
- * Is called every time the selected country changes:
1560
- * either programmatically or when user selects it manually from the list.
1561
- */
1562
- // People have been asking for a way to get the selected country.
1563
- // @see https://github.com/catamphetamine/react-phone-number-input/issues/128
1564
- // For some it's just a "business requirement".
1565
- // I guess it's about gathering as much info on the user as a website can
1566
- // without introducing any addional fields that would complicate the form
1567
- // therefore reducing "conversion" (that's a marketing term).
1568
- // Assuming that the phone number's country is the user's country
1569
- // is not 100% correct but in most cases I guess it's valid.
1570
- onCountryChange: u.func,
1571
- /**
1572
- * If set to `false`, will not focus the `<input/>` component
1573
- * when the user selects a country from the list of countries.
1574
- * This can be used to conform to the Web Content Accessibility Guidelines (WCAG).
1575
- * Quote:
1576
- * "On input: Changing the setting of any user interface component
1577
- * does not automatically cause a change of context unless the user
1578
- * has been advised of the behaviour before using the component."
1579
- */
1580
- focusInputOnCountrySelection: u.bool
1581
- };
1582
- var me = {
1583
- /**
1584
- * Remember (and autofill) the value as a phone number.
1585
- */
1586
- autoComplete: "tel",
1587
- /**
1588
- * Country `<select/>` component.
1589
- */
1590
- countrySelectComponent: Ie,
1591
- /**
1592
- * Flag icon component.
1593
- */
1594
- flagComponent: ne,
1595
- /**
1596
- * By default, uses icons from `country-flag-icons` gitlab pages website.
1597
- */
1598
- // Must be equal to `flagUrl` in `./CountryIcon.js`.
1599
- flagUrl: "https://purecatamphetamine.github.io/country-flag-icons/3x2/{XX}.svg",
1600
- /**
1601
- * Default "International" country `<select/>` option icon.
1602
- */
1603
- internationalIcon: Z,
1604
- /**
1605
- * Phone number `<input/>` component.
1606
- */
1607
- inputComponent: "input",
1608
- /**
1609
- * Wrapping `<div/>` component.
1610
- */
1611
- containerComponent: "div",
1612
- /**
1613
- * Some users requested a way to reset the component:
1614
- * both number `<input/>` and country `<select/>`.
1615
- * Whenever `reset` property changes both number `<input/>`
1616
- * and country `<select/>` are reset.
1617
- * It's not implemented as some instance `.reset()` method
1618
- * because `ref` is forwarded to `<input/>`.
1619
- * It's also not replaced with just resetting `country` on
1620
- * external `value` reset, because a user could select a country
1621
- * and then not input any `value`, and so the selected country
1622
- * would be "stuck", if not using this `reset` property.
1623
- */
1624
- // https://github.com/catamphetamine/react-phone-number-input/issues/300
1625
- reset: u.any,
1626
- /**
1627
- *
1628
- */
1629
- /**
1630
- * Set to `false` to use "basic" caret instead of the "smart" one.
1631
- */
1632
- smartCaret: !0,
1633
- /**
1634
- * Whether to add the "International" option
1635
- * to the list of countries.
1636
- */
1637
- addInternationalOption: !0,
1638
- /**
1639
- * If set to `false`, and `international` is `true`, then
1640
- * users won't be able to erase the "country calling part"
1641
- * of a phone number in the `<input/>`.
1642
- */
1643
- countryCallingCodeEditable: !0,
1644
- /**
1645
- * If set to `false`, will not focus the `<input/>` component
1646
- * when the user selects a country from the list of countries.
1647
- * This can be used to conform to the Web Content Accessibility Guidelines (WCAG).
1648
- * Quote:
1649
- * "On input: Changing the setting of any user interface component
1650
- * does not automatically cause a change of context unless the user
1651
- * has been advised of the behaviour before using the component."
1652
- */
1653
- focusInputOnCountrySelection: !0
1654
- };
1655
- function Yt(e) {
1656
- e = Te({}, e);
1657
- for (var n in me)
1658
- e[n] === void 0 && (e[n] = me[n]);
1659
- return e;
1660
- }
1661
- function Jt(e, n) {
1662
- if (e.length !== n.length)
1663
- return !1;
1664
- for (var r = 0; r < e.length; ) {
1665
- if (e[r] !== n[r])
1666
- return !1;
1667
- r++;
1668
- }
1669
- return !0;
1670
- }
1671
- var Qt = ["metadata", "labels"];
1672
- function te() {
1673
- return te = Object.assign ? Object.assign.bind() : function(e) {
1674
- for (var n = 1; n < arguments.length; n++) {
1675
- var r = arguments[n];
1676
- for (var t in r)
1677
- Object.prototype.hasOwnProperty.call(r, t) && (e[t] = r[t]);
1678
- }
1679
- return e;
1680
- }, te.apply(this, arguments);
1681
- }
1682
- function en(e, n) {
1683
- if (e == null) return {};
1684
- var r = tn(e, n), t, o;
1685
- if (Object.getOwnPropertySymbols) {
1686
- var a = Object.getOwnPropertySymbols(e);
1687
- for (o = 0; o < a.length; o++)
1688
- t = a[o], !(n.indexOf(t) >= 0) && Object.prototype.propertyIsEnumerable.call(e, t) && (r[t] = e[t]);
1689
- }
1690
- return r;
1691
- }
1692
- function tn(e, n) {
1693
- if (e == null) return {};
1694
- var r = {}, t = Object.keys(e), o, a;
1695
- for (a = 0; a < t.length; a++)
1696
- o = t[a], !(n.indexOf(o) >= 0) && (r[o] = e[o]);
1697
- return r;
1698
- }
1699
- function Me(e) {
1700
- var n = /* @__PURE__ */ c.forwardRef(function(r, t) {
1701
- var o = r.metadata, a = o === void 0 ? e : o, i = r.labels, l = i === void 0 ? Ke : i, s = en(r, Qt);
1702
- return /* @__PURE__ */ c.createElement(Ue, te({}, s, {
1703
- ref: t,
1704
- metadata: a,
1705
- labels: l
1706
- }));
1707
- });
1708
- return n.propTypes = {
1709
- metadata: be,
1710
- labels: he
1711
- }, n;
1712
- }
1713
- Me();
1714
- function Be(e, n) {
1715
- var r = Array.prototype.slice.call(n);
1716
- return r.push(Ce), e.apply(this, r);
1717
- }
1718
- Me(Ce);
1719
- function cn() {
1720
- return Be(Y, arguments);
1721
- }
1722
- function sn() {
1723
- return Be(W, arguments);
1724
- }
1725
- export {
1726
- cn as a,
1727
- sn as g
1728
- };