mui-language-picker 1.1.13 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (496) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +25 -16
  3. package/dist/ChangeName.d.ts +11 -0
  4. package/dist/ChangeName.js +62 -0
  5. package/dist/GrowingSpacer.d.ts +2 -0
  6. package/dist/GrowingSpacer.js +10 -0
  7. package/dist/LanguageChoice.d.ts +13 -0
  8. package/dist/LanguageChoice.js +79 -0
  9. package/dist/LanguagePicker.d.ts +18 -0
  10. package/dist/LanguagePicker.js +400 -0
  11. package/dist/bcp47.d.ts +13 -0
  12. package/dist/bcp47.js +133 -0
  13. package/dist/data/langtags.json +136990 -0
  14. package/dist/index/Exact/100.d.ts +2 -0
  15. package/dist/index/Exact/100.js +6560 -0
  16. package/dist/index/Exact/101.d.ts +2 -0
  17. package/dist/index/Exact/101.js +3723 -0
  18. package/dist/index/Exact/102.d.ts +2 -0
  19. package/dist/index/Exact/102.js +2309 -0
  20. package/dist/index/Exact/103.d.ts +2 -0
  21. package/dist/index/Exact/103.js +7150 -0
  22. package/dist/index/Exact/104.d.ts +2 -0
  23. package/dist/index/Exact/104.js +3831 -0
  24. package/dist/index/Exact/105.d.ts +2 -0
  25. package/dist/index/Exact/105.js +6565 -0
  26. package/dist/index/Exact/106.d.ts +2 -0
  27. package/dist/index/Exact/106.js +2880 -0
  28. package/dist/index/Exact/107.d.ts +2 -0
  29. package/dist/index/Exact/107.js +15062 -0
  30. package/dist/index/Exact/1072.d.ts +2 -0
  31. package/dist/index/Exact/1072.js +9 -0
  32. package/dist/index/Exact/1073.d.ts +2 -0
  33. package/dist/index/Exact/1073.js +14 -0
  34. package/dist/index/Exact/108.d.ts +2 -0
  35. package/dist/index/Exact/108.js +7381 -0
  36. package/dist/index/Exact/1080.d.ts +2 -0
  37. package/dist/index/Exact/1080.js +9 -0
  38. package/dist/index/Exact/1082.d.ts +2 -0
  39. package/dist/index/Exact/1082.js +9 -0
  40. package/dist/index/Exact/1084.d.ts +2 -0
  41. package/dist/index/Exact/1084.js +12 -0
  42. package/dist/index/Exact/1085.d.ts +2 -0
  43. package/dist/index/Exact/1085.js +8 -0
  44. package/dist/index/Exact/1088.d.ts +2 -0
  45. package/dist/index/Exact/1088.js +13 -0
  46. package/dist/index/Exact/1089.d.ts +2 -0
  47. package/dist/index/Exact/1089.js +17 -0
  48. package/dist/index/Exact/109.d.ts +2 -0
  49. package/dist/index/Exact/109.js +15813 -0
  50. package/dist/index/Exact/1090.d.ts +2 -0
  51. package/dist/index/Exact/1090.js +21 -0
  52. package/dist/index/Exact/1091.d.ts +2 -0
  53. package/dist/index/Exact/1091.js +8 -0
  54. package/dist/index/Exact/1094.d.ts +2 -0
  55. package/dist/index/Exact/1094.js +8 -0
  56. package/dist/index/Exact/110.d.ts +2 -0
  57. package/dist/index/Exact/110.js +11482 -0
  58. package/dist/index/Exact/111.d.ts +2 -0
  59. package/dist/index/Exact/111.js +3256 -0
  60. package/dist/index/Exact/1118.d.ts +2 -0
  61. package/dist/index/Exact/1118.js +8 -0
  62. package/dist/index/Exact/112.d.ts +2 -0
  63. package/dist/index/Exact/112.js +10184 -0
  64. package/dist/index/Exact/113.d.ts +2 -0
  65. package/dist/index/Exact/113.js +970 -0
  66. package/dist/index/Exact/114.d.ts +2 -0
  67. package/dist/index/Exact/114.js +3629 -0
  68. package/dist/index/Exact/115.d.ts +2 -0
  69. package/dist/index/Exact/115.js +12650 -0
  70. package/dist/index/Exact/116.d.ts +2 -0
  71. package/dist/index/Exact/116.js +11699 -0
  72. package/dist/index/Exact/11612.d.ts +2 -0
  73. package/dist/index/Exact/11612.js +11 -0
  74. package/dist/index/Exact/117.d.ts +2 -0
  75. package/dist/index/Exact/117.js +3166 -0
  76. package/dist/index/Exact/1179.d.ts +2 -0
  77. package/dist/index/Exact/1179.js +13 -0
  78. package/dist/index/Exact/118.d.ts +2 -0
  79. package/dist/index/Exact/118.js +1908 -0
  80. package/dist/index/Exact/119.d.ts +2 -0
  81. package/dist/index/Exact/119.js +5280 -0
  82. package/dist/index/Exact/120.d.ts +2 -0
  83. package/dist/index/Exact/120.js +896 -0
  84. package/dist/index/Exact/121.d.ts +2 -0
  85. package/dist/index/Exact/121.js +3708 -0
  86. package/dist/index/Exact/122.d.ts +2 -0
  87. package/dist/index/Exact/122.js +1746 -0
  88. package/dist/index/Exact/1392.d.ts +2 -0
  89. package/dist/index/Exact/1392.js +8 -0
  90. package/dist/index/Exact/1497.d.ts +2 -0
  91. package/dist/index/Exact/1497.js +8 -0
  92. package/dist/index/Exact/1506.d.ts +2 -0
  93. package/dist/index/Exact/1506.js +8 -0
  94. package/dist/index/Exact/1570.d.ts +2 -0
  95. package/dist/index/Exact/1570.js +11 -0
  96. package/dist/index/Exact/1574.d.ts +2 -0
  97. package/dist/index/Exact/1574.js +8 -0
  98. package/dist/index/Exact/1575.d.ts +2 -0
  99. package/dist/index/Exact/1575.js +51 -0
  100. package/dist/index/Exact/1576.d.ts +2 -0
  101. package/dist/index/Exact/1576.js +29 -0
  102. package/dist/index/Exact/1578.d.ts +2 -0
  103. package/dist/index/Exact/1578.js +14 -0
  104. package/dist/index/Exact/1583.d.ts +2 -0
  105. package/dist/index/Exact/1583.js +11 -0
  106. package/dist/index/Exact/1587.d.ts +2 -0
  107. package/dist/index/Exact/1587.js +14 -0
  108. package/dist/index/Exact/1588.d.ts +2 -0
  109. package/dist/index/Exact/1588.js +15 -0
  110. package/dist/index/Exact/1593.d.ts +2 -0
  111. package/dist/index/Exact/1593.js +14 -0
  112. package/dist/index/Exact/1601.d.ts +2 -0
  113. package/dist/index/Exact/1601.js +8 -0
  114. package/dist/index/Exact/1604.d.ts +2 -0
  115. package/dist/index/Exact/1604.js +13 -0
  116. package/dist/index/Exact/1605.d.ts +2 -0
  117. package/dist/index/Exact/1605.js +14 -0
  118. package/dist/index/Exact/1606.d.ts +2 -0
  119. package/dist/index/Exact/1606.js +9 -0
  120. package/dist/index/Exact/1607.d.ts +2 -0
  121. package/dist/index/Exact/1607.js +8 -0
  122. package/dist/index/Exact/1662.d.ts +2 -0
  123. package/dist/index/Exact/1662.js +15 -0
  124. package/dist/index/Exact/1698.d.ts +2 -0
  125. package/dist/index/Exact/1698.js +8 -0
  126. package/dist/index/Exact/1705.d.ts +2 -0
  127. package/dist/index/Exact/1705.js +19 -0
  128. package/dist/index/Exact/1711.d.ts +2 -0
  129. package/dist/index/Exact/1711.js +14 -0
  130. package/dist/index/Exact/1729.d.ts +2 -0
  131. package/dist/index/Exact/1729.js +8 -0
  132. package/dist/index/Exact/1808.d.ts +2 -0
  133. package/dist/index/Exact/1808.js +8 -0
  134. package/dist/index/Exact/1827.d.ts +2 -0
  135. package/dist/index/Exact/1827.js +8 -0
  136. package/dist/index/Exact/1931.d.ts +2 -0
  137. package/dist/index/Exact/1931.js +8 -0
  138. package/dist/index/Exact/20013.d.ts +2 -0
  139. package/dist/index/Exact/20013.js +13 -0
  140. package/dist/index/Exact/224.d.ts +2 -0
  141. package/dist/index/Exact/224.js +23 -0
  142. package/dist/index/Exact/225.d.ts +2 -0
  143. package/dist/index/Exact/225.js +14 -0
  144. package/dist/index/Exact/227.d.ts +2 -0
  145. package/dist/index/Exact/227.js +15 -0
  146. package/dist/index/Exact/228.d.ts +2 -0
  147. package/dist/index/Exact/228.js +17 -0
  148. package/dist/index/Exact/229.d.ts +2 -0
  149. package/dist/index/Exact/229.js +14 -0
  150. package/dist/index/Exact/232.d.ts +2 -0
  151. package/dist/index/Exact/232.js +23 -0
  152. package/dist/index/Exact/2325.d.ts +2 -0
  153. package/dist/index/Exact/2325.js +8 -0
  154. package/dist/index/Exact/233.d.ts +2 -0
  155. package/dist/index/Exact/233.js +9 -0
  156. package/dist/index/Exact/2337.d.ts +2 -0
  157. package/dist/index/Exact/2337.js +8 -0
  158. package/dist/index/Exact/234.d.ts +2 -0
  159. package/dist/index/Exact/234.js +23 -0
  160. package/dist/index/Exact/2340.d.ts +2 -0
  161. package/dist/index/Exact/2340.js +11 -0
  162. package/dist/index/Exact/2342.d.ts +2 -0
  163. package/dist/index/Exact/2342.js +8 -0
  164. package/dist/index/Exact/2344.d.ts +2 -0
  165. package/dist/index/Exact/2344.js +9 -0
  166. package/dist/index/Exact/2348.d.ts +2 -0
  167. package/dist/index/Exact/2348.js +8 -0
  168. package/dist/index/Exact/235.d.ts +2 -0
  169. package/dist/index/Exact/235.js +8 -0
  170. package/dist/index/Exact/2350.d.ts +2 -0
  171. package/dist/index/Exact/2350.js +11 -0
  172. package/dist/index/Exact/2351.d.ts +2 -0
  173. package/dist/index/Exact/2351.js +9 -0
  174. package/dist/index/Exact/2354.d.ts +2 -0
  175. package/dist/index/Exact/2354.js +8 -0
  176. package/dist/index/Exact/2358.d.ts +2 -0
  177. package/dist/index/Exact/2358.js +11 -0
  178. package/dist/index/Exact/236.d.ts +2 -0
  179. package/dist/index/Exact/236.js +26 -0
  180. package/dist/index/Exact/2360.d.ts +2 -0
  181. package/dist/index/Exact/2360.js +11 -0
  182. package/dist/index/Exact/2361.d.ts +2 -0
  183. package/dist/index/Exact/2361.js +8 -0
  184. package/dist/index/Exact/237.d.ts +2 -0
  185. package/dist/index/Exact/237.js +17 -0
  186. package/dist/index/Exact/238.d.ts +2 -0
  187. package/dist/index/Exact/238.js +11 -0
  188. package/dist/index/Exact/239.d.ts +2 -0
  189. package/dist/index/Exact/239.js +12 -0
  190. package/dist/index/Exact/240.d.ts +2 -0
  191. package/dist/index/Exact/240.js +10 -0
  192. package/dist/index/Exact/241.d.ts +2 -0
  193. package/dist/index/Exact/241.js +57 -0
  194. package/dist/index/Exact/243.d.ts +2 -0
  195. package/dist/index/Exact/243.js +17 -0
  196. package/dist/index/Exact/2437.d.ts +2 -0
  197. package/dist/index/Exact/2437.js +8 -0
  198. package/dist/index/Exact/244.d.ts +2 -0
  199. package/dist/index/Exact/244.js +9 -0
  200. package/dist/index/Exact/2459.d.ts +2 -0
  201. package/dist/index/Exact/2459.js +8 -0
  202. package/dist/index/Exact/246.d.ts +2 -0
  203. package/dist/index/Exact/246.js +54 -0
  204. package/dist/index/Exact/2476.d.ts +2 -0
  205. package/dist/index/Exact/2476.js +9 -0
  206. package/dist/index/Exact/2478.d.ts +2 -0
  207. package/dist/index/Exact/2478.js +8 -0
  208. package/dist/index/Exact/249.d.ts +2 -0
  209. package/dist/index/Exact/249.js +8 -0
  210. package/dist/index/Exact/252.d.ts +2 -0
  211. package/dist/index/Exact/252.js +8 -0
  212. package/dist/index/Exact/257.d.ts +2 -0
  213. package/dist/index/Exact/257.js +14 -0
  214. package/dist/index/Exact/2602.d.ts +2 -0
  215. package/dist/index/Exact/2602.js +8 -0
  216. package/dist/index/Exact/26085.d.ts +2 -0
  217. package/dist/index/Exact/26085.js +8 -0
  218. package/dist/index/Exact/263.d.ts +2 -0
  219. package/dist/index/Exact/263.js +10 -0
  220. package/dist/index/Exact/269.d.ts +2 -0
  221. package/dist/index/Exact/269.js +53 -0
  222. package/dist/index/Exact/2711.d.ts +2 -0
  223. package/dist/index/Exact/2711.js +8 -0
  224. package/dist/index/Exact/273.d.ts +2 -0
  225. package/dist/index/Exact/273.js +8 -0
  226. package/dist/index/Exact/2835.d.ts +2 -0
  227. package/dist/index/Exact/2835.js +8 -0
  228. package/dist/index/Exact/289.d.ts +2 -0
  229. package/dist/index/Exact/289.js +10 -0
  230. package/dist/index/Exact/297.d.ts +2 -0
  231. package/dist/index/Exact/297.js +11 -0
  232. package/dist/index/Exact/2980.d.ts +2 -0
  233. package/dist/index/Exact/2980.js +11 -0
  234. package/dist/index/Exact/2986.d.ts +2 -0
  235. package/dist/index/Exact/2986.js +8 -0
  236. package/dist/index/Exact/299.d.ts +2 -0
  237. package/dist/index/Exact/299.js +11 -0
  238. package/dist/index/Exact/3093.d.ts +2 -0
  239. package/dist/index/Exact/3093.js +11 -0
  240. package/dist/index/Exact/3108.d.ts +2 -0
  241. package/dist/index/Exact/3108.js +8 -0
  242. package/dist/index/Exact/31908.d.ts +2 -0
  243. package/dist/index/Exact/31908.js +8 -0
  244. package/dist/index/Exact/31925.d.ts +2 -0
  245. package/dist/index/Exact/31925.js +8 -0
  246. package/dist/index/Exact/322.d.ts +2 -0
  247. package/dist/index/Exact/322.js +12 -0
  248. package/dist/index/Exact/3221.d.ts +2 -0
  249. package/dist/index/Exact/3221.js +11 -0
  250. package/dist/index/Exact/32321.d.ts +2 -0
  251. package/dist/index/Exact/32321.js +8 -0
  252. package/dist/index/Exact/33.d.ts +2 -0
  253. package/dist/index/Exact/33.js +67 -0
  254. package/dist/index/Exact/331.d.ts +2 -0
  255. package/dist/index/Exact/331.js +34 -0
  256. package/dist/index/Exact/333.d.ts +2 -0
  257. package/dist/index/Exact/333.js +11 -0
  258. package/dist/index/Exact/3374.d.ts +2 -0
  259. package/dist/index/Exact/3374.js +9 -0
  260. package/dist/index/Exact/347.d.ts +2 -0
  261. package/dist/index/Exact/347.js +17 -0
  262. package/dist/index/Exact/35.d.ts +2 -0
  263. package/dist/index/Exact/35.js +9 -0
  264. package/dist/index/Exact/3523.d.ts +2 -0
  265. package/dist/index/Exact/3523.js +8 -0
  266. package/dist/index/Exact/353.d.ts +2 -0
  267. package/dist/index/Exact/353.js +16 -0
  268. package/dist/index/Exact/3588.d.ts +2 -0
  269. package/dist/index/Exact/3588.js +8 -0
  270. package/dist/index/Exact/3652.d.ts +2 -0
  271. package/dist/index/Exact/3652.js +8 -0
  272. package/dist/index/Exact/3749.d.ts +2 -0
  273. package/dist/index/Exact/3749.js +8 -0
  274. package/dist/index/Exact/382.d.ts +2 -0
  275. package/dist/index/Exact/382.js +26 -0
  276. package/dist/index/Exact/39.d.ts +2 -0
  277. package/dist/index/Exact/39.js +14 -0
  278. package/dist/index/Exact/3926.d.ts +2 -0
  279. package/dist/index/Exact/3926.js +9 -0
  280. package/dist/index/Exact/3938.d.ts +2 -0
  281. package/dist/index/Exact/3938.js +8 -0
  282. package/dist/index/Exact/3939.d.ts +2 -0
  283. package/dist/index/Exact/3939.js +8 -0
  284. package/dist/index/Exact/4121.d.ts +2 -0
  285. package/dist/index/Exact/4121.js +8 -0
  286. package/dist/index/Exact/4124.d.ts +2 -0
  287. package/dist/index/Exact/4124.js +8 -0
  288. package/dist/index/Exact/41352.d.ts +2 -0
  289. package/dist/index/Exact/41352.js +8 -0
  290. package/dist/index/Exact/417.d.ts +2 -0
  291. package/dist/index/Exact/417.js +11 -0
  292. package/dist/index/Exact/42209.d.ts +2 -0
  293. package/dist/index/Exact/42209.js +8 -0
  294. package/dist/index/Exact/42329.d.ts +2 -0
  295. package/dist/index/Exact/42329.js +8 -0
  296. package/dist/index/Exact/42892.d.ts +2 -0
  297. package/dist/index/Exact/42892.js +8 -0
  298. package/dist/index/Exact/4325.d.ts +2 -0
  299. package/dist/index/Exact/4325.js +8 -0
  300. package/dist/index/Exact/43274.d.ts +2 -0
  301. package/dist/index/Exact/43274.js +8 -0
  302. package/dist/index/Exact/43955.d.ts +2 -0
  303. package/dist/index/Exact/43955.js +8 -0
  304. package/dist/index/Exact/448.d.ts +2 -0
  305. package/dist/index/Exact/448.js +35 -0
  306. package/dist/index/Exact/449.d.ts +2 -0
  307. package/dist/index/Exact/449.js +38 -0
  308. package/dist/index/Exact/45.d.ts +2 -0
  309. package/dist/index/Exact/45.js +62 -0
  310. package/dist/index/Exact/450.d.ts +2 -0
  311. package/dist/index/Exact/450.js +17 -0
  312. package/dist/index/Exact/451.d.ts +2 -0
  313. package/dist/index/Exact/451.js +11 -0
  314. package/dist/index/Exact/4656.d.ts +2 -0
  315. package/dist/index/Exact/4656.js +11 -0
  316. package/dist/index/Exact/47.d.ts +2 -0
  317. package/dist/index/Exact/47.js +17 -0
  318. package/dist/index/Exact/4705.d.ts +2 -0
  319. package/dist/index/Exact/4705.js +8 -0
  320. package/dist/index/Exact/4707.d.ts +2 -0
  321. package/dist/index/Exact/4707.js +8 -0
  322. package/dist/index/Exact/4708.d.ts +2 -0
  323. package/dist/index/Exact/4708.js +8 -0
  324. package/dist/index/Exact/4709.d.ts +2 -0
  325. package/dist/index/Exact/4709.js +8 -0
  326. package/dist/index/Exact/4725.d.ts +2 -0
  327. package/dist/index/Exact/4725.js +12 -0
  328. package/dist/index/Exact/4768.d.ts +2 -0
  329. package/dist/index/Exact/4768.js +8 -0
  330. package/dist/index/Exact/48.d.ts +2 -0
  331. package/dist/index/Exact/48.js +43 -0
  332. package/dist/index/Exact/4808.d.ts +2 -0
  333. package/dist/index/Exact/4808.js +8 -0
  334. package/dist/index/Exact/4840.d.ts +2 -0
  335. package/dist/index/Exact/4840.js +8 -0
  336. package/dist/index/Exact/487.d.ts +2 -0
  337. package/dist/index/Exact/487.js +10 -0
  338. package/dist/index/Exact/4873.d.ts +2 -0
  339. package/dist/index/Exact/4873.js +8 -0
  340. package/dist/index/Exact/4876.d.ts +2 -0
  341. package/dist/index/Exact/4876.js +8 -0
  342. package/dist/index/Exact/4877.d.ts +2 -0
  343. package/dist/index/Exact/4877.js +8 -0
  344. package/dist/index/Exact/49.d.ts +2 -0
  345. package/dist/index/Exact/49.js +8 -0
  346. package/dist/index/Exact/5123.d.ts +2 -0
  347. package/dist/index/Exact/5123.js +8 -0
  348. package/dist/index/Exact/5124.d.ts +2 -0
  349. package/dist/index/Exact/5124.js +17 -0
  350. package/dist/index/Exact/5130.d.ts +2 -0
  351. package/dist/index/Exact/5130.js +9 -0
  352. package/dist/index/Exact/52.d.ts +2 -0
  353. package/dist/index/Exact/52.js +8 -0
  354. package/dist/index/Exact/5312.d.ts +2 -0
  355. package/dist/index/Exact/5312.js +8 -0
  356. package/dist/index/Exact/54620.d.ts +2 -0
  357. package/dist/index/Exact/54620.js +9 -0
  358. package/dist/index/Exact/55300.d.ts +2 -0
  359. package/dist/index/Exact/55300.js +9 -0
  360. package/dist/index/Exact/55354.d.ts +2 -0
  361. package/dist/index/Exact/55354.js +19 -0
  362. package/dist/index/Exact/595.d.ts +2 -0
  363. package/dist/index/Exact/595.js +40 -0
  364. package/dist/index/Exact/596.d.ts +2 -0
  365. package/dist/index/Exact/596.js +16 -0
  366. package/dist/index/Exact/599.d.ts +2 -0
  367. package/dist/index/Exact/599.js +11 -0
  368. package/dist/index/Exact/601.d.ts +2 -0
  369. package/dist/index/Exact/601.js +20 -0
  370. package/dist/index/Exact/6017.d.ts +2 -0
  371. package/dist/index/Exact/6017.js +8 -0
  372. package/dist/index/Exact/616.d.ts +2 -0
  373. package/dist/index/Exact/616.js +14 -0
  374. package/dist/index/Exact/6486.d.ts +2 -0
  375. package/dist/index/Exact/6486.js +8 -0
  376. package/dist/index/Exact/6533.d.ts +2 -0
  377. package/dist/index/Exact/6533.js +8 -0
  378. package/dist/index/Exact/660.d.ts +2 -0
  379. package/dist/index/Exact/660.js +11 -0
  380. package/dist/index/Exact/699.d.ts +2 -0
  381. package/dist/index/Exact/699.js +14 -0
  382. package/dist/index/Exact/700.d.ts +2 -0
  383. package/dist/index/Exact/700.js +27 -0
  384. package/dist/index/Exact/7269.d.ts +2 -0
  385. package/dist/index/Exact/7269.js +9 -0
  386. package/dist/index/Exact/7695.d.ts +2 -0
  387. package/dist/index/Exact/7695.js +8 -0
  388. package/dist/index/Exact/7717.d.ts +2 -0
  389. package/dist/index/Exact/7717.js +11 -0
  390. package/dist/index/Exact/7789.d.ts +2 -0
  391. package/dist/index/Exact/7789.js +10 -0
  392. package/dist/index/Exact/7869.d.ts +2 -0
  393. package/dist/index/Exact/7869.js +20 -0
  394. package/dist/index/Exact/7883.d.ts +2 -0
  395. package/dist/index/Exact/7883.js +11 -0
  396. package/dist/index/Exact/7885.d.ts +2 -0
  397. package/dist/index/Exact/7885.js +14 -0
  398. package/dist/index/Exact/8211.d.ts +2 -0
  399. package/dist/index/Exact/8211.js +8 -0
  400. package/dist/index/Exact/8216.d.ts +2 -0
  401. package/dist/index/Exact/8216.js +11 -0
  402. package/dist/index/Exact/8217.d.ts +2 -0
  403. package/dist/index/Exact/8217.js +140 -0
  404. package/dist/index/Exact/8225.d.ts +2 -0
  405. package/dist/index/Exact/8225.js +26 -0
  406. package/dist/index/Exact/91.d.ts +2 -0
  407. package/dist/index/Exact/91.js +8 -0
  408. package/dist/index/Exact/949.d.ts +2 -0
  409. package/dist/index/Exact/949.js +9 -0
  410. package/dist/index/Exact/97.d.ts +2 -0
  411. package/dist/index/Exact/97.js +9690 -0
  412. package/dist/index/Exact/98.d.ts +2 -0
  413. package/dist/index/Exact/98.js +12794 -0
  414. package/dist/index/Exact/99.d.ts +2 -0
  415. package/dist/index/Exact/99.js +10193 -0
  416. package/dist/index/Exact/NaN.d.ts +2 -0
  417. package/dist/index/Exact/NaN.js +17 -0
  418. package/dist/index/LgExact.d.ts +4 -0
  419. package/dist/index/LgExact.js +1046 -0
  420. package/dist/index/LgFontMap.d.ts +2 -0
  421. package/dist/index/LgFontMap.js +517 -0
  422. package/dist/index/LgScriptName.d.ts +2 -0
  423. package/dist/index/LgScriptName.js +205 -0
  424. package/dist/index/LgScripts.d.ts +4 -0
  425. package/dist/index/LgScripts.js +171 -0
  426. package/dist/index/Scripts/100.d.ts +2 -0
  427. package/dist/index/Scripts/100.js +901 -0
  428. package/dist/index/Scripts/101.d.ts +2 -0
  429. package/dist/index/Scripts/101.js +400 -0
  430. package/dist/index/Scripts/102.d.ts +2 -0
  431. package/dist/index/Scripts/102.js +292 -0
  432. package/dist/index/Scripts/103.d.ts +2 -0
  433. package/dist/index/Scripts/103.js +1037 -0
  434. package/dist/index/Scripts/104.d.ts +2 -0
  435. package/dist/index/Scripts/104.js +617 -0
  436. package/dist/index/Scripts/105.d.ts +2 -0
  437. package/dist/index/Scripts/105.js +536 -0
  438. package/dist/index/Scripts/106.d.ts +2 -0
  439. package/dist/index/Scripts/106.js +431 -0
  440. package/dist/index/Scripts/107.d.ts +2 -0
  441. package/dist/index/Scripts/107.js +2007 -0
  442. package/dist/index/Scripts/108.d.ts +2 -0
  443. package/dist/index/Scripts/108.js +1077 -0
  444. package/dist/index/Scripts/109.d.ts +2 -0
  445. package/dist/index/Scripts/109.js +1971 -0
  446. package/dist/index/Scripts/110.d.ts +2 -0
  447. package/dist/index/Scripts/110.js +1515 -0
  448. package/dist/index/Scripts/111.d.ts +2 -0
  449. package/dist/index/Scripts/111.js +537 -0
  450. package/dist/index/Scripts/112.d.ts +2 -0
  451. package/dist/index/Scripts/112.js +1057 -0
  452. package/dist/index/Scripts/113.d.ts +2 -0
  453. package/dist/index/Scripts/113.js +179 -0
  454. package/dist/index/Scripts/114.d.ts +2 -0
  455. package/dist/index/Scripts/114.js +509 -0
  456. package/dist/index/Scripts/115.d.ts +2 -0
  457. package/dist/index/Scripts/115.js +1660 -0
  458. package/dist/index/Scripts/116.d.ts +2 -0
  459. package/dist/index/Scripts/116.js +1623 -0
  460. package/dist/index/Scripts/117.d.ts +2 -0
  461. package/dist/index/Scripts/117.js +410 -0
  462. package/dist/index/Scripts/118.d.ts +2 -0
  463. package/dist/index/Scripts/118.js +293 -0
  464. package/dist/index/Scripts/119.d.ts +2 -0
  465. package/dist/index/Scripts/119.js +698 -0
  466. package/dist/index/Scripts/120.d.ts +2 -0
  467. package/dist/index/Scripts/120.js +960 -0
  468. package/dist/index/Scripts/121.d.ts +2 -0
  469. package/dist/index/Scripts/121.js +723 -0
  470. package/dist/index/Scripts/122.d.ts +2 -0
  471. package/dist/index/Scripts/122.js +572 -0
  472. package/dist/index/Scripts/95.d.ts +2 -0
  473. package/dist/index/Scripts/95.js +8 -0
  474. package/dist/index/Scripts/97.d.ts +2 -0
  475. package/dist/index/Scripts/97.js +1584 -0
  476. package/dist/index/Scripts/98.d.ts +2 -0
  477. package/dist/index/Scripts/98.js +1978 -0
  478. package/dist/index/Scripts/99.d.ts +2 -0
  479. package/dist/index/Scripts/99.js +1026 -0
  480. package/dist/index.d.ts +2 -0
  481. package/dist/index.js +18 -0
  482. package/dist/langPicker/types.d.ts +61 -0
  483. package/dist/langPicker/types.js +6 -0
  484. package/dist/langTags.d.ts +2 -0
  485. package/dist/langTags.js +18 -0
  486. package/dist/localization/index.d.ts +20 -0
  487. package/dist/localization/index.js +23 -0
  488. package/dist/model/index.d.ts +2 -0
  489. package/dist/model/index.js +18 -0
  490. package/dist/useDebounce.d.ts +2 -0
  491. package/dist/useDebounce.js +16 -0
  492. package/dist/util/badChar.d.ts +2 -0
  493. package/dist/util/badChar.js +25 -0
  494. package/dist/util/index.d.ts +1 -0
  495. package/dist/util/index.js +17 -0
  496. package/package.json +42 -25
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2020 SIL LSDev
3
+ Copyright (c) 2020-2022 SIL LSDev
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -4,7 +4,7 @@ Material UI react language picker
4
4
 
5
5
  ## Installation
6
6
 
7
- Complete installation for [material-ui](https://material-ui.com/getting-started/installation/).
7
+ Complete information for [material-ui](https://mui.com/material-ui/).
8
8
 
9
9
  ```sh
10
10
  npm install mui-language-picker --save
@@ -12,19 +12,21 @@ npm install mui-language-picker --save
12
12
 
13
13
  ## Usage
14
14
 
15
- ### TypeScript React 16 code
15
+ ### TypeScript React 18 code
16
16
 
17
17
  ```typescript
18
18
  import {
19
19
  LanguagePicker,
20
20
  ILanguagePickerStrings,
21
21
  languagePickerStrings_en,
22
+ LangTag,
22
23
  } from "mui-language-picker";
23
24
 
24
25
  const MyComponent = (props: any) => {
25
26
  const [bcp47, setBcp47] = React.useState("und");
26
27
  const [lgName, setLgName] = React.useState("");
27
28
  const [fontName, setFontName] = React.useState("");
29
+ const [tag, setTag] = React.useState<LangTag>()
28
30
 
29
31
  return (
30
32
  <LanguagePicker
@@ -34,6 +36,7 @@ const MyComponent = (props: any) => {
34
36
  setName={setLgName}
35
37
  font={fontName}
36
38
  setFont={setFontName}
39
+ setInfo={setTag}
37
40
  t={languagePickerStrings_en}
38
41
  />
39
42
  );
@@ -54,6 +57,7 @@ Output should be a Language Picker when entered opens a dialog
54
57
  | setName\* | (name: string) => void | callback to change language name |
55
58
  | font | string | font family name |
56
59
  | setFont\* | (font: string) => void | callback to change font family name |
60
+ | setInfo\* | (tag: LangTag) => void | callback to receive tag information |
57
61
  | disabled\* | boolean | true if control disabled |
58
62
  | t | ILanguagePickerStrings | localization strings (see below) |
59
63
 
@@ -63,24 +67,29 @@ Output should be a Language Picker when entered opens a dialog
63
67
 
64
68
  ```typescript
65
69
  export const languagePickerStrings_en = {
66
- font: "Font",
67
- script: "Script",
68
- language: "Language",
69
- selectLanguage: "Choose Language Details",
70
- findALanguage: "Find a language by name, code, or country",
71
- codeExplained: "Code Explained",
72
- subtags: "Subtags",
73
- details: "Details",
74
- languageOf: "A Language of $1$2.",
75
- inScript: " in the $1 script",
76
- select: "Save",
77
- cancel: "Cancel",
78
- phonetic: "Phonetic",
70
+ font: 'Font',
71
+ script: 'Script',
72
+ language: 'Language',
73
+ selectLanguage: 'Choose Language Details',
74
+ findALanguage: 'Find a language by name, code, or country',
75
+ codeExplained: 'Code Explained',
76
+ subtags: 'Subtags',
77
+ details: 'Details',
78
+ languageOf: 'A Language of $1$2.',
79
+ inScript: ' in the $1 script',
80
+ select: 'Save',
81
+ cancel: 'Cancel',
82
+ phonetic: 'Phonetic',
83
+ changeName: 'Change Name',
84
+ nameInstruction:
85
+ 'If you would like to change the language name enter the new name here.',
86
+ newName: 'New Language Name',
87
+ change: 'Change',
79
88
  } as ILanguagePickerStrings;
80
89
  ```
81
90
 
82
91
  ### Change control background
83
- If the theme involves using a dark background, the control background can be changed with css. See also [material-ui](https://material-ui.com/) documentation.
92
+ If the theme involves using a dark background, the control background can be changed with css. See also [material-ui](https://mui.com/) documentation.
84
93
  ```css
85
94
  #LangBcp47 .MuiFilledInput-root {
86
95
  background-color: rgba(255, 255, 255, 0.9);
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import { ILanguagePickerStrings } from './model';
3
+ interface IProps {
4
+ isOpen: boolean;
5
+ onClose?: () => void;
6
+ curName?: string;
7
+ onNewName?: (name: string) => void;
8
+ t?: ILanguagePickerStrings;
9
+ }
10
+ export default function ChangeName({ isOpen, onClose, curName, onNewName, t, }: IProps): JSX.Element;
11
+ export {};
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ var React = __importStar(require("react"));
30
+ var Button_1 = __importDefault(require("@mui/material/Button"));
31
+ var TextField_1 = __importDefault(require("@mui/material/TextField"));
32
+ var Dialog_1 = __importDefault(require("@mui/material/Dialog"));
33
+ var DialogActions_1 = __importDefault(require("@mui/material/DialogActions"));
34
+ var DialogContent_1 = __importDefault(require("@mui/material/DialogContent"));
35
+ var DialogContentText_1 = __importDefault(require("@mui/material/DialogContentText"));
36
+ var DialogTitle_1 = __importDefault(require("@mui/material/DialogTitle"));
37
+ function ChangeName(_a) {
38
+ var isOpen = _a.isOpen, onClose = _a.onClose, curName = _a.curName, onNewName = _a.onNewName, t = _a.t;
39
+ var _b = React.useState(isOpen), open = _b[0], setOpen = _b[1];
40
+ var _c = React.useState(curName || ''), name = _c[0], setName = _c[1];
41
+ var handleClose = function () {
42
+ onNewName && onNewName(name);
43
+ onClose && onClose();
44
+ setOpen(false);
45
+ };
46
+ var handleNameChange = function (event) {
47
+ setName(event.target.value);
48
+ };
49
+ React.useEffect(function () {
50
+ setOpen(isOpen);
51
+ }, [isOpen]);
52
+ return (React.createElement(Dialog_1.default, { open: open, onClose: handleClose },
53
+ React.createElement(DialogTitle_1.default, null, (t === null || t === void 0 ? void 0 : t.changeName) || 'Change Name'),
54
+ React.createElement(DialogContent_1.default, null,
55
+ React.createElement(DialogContentText_1.default, null, (t === null || t === void 0 ? void 0 : t.nameInstruction) ||
56
+ 'If you would like to change the language name enter the new name here.'),
57
+ React.createElement(TextField_1.default, { autoFocus: true, margin: "dense", id: "name", label: (t === null || t === void 0 ? void 0 : t.newName) || 'New Language Name', fullWidth: true, value: name, onChange: handleNameChange })),
58
+ React.createElement(DialogActions_1.default, null,
59
+ React.createElement(Button_1.default, { onClick: handleClose }, t === null || t === void 0 ? void 0 : t.cancel),
60
+ React.createElement(Button_1.default, { onClick: handleClose }, (t === null || t === void 0 ? void 0 : t.change) || 'Change'))));
61
+ }
62
+ exports.default = ChangeName;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const GrowingSpacer: () => JSX.Element;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.GrowingSpacer = void 0;
7
+ var react_1 = __importDefault(require("react"));
8
+ var material_1 = require("@mui/material");
9
+ var GrowingSpacer = function () { return react_1.default.createElement(material_1.Box, { sx: { flexGrow: 1 } }, '\u00A0'); };
10
+ exports.GrowingSpacer = GrowingSpacer;
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ import { ILanguagePickerStrings } from './model';
3
+ import { LangTag, ScriptName } from './langPicker/types';
4
+ interface IProps {
5
+ list: number[];
6
+ choose: (tag: LangTag) => void;
7
+ secondary?: boolean;
8
+ langTags: LangTag[];
9
+ scriptName: ScriptName;
10
+ t: ILanguagePickerStrings;
11
+ }
12
+ export declare function LanguageChoice(props: IProps): JSX.Element;
13
+ export default LanguageChoice;
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.LanguageChoice = void 0;
27
+ var react_1 = __importStar(require("react"));
28
+ var material_1 = require("@mui/material");
29
+ var lodash_1 = require("lodash");
30
+ var GrowingSpacer_1 = require("./GrowingSpacer");
31
+ function LanguageChoice(props) {
32
+ var list = props.list, langTags = props.langTags, scriptName = props.scriptName, secondary = props.secondary, t = props.t, choose = props.choose;
33
+ var dense = (0, react_1.useState)(true)[0];
34
+ var _a = (0, react_1.useState)(window.innerHeight), height = _a[0], setHeight = _a[1];
35
+ var handleChoose = function (tag) { return function () {
36
+ choose(tag);
37
+ }; };
38
+ var handleKeydown = function (tag) { return function (e) {
39
+ if (e.keyCode === 32 || e.keyCode === 13) {
40
+ choose(tag);
41
+ }
42
+ }; };
43
+ (0, react_1.useEffect)(function () {
44
+ var handleResize = (0, lodash_1.debounce)(function () { return setHeight(window.innerHeight); }, 100);
45
+ window.addEventListener('resize', handleResize);
46
+ return function () {
47
+ window.removeEventListener('resize', handleResize);
48
+ };
49
+ }, []);
50
+ var scriptDetail = function (tag) {
51
+ var tagParts = tag.tag.split('-');
52
+ return tagParts.length > 1 && tagParts[1].length === 4
53
+ ? t.inScript.replace('$1', scriptName[tagParts[1]])
54
+ : '';
55
+ };
56
+ var detail = function (tag) {
57
+ return (react_1.default.createElement(react_1.default.Fragment, null,
58
+ react_1.default.createElement(material_1.Typography, { component: 'span' }, t.languageOf
59
+ .replace('$1', tag.regionname ? tag.regionname : '')
60
+ .replace('$2', scriptDetail(tag))),
61
+ react_1.default.createElement("br", null),
62
+ react_1.default.createElement(material_1.Typography, { component: 'span' }, tag.names ? tag.names.join(', ') : '')));
63
+ };
64
+ var langElems = function (refList, refTags) {
65
+ return refList.map(function (r, i) {
66
+ var tag = refTags[r];
67
+ return (react_1.default.createElement(material_1.ListItem, { key: "".concat(tag.tag, " ").concat(i), button: true, onClick: handleChoose(tag), onKeyDown: handleKeydown(tag) },
68
+ react_1.default.createElement(material_1.ListItemText, { primary: react_1.default.createElement(material_1.Box, { sx: { display: 'flex' } },
69
+ react_1.default.createElement(material_1.Typography, null, tag.localname ? "".concat(tag.localname, " / ").concat(tag.name) : tag.name),
70
+ react_1.default.createElement(GrowingSpacer_1.GrowingSpacer, null),
71
+ react_1.default.createElement(material_1.Typography, null, tag.tag)), secondary: secondary ? detail(tag) : null })));
72
+ });
73
+ };
74
+ return (react_1.default.createElement(material_1.Box, { sx: { flexGrow: 1, maxWidth: 752 } },
75
+ react_1.default.createElement(material_1.Box, { sx: { backgroundColor: 'background.paper' } },
76
+ react_1.default.createElement(material_1.List, { dense: dense, sx: { overflowY: 'scroll' }, style: { maxHeight: Math.max(height - 450, 200) } }, langElems(list, langTags)))));
77
+ }
78
+ exports.LanguageChoice = LanguageChoice;
79
+ exports.default = LanguageChoice;
@@ -0,0 +1,18 @@
1
+ /// <reference types="react" />
2
+ import { ILanguagePickerStrings } from './model';
3
+ import { LangTag } from './langPicker/types';
4
+ interface IStateProps {
5
+ t: ILanguagePickerStrings;
6
+ }
7
+ interface IProps extends IStateProps {
8
+ value: string;
9
+ name: string;
10
+ font: string;
11
+ setCode?: (code: string) => void;
12
+ setName?: (name: string) => void;
13
+ setFont?: (font: string) => void;
14
+ setInfo?: (tag: LangTag) => void;
15
+ disabled?: boolean;
16
+ }
17
+ export declare const LanguagePicker: (props: IProps) => JSX.Element;
18
+ export default LanguagePicker;