@via-profit/ui-kit 0.1.0-rc.2 → 0.1.0-rc.21

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 (705) hide show
  1. package/Autocomplete/index.d.ts +46 -0
  2. package/Autocomplete/index.js +187 -0
  3. package/Autocomplete/popper-options.d.ts +4 -0
  4. package/Autocomplete/popper-options.js +33 -0
  5. package/Button/ButtonBase.d.ts +62 -0
  6. package/Button/ButtonBase.js +36 -0
  7. package/Button/ButtonContainer.d.ts +36 -0
  8. package/Button/ButtonContainer.js +56 -0
  9. package/Button/ButtonIconWrapper.d.ts +14 -0
  10. package/Button/ButtonIconWrapper.js +34 -0
  11. package/Button/ButtonOutlined.d.ts +5 -0
  12. package/Button/ButtonOutlined.js +87 -0
  13. package/Button/ButtonPlain.d.ts +5 -0
  14. package/Button/ButtonPlain.js +90 -0
  15. package/Button/ButtonStandard.d.ts +5 -0
  16. package/Button/ButtonStandard.js +110 -0
  17. package/Button/ButtonTextWrapper.d.ts +29 -0
  18. package/Button/ButtonTextWrapper.js +35 -0
  19. package/Button/index.d.ts +23 -0
  20. package/Button/index.js +31 -0
  21. package/CHANGELOG.md +0 -0
  22. package/Calendar/CalendarBottomBar.d.ts +4 -0
  23. package/Calendar/CalendarBottomBar.js +28 -0
  24. package/Calendar/CalendarCell.d.ts +8 -0
  25. package/Calendar/CalendarCell.js +59 -0
  26. package/Calendar/CalendarDateContainer.d.ts +6 -0
  27. package/Calendar/CalendarDateContainer.js +13 -0
  28. package/Calendar/CalendarEmptyCell.d.ts +4 -0
  29. package/Calendar/CalendarEmptyCell.js +29 -0
  30. package/Calendar/CalendarMonthControl.d.ts +6 -0
  31. package/Calendar/CalendarMonthControl.js +49 -0
  32. package/Calendar/CalendarPaper.d.ts +6 -0
  33. package/Calendar/CalendarPaper.js +19 -0
  34. package/Calendar/CalendarTopBar.d.ts +4 -0
  35. package/Calendar/CalendarTopBar.js +30 -0
  36. package/Calendar/CalendarWeekDayLabel.d.ts +6 -0
  37. package/Calendar/CalendarWeekDayLabel.js +17 -0
  38. package/Calendar/CalendarWeekDaysBar.d.ts +10 -0
  39. package/Calendar/CalendarWeekDaysBar.js +32 -0
  40. package/Calendar/CalendarWeekRow.d.ts +6 -0
  41. package/Calendar/CalendarWeekRow.js +14 -0
  42. package/Calendar/IconChevronLeft.d.ts +3 -0
  43. package/Calendar/IconChevronLeft.js +9 -0
  44. package/Calendar/IconChevronRight.d.ts +3 -0
  45. package/Calendar/IconChevronRight.js +9 -0
  46. package/Calendar/index.d.ts +18 -0
  47. package/Calendar/index.js +166 -0
  48. package/Calendar/use-calendar.d.ts +50 -0
  49. package/Calendar/use-calendar.js +197 -0
  50. package/Color/index.d.ts +113 -0
  51. package/Color/index.js +444 -0
  52. package/CountryFlags/AC.d.ts +3 -0
  53. package/CountryFlags/AC.js +53 -0
  54. package/CountryFlags/AD.d.ts +3 -0
  55. package/CountryFlags/AD.js +39 -0
  56. package/CountryFlags/AE.d.ts +3 -0
  57. package/CountryFlags/AE.js +32 -0
  58. package/CountryFlags/AF.d.ts +3 -0
  59. package/CountryFlags/AF.js +33 -0
  60. package/CountryFlags/AG.d.ts +3 -0
  61. package/CountryFlags/AG.js +35 -0
  62. package/CountryFlags/AI.d.ts +3 -0
  63. package/CountryFlags/AI.js +37 -0
  64. package/CountryFlags/AL.d.ts +3 -0
  65. package/CountryFlags/AL.js +35 -0
  66. package/CountryFlags/AM.d.ts +3 -0
  67. package/CountryFlags/AM.js +31 -0
  68. package/CountryFlags/AO.d.ts +3 -0
  69. package/CountryFlags/AO.js +35 -0
  70. package/CountryFlags/AQ.d.ts +3 -0
  71. package/CountryFlags/AQ.js +30 -0
  72. package/CountryFlags/AR.d.ts +3 -0
  73. package/CountryFlags/AR.js +31 -0
  74. package/CountryFlags/AS.d.ts +3 -0
  75. package/CountryFlags/AS.js +33 -0
  76. package/CountryFlags/AT.d.ts +3 -0
  77. package/CountryFlags/AT.js +30 -0
  78. package/CountryFlags/AU.d.ts +3 -0
  79. package/CountryFlags/AU.js +41 -0
  80. package/CountryFlags/AW.d.ts +3 -0
  81. package/CountryFlags/AW.js +33 -0
  82. package/CountryFlags/AX.d.ts +3 -0
  83. package/CountryFlags/AX.js +31 -0
  84. package/CountryFlags/AZ.d.ts +3 -0
  85. package/CountryFlags/AZ.js +34 -0
  86. package/CountryFlags/BA.d.ts +3 -0
  87. package/CountryFlags/BA.js +40 -0
  88. package/CountryFlags/BB.d.ts +3 -0
  89. package/CountryFlags/BB.js +32 -0
  90. package/CountryFlags/BD.d.ts +3 -0
  91. package/CountryFlags/BD.js +30 -0
  92. package/CountryFlags/BE.d.ts +3 -0
  93. package/CountryFlags/BE.js +31 -0
  94. package/CountryFlags/BF.d.ts +3 -0
  95. package/CountryFlags/BF.js +31 -0
  96. package/CountryFlags/BG.d.ts +3 -0
  97. package/CountryFlags/BG.js +31 -0
  98. package/CountryFlags/BH.d.ts +3 -0
  99. package/CountryFlags/BH.js +30 -0
  100. package/CountryFlags/BI.d.ts +3 -0
  101. package/CountryFlags/BI.js +36 -0
  102. package/CountryFlags/BJ.d.ts +3 -0
  103. package/CountryFlags/BJ.js +31 -0
  104. package/CountryFlags/BL.d.ts +3 -0
  105. package/CountryFlags/BL.js +39 -0
  106. package/CountryFlags/BM.d.ts +3 -0
  107. package/CountryFlags/BM.js +40 -0
  108. package/CountryFlags/BN.d.ts +3 -0
  109. package/CountryFlags/BN.js +34 -0
  110. package/CountryFlags/BO.d.ts +3 -0
  111. package/CountryFlags/BO.js +31 -0
  112. package/CountryFlags/BQ.d.ts +3 -0
  113. package/CountryFlags/BQ.js +33 -0
  114. package/CountryFlags/BR.d.ts +3 -0
  115. package/CountryFlags/BR.js +32 -0
  116. package/CountryFlags/BS.d.ts +3 -0
  117. package/CountryFlags/BS.js +32 -0
  118. package/CountryFlags/BT.d.ts +3 -0
  119. package/CountryFlags/BT.js +31 -0
  120. package/CountryFlags/BV.d.ts +3 -0
  121. package/CountryFlags/BV.js +33 -0
  122. package/CountryFlags/BW.d.ts +3 -0
  123. package/CountryFlags/BW.js +32 -0
  124. package/CountryFlags/BY.d.ts +3 -0
  125. package/CountryFlags/BY.js +35 -0
  126. package/CountryFlags/BZ.d.ts +3 -0
  127. package/CountryFlags/BZ.js +36 -0
  128. package/CountryFlags/CA.d.ts +3 -0
  129. package/CountryFlags/CA.js +31 -0
  130. package/CountryFlags/CC.d.ts +3 -0
  131. package/CountryFlags/CC.js +33 -0
  132. package/CountryFlags/CD.d.ts +3 -0
  133. package/CountryFlags/CD.js +32 -0
  134. package/CountryFlags/CF.d.ts +3 -0
  135. package/CountryFlags/CF.js +36 -0
  136. package/CountryFlags/CG.d.ts +3 -0
  137. package/CountryFlags/CG.js +31 -0
  138. package/CountryFlags/CH.d.ts +3 -0
  139. package/CountryFlags/CH.js +30 -0
  140. package/CountryFlags/CI.d.ts +3 -0
  141. package/CountryFlags/CI.js +31 -0
  142. package/CountryFlags/CK.d.ts +3 -0
  143. package/CountryFlags/CK.js +34 -0
  144. package/CountryFlags/CL.d.ts +3 -0
  145. package/CountryFlags/CL.js +32 -0
  146. package/CountryFlags/CM.d.ts +3 -0
  147. package/CountryFlags/CM.js +32 -0
  148. package/CountryFlags/CN.d.ts +3 -0
  149. package/CountryFlags/CN.js +31 -0
  150. package/CountryFlags/CO.d.ts +3 -0
  151. package/CountryFlags/CO.js +31 -0
  152. package/CountryFlags/CR.d.ts +3 -0
  153. package/CountryFlags/CR.js +31 -0
  154. package/CountryFlags/CU.d.ts +3 -0
  155. package/CountryFlags/CU.js +34 -0
  156. package/CountryFlags/CV.d.ts +3 -0
  157. package/CountryFlags/CV.js +33 -0
  158. package/CountryFlags/CW.d.ts +3 -0
  159. package/CountryFlags/CW.js +32 -0
  160. package/CountryFlags/CX.d.ts +3 -0
  161. package/CountryFlags/CX.js +35 -0
  162. package/CountryFlags/CY.d.ts +3 -0
  163. package/CountryFlags/CY.js +34 -0
  164. package/CountryFlags/CZ.d.ts +3 -0
  165. package/CountryFlags/CZ.js +31 -0
  166. package/CountryFlags/DE.d.ts +3 -0
  167. package/CountryFlags/DE.js +31 -0
  168. package/CountryFlags/DJ.d.ts +3 -0
  169. package/CountryFlags/DJ.js +32 -0
  170. package/CountryFlags/DK.d.ts +3 -0
  171. package/CountryFlags/DK.js +30 -0
  172. package/CountryFlags/DM.d.ts +3 -0
  173. package/CountryFlags/DM.js +39 -0
  174. package/CountryFlags/DO.d.ts +3 -0
  175. package/CountryFlags/DO.js +38 -0
  176. package/CountryFlags/DZ.d.ts +3 -0
  177. package/CountryFlags/DZ.js +33 -0
  178. package/CountryFlags/EC.d.ts +3 -0
  179. package/CountryFlags/EC.js +35 -0
  180. package/CountryFlags/EE.d.ts +3 -0
  181. package/CountryFlags/EE.js +31 -0
  182. package/CountryFlags/EG.d.ts +3 -0
  183. package/CountryFlags/EG.js +32 -0
  184. package/CountryFlags/EH.d.ts +3 -0
  185. package/CountryFlags/EH.js +34 -0
  186. package/CountryFlags/ER.d.ts +3 -0
  187. package/CountryFlags/ER.js +40 -0
  188. package/CountryFlags/ES.d.ts +3 -0
  189. package/CountryFlags/ES.js +34 -0
  190. package/CountryFlags/ET.d.ts +3 -0
  191. package/CountryFlags/ET.js +37 -0
  192. package/CountryFlags/EU.d.ts +3 -0
  193. package/CountryFlags/EU.js +30 -0
  194. package/CountryFlags/FI.d.ts +3 -0
  195. package/CountryFlags/FI.js +30 -0
  196. package/CountryFlags/FJ.d.ts +3 -0
  197. package/CountryFlags/FJ.js +36 -0
  198. package/CountryFlags/FK.d.ts +3 -0
  199. package/CountryFlags/FK.js +43 -0
  200. package/CountryFlags/FM.d.ts +3 -0
  201. package/CountryFlags/FM.js +31 -0
  202. package/CountryFlags/FO.d.ts +3 -0
  203. package/CountryFlags/FO.js +31 -0
  204. package/CountryFlags/FR.d.ts +3 -0
  205. package/CountryFlags/FR.js +31 -0
  206. package/CountryFlags/GA.d.ts +3 -0
  207. package/CountryFlags/GA.js +31 -0
  208. package/CountryFlags/GB.d.ts +3 -0
  209. package/CountryFlags/GB.js +36 -0
  210. package/CountryFlags/GD.d.ts +3 -0
  211. package/CountryFlags/GD.js +38 -0
  212. package/CountryFlags/GE.d.ts +3 -0
  213. package/CountryFlags/GE.js +31 -0
  214. package/CountryFlags/GEAB.d.ts +3 -0
  215. package/CountryFlags/GEAB.js +40 -0
  216. package/CountryFlags/GEOS.d.ts +3 -0
  217. package/CountryFlags/GEOS.js +31 -0
  218. package/CountryFlags/GF.d.ts +3 -0
  219. package/CountryFlags/GF.js +31 -0
  220. package/CountryFlags/GG.d.ts +3 -0
  221. package/CountryFlags/GG.js +31 -0
  222. package/CountryFlags/GH.d.ts +3 -0
  223. package/CountryFlags/GH.js +32 -0
  224. package/CountryFlags/GI.d.ts +3 -0
  225. package/CountryFlags/GI.js +34 -0
  226. package/CountryFlags/GL.d.ts +3 -0
  227. package/CountryFlags/GL.js +32 -0
  228. package/CountryFlags/GM.d.ts +3 -0
  229. package/CountryFlags/GM.js +32 -0
  230. package/CountryFlags/GN.d.ts +3 -0
  231. package/CountryFlags/GN.js +31 -0
  232. package/CountryFlags/GP.d.ts +3 -0
  233. package/CountryFlags/GP.js +31 -0
  234. package/CountryFlags/GQ.d.ts +3 -0
  235. package/CountryFlags/GQ.js +37 -0
  236. package/CountryFlags/GR.d.ts +3 -0
  237. package/CountryFlags/GR.js +35 -0
  238. package/CountryFlags/GS.d.ts +3 -0
  239. package/CountryFlags/GS.js +49 -0
  240. package/CountryFlags/GT.d.ts +3 -0
  241. package/CountryFlags/GT.js +33 -0
  242. package/CountryFlags/GU.d.ts +3 -0
  243. package/CountryFlags/GU.js +37 -0
  244. package/CountryFlags/GW.d.ts +3 -0
  245. package/CountryFlags/GW.js +32 -0
  246. package/CountryFlags/GY.d.ts +3 -0
  247. package/CountryFlags/GY.js +33 -0
  248. package/CountryFlags/HK.d.ts +3 -0
  249. package/CountryFlags/HK.js +32 -0
  250. package/CountryFlags/HM.d.ts +3 -0
  251. package/CountryFlags/HM.js +41 -0
  252. package/CountryFlags/HN.d.ts +3 -0
  253. package/CountryFlags/HN.js +31 -0
  254. package/CountryFlags/HR.d.ts +3 -0
  255. package/CountryFlags/HR.js +38 -0
  256. package/CountryFlags/HT.d.ts +3 -0
  257. package/CountryFlags/HT.js +36 -0
  258. package/CountryFlags/HU.d.ts +3 -0
  259. package/CountryFlags/HU.js +31 -0
  260. package/CountryFlags/IC.d.ts +3 -0
  261. package/CountryFlags/IC.js +31 -0
  262. package/CountryFlags/ID.d.ts +3 -0
  263. package/CountryFlags/ID.js +30 -0
  264. package/CountryFlags/IE.d.ts +3 -0
  265. package/CountryFlags/IE.js +31 -0
  266. package/CountryFlags/IL.d.ts +3 -0
  267. package/CountryFlags/IL.js +31 -0
  268. package/CountryFlags/IM.d.ts +3 -0
  269. package/CountryFlags/IM.js +31 -0
  270. package/CountryFlags/IN.d.ts +3 -0
  271. package/CountryFlags/IN.js +35 -0
  272. package/CountryFlags/IO.d.ts +3 -0
  273. package/CountryFlags/IO.js +41 -0
  274. package/CountryFlags/IQ.d.ts +3 -0
  275. package/CountryFlags/IQ.js +33 -0
  276. package/CountryFlags/IR.d.ts +3 -0
  277. package/CountryFlags/IR.js +34 -0
  278. package/CountryFlags/IS.d.ts +3 -0
  279. package/CountryFlags/IS.js +31 -0
  280. package/CountryFlags/IT.d.ts +3 -0
  281. package/CountryFlags/IT.js +31 -0
  282. package/CountryFlags/JE.d.ts +3 -0
  283. package/CountryFlags/JE.js +32 -0
  284. package/CountryFlags/JM.d.ts +3 -0
  285. package/CountryFlags/JM.js +32 -0
  286. package/CountryFlags/JO.d.ts +3 -0
  287. package/CountryFlags/JO.js +33 -0
  288. package/CountryFlags/JP.d.ts +3 -0
  289. package/CountryFlags/JP.js +30 -0
  290. package/CountryFlags/KE.d.ts +3 -0
  291. package/CountryFlags/KE.js +38 -0
  292. package/CountryFlags/KG.d.ts +3 -0
  293. package/CountryFlags/KG.js +35 -0
  294. package/CountryFlags/KH.d.ts +3 -0
  295. package/CountryFlags/KH.js +32 -0
  296. package/CountryFlags/KI.d.ts +3 -0
  297. package/CountryFlags/KI.js +35 -0
  298. package/CountryFlags/KM.d.ts +3 -0
  299. package/CountryFlags/KM.js +37 -0
  300. package/CountryFlags/KN.d.ts +3 -0
  301. package/CountryFlags/KN.js +34 -0
  302. package/CountryFlags/KP.d.ts +3 -0
  303. package/CountryFlags/KP.js +35 -0
  304. package/CountryFlags/KR.d.ts +3 -0
  305. package/CountryFlags/KR.js +38 -0
  306. package/CountryFlags/KW.d.ts +3 -0
  307. package/CountryFlags/KW.js +32 -0
  308. package/CountryFlags/KY.d.ts +3 -0
  309. package/CountryFlags/KY.js +41 -0
  310. package/CountryFlags/KZ.d.ts +3 -0
  311. package/CountryFlags/KZ.js +31 -0
  312. package/CountryFlags/LA.d.ts +3 -0
  313. package/CountryFlags/LA.js +32 -0
  314. package/CountryFlags/LB.d.ts +3 -0
  315. package/CountryFlags/LB.js +33 -0
  316. package/CountryFlags/LC.d.ts +3 -0
  317. package/CountryFlags/LC.js +32 -0
  318. package/CountryFlags/LI.d.ts +3 -0
  319. package/CountryFlags/LI.js +31 -0
  320. package/CountryFlags/LK.d.ts +3 -0
  321. package/CountryFlags/LK.js +36 -0
  322. package/CountryFlags/LR.d.ts +3 -0
  323. package/CountryFlags/LR.js +33 -0
  324. package/CountryFlags/LS.d.ts +3 -0
  325. package/CountryFlags/LS.js +33 -0
  326. package/CountryFlags/LT.d.ts +3 -0
  327. package/CountryFlags/LT.js +31 -0
  328. package/CountryFlags/LU.d.ts +3 -0
  329. package/CountryFlags/LU.js +31 -0
  330. package/CountryFlags/LV.d.ts +3 -0
  331. package/CountryFlags/LV.js +31 -0
  332. package/CountryFlags/LY.d.ts +3 -0
  333. package/CountryFlags/LY.js +34 -0
  334. package/CountryFlags/MA.d.ts +3 -0
  335. package/CountryFlags/MA.js +30 -0
  336. package/CountryFlags/MC.d.ts +3 -0
  337. package/CountryFlags/MC.js +30 -0
  338. package/CountryFlags/MD.d.ts +3 -0
  339. package/CountryFlags/MD.js +32 -0
  340. package/CountryFlags/ME.d.ts +3 -0
  341. package/CountryFlags/ME.js +32 -0
  342. package/CountryFlags/MF.d.ts +3 -0
  343. package/CountryFlags/MF.js +33 -0
  344. package/CountryFlags/MG.d.ts +3 -0
  345. package/CountryFlags/MG.js +31 -0
  346. package/CountryFlags/MH.d.ts +3 -0
  347. package/CountryFlags/MH.js +32 -0
  348. package/CountryFlags/MK.d.ts +3 -0
  349. package/CountryFlags/MK.js +33 -0
  350. package/CountryFlags/ML.d.ts +3 -0
  351. package/CountryFlags/ML.js +31 -0
  352. package/CountryFlags/MM.d.ts +3 -0
  353. package/CountryFlags/MM.js +32 -0
  354. package/CountryFlags/MN.d.ts +3 -0
  355. package/CountryFlags/MN.js +37 -0
  356. package/CountryFlags/MO.d.ts +3 -0
  357. package/CountryFlags/MO.js +34 -0
  358. package/CountryFlags/MP.d.ts +3 -0
  359. package/CountryFlags/MP.js +35 -0
  360. package/CountryFlags/MQ.d.ts +3 -0
  361. package/CountryFlags/MQ.js +32 -0
  362. package/CountryFlags/MR.d.ts +3 -0
  363. package/CountryFlags/MR.js +32 -0
  364. package/CountryFlags/MS.d.ts +3 -0
  365. package/CountryFlags/MS.js +40 -0
  366. package/CountryFlags/MT.d.ts +3 -0
  367. package/CountryFlags/MT.js +31 -0
  368. package/CountryFlags/MU.d.ts +3 -0
  369. package/CountryFlags/MU.js +32 -0
  370. package/CountryFlags/MV.d.ts +3 -0
  371. package/CountryFlags/MV.js +31 -0
  372. package/CountryFlags/MW.d.ts +3 -0
  373. package/CountryFlags/MW.js +32 -0
  374. package/CountryFlags/MX.d.ts +3 -0
  375. package/CountryFlags/MX.js +33 -0
  376. package/CountryFlags/MY.d.ts +3 -0
  377. package/CountryFlags/MY.js +33 -0
  378. package/CountryFlags/MZ.d.ts +3 -0
  379. package/CountryFlags/MZ.js +34 -0
  380. package/CountryFlags/NA.d.ts +3 -0
  381. package/CountryFlags/NA.js +33 -0
  382. package/CountryFlags/NC.d.ts +3 -0
  383. package/CountryFlags/NC.js +38 -0
  384. package/CountryFlags/NE.d.ts +3 -0
  385. package/CountryFlags/NE.js +32 -0
  386. package/CountryFlags/NF.d.ts +3 -0
  387. package/CountryFlags/NF.js +31 -0
  388. package/CountryFlags/NG.d.ts +3 -0
  389. package/CountryFlags/NG.js +31 -0
  390. package/CountryFlags/NI.d.ts +3 -0
  391. package/CountryFlags/NI.js +35 -0
  392. package/CountryFlags/NL.d.ts +3 -0
  393. package/CountryFlags/NL.js +31 -0
  394. package/CountryFlags/NO.d.ts +3 -0
  395. package/CountryFlags/NO.js +31 -0
  396. package/CountryFlags/NP.d.ts +3 -0
  397. package/CountryFlags/NP.js +34 -0
  398. package/CountryFlags/NR.d.ts +3 -0
  399. package/CountryFlags/NR.js +31 -0
  400. package/CountryFlags/NU.d.ts +3 -0
  401. package/CountryFlags/NU.js +53 -0
  402. package/CountryFlags/NZ.d.ts +3 -0
  403. package/CountryFlags/NZ.js +41 -0
  404. package/CountryFlags/OM.d.ts +3 -0
  405. package/CountryFlags/OM.js +34 -0
  406. package/CountryFlags/PA.d.ts +3 -0
  407. package/CountryFlags/PA.js +33 -0
  408. package/CountryFlags/PE.d.ts +3 -0
  409. package/CountryFlags/PE.js +31 -0
  410. package/CountryFlags/PF.d.ts +3 -0
  411. package/CountryFlags/PF.js +35 -0
  412. package/CountryFlags/PG.d.ts +3 -0
  413. package/CountryFlags/PG.js +33 -0
  414. package/CountryFlags/PH.d.ts +3 -0
  415. package/CountryFlags/PH.js +33 -0
  416. package/CountryFlags/PK.d.ts +3 -0
  417. package/CountryFlags/PK.js +34 -0
  418. package/CountryFlags/PL.d.ts +3 -0
  419. package/CountryFlags/PL.js +32 -0
  420. package/CountryFlags/PM.d.ts +3 -0
  421. package/CountryFlags/PM.js +32 -0
  422. package/CountryFlags/PN.d.ts +3 -0
  423. package/CountryFlags/PN.js +43 -0
  424. package/CountryFlags/PR.d.ts +3 -0
  425. package/CountryFlags/PR.js +33 -0
  426. package/CountryFlags/PS.d.ts +3 -0
  427. package/CountryFlags/PS.js +32 -0
  428. package/CountryFlags/PT.d.ts +3 -0
  429. package/CountryFlags/PT.js +33 -0
  430. package/CountryFlags/PW.d.ts +3 -0
  431. package/CountryFlags/PW.js +30 -0
  432. package/CountryFlags/PY.d.ts +3 -0
  433. package/CountryFlags/PY.js +33 -0
  434. package/CountryFlags/QA.d.ts +3 -0
  435. package/CountryFlags/QA.js +30 -0
  436. package/CountryFlags/RE.d.ts +3 -0
  437. package/CountryFlags/RE.js +32 -0
  438. package/CountryFlags/RO.d.ts +3 -0
  439. package/CountryFlags/RO.js +31 -0
  440. package/CountryFlags/RS.d.ts +3 -0
  441. package/CountryFlags/RS.js +35 -0
  442. package/CountryFlags/RU.d.ts +3 -0
  443. package/CountryFlags/RU.js +32 -0
  444. package/CountryFlags/RW.d.ts +3 -0
  445. package/CountryFlags/RW.js +32 -0
  446. package/CountryFlags/SA.d.ts +3 -0
  447. package/CountryFlags/SA.js +33 -0
  448. package/CountryFlags/SB.d.ts +3 -0
  449. package/CountryFlags/SB.js +33 -0
  450. package/CountryFlags/SC.d.ts +3 -0
  451. package/CountryFlags/SC.js +33 -0
  452. package/CountryFlags/SD.d.ts +3 -0
  453. package/CountryFlags/SD.js +32 -0
  454. package/CountryFlags/SE.d.ts +3 -0
  455. package/CountryFlags/SE.js +30 -0
  456. package/CountryFlags/SG.d.ts +3 -0
  457. package/CountryFlags/SG.js +33 -0
  458. package/CountryFlags/SH.d.ts +3 -0
  459. package/CountryFlags/SH.js +43 -0
  460. package/CountryFlags/SI.d.ts +3 -0
  461. package/CountryFlags/SI.js +34 -0
  462. package/CountryFlags/SJ.d.ts +3 -0
  463. package/CountryFlags/SJ.js +31 -0
  464. package/CountryFlags/SK.d.ts +3 -0
  465. package/CountryFlags/SK.js +35 -0
  466. package/CountryFlags/SL.d.ts +3 -0
  467. package/CountryFlags/SL.js +31 -0
  468. package/CountryFlags/SM.d.ts +3 -0
  469. package/CountryFlags/SM.js +35 -0
  470. package/CountryFlags/SN.d.ts +3 -0
  471. package/CountryFlags/SN.js +32 -0
  472. package/CountryFlags/SO.d.ts +3 -0
  473. package/CountryFlags/SO.js +30 -0
  474. package/CountryFlags/SR.d.ts +3 -0
  475. package/CountryFlags/SR.js +33 -0
  476. package/CountryFlags/SS.d.ts +3 -0
  477. package/CountryFlags/SS.js +34 -0
  478. package/CountryFlags/ST.d.ts +3 -0
  479. package/CountryFlags/ST.js +33 -0
  480. package/CountryFlags/SV.d.ts +3 -0
  481. package/CountryFlags/SV.js +34 -0
  482. package/CountryFlags/SX.d.ts +3 -0
  483. package/CountryFlags/SX.js +37 -0
  484. package/CountryFlags/SY.d.ts +3 -0
  485. package/CountryFlags/SY.js +33 -0
  486. package/CountryFlags/SZ.d.ts +3 -0
  487. package/CountryFlags/SZ.js +35 -0
  488. package/CountryFlags/TA.d.ts +3 -0
  489. package/CountryFlags/TA.js +47 -0
  490. package/CountryFlags/TC.d.ts +3 -0
  491. package/CountryFlags/TC.js +44 -0
  492. package/CountryFlags/TD.d.ts +3 -0
  493. package/CountryFlags/TD.js +31 -0
  494. package/CountryFlags/TF.d.ts +3 -0
  495. package/CountryFlags/TF.js +34 -0
  496. package/CountryFlags/TG.d.ts +3 -0
  497. package/CountryFlags/TG.js +33 -0
  498. package/CountryFlags/TH.d.ts +3 -0
  499. package/CountryFlags/TH.js +32 -0
  500. package/CountryFlags/TJ.d.ts +3 -0
  501. package/CountryFlags/TJ.js +33 -0
  502. package/CountryFlags/TK.d.ts +3 -0
  503. package/CountryFlags/TK.js +33 -0
  504. package/CountryFlags/TL.d.ts +3 -0
  505. package/CountryFlags/TL.js +32 -0
  506. package/CountryFlags/TM.d.ts +3 -0
  507. package/CountryFlags/TM.js +45 -0
  508. package/CountryFlags/TN.d.ts +3 -0
  509. package/CountryFlags/TN.js +33 -0
  510. package/CountryFlags/TO.d.ts +3 -0
  511. package/CountryFlags/TO.js +31 -0
  512. package/CountryFlags/TR.d.ts +3 -0
  513. package/CountryFlags/TR.js +30 -0
  514. package/CountryFlags/TT.d.ts +3 -0
  515. package/CountryFlags/TT.js +31 -0
  516. package/CountryFlags/TV.d.ts +3 -0
  517. package/CountryFlags/TV.js +36 -0
  518. package/CountryFlags/TW.d.ts +3 -0
  519. package/CountryFlags/TW.js +33 -0
  520. package/CountryFlags/TZ.d.ts +3 -0
  521. package/CountryFlags/TZ.js +32 -0
  522. package/CountryFlags/UA.d.ts +3 -0
  523. package/CountryFlags/UA.js +30 -0
  524. package/CountryFlags/UG.d.ts +3 -0
  525. package/CountryFlags/UG.js +35 -0
  526. package/CountryFlags/UM.d.ts +3 -0
  527. package/CountryFlags/UM.js +34 -0
  528. package/CountryFlags/US.d.ts +3 -0
  529. package/CountryFlags/US.js +34 -0
  530. package/CountryFlags/UY.d.ts +3 -0
  531. package/CountryFlags/UY.js +33 -0
  532. package/CountryFlags/UZ.d.ts +3 -0
  533. package/CountryFlags/UZ.js +35 -0
  534. package/CountryFlags/VA.d.ts +3 -0
  535. package/CountryFlags/VA.js +32 -0
  536. package/CountryFlags/VC.d.ts +3 -0
  537. package/CountryFlags/VC.js +32 -0
  538. package/CountryFlags/VE.d.ts +3 -0
  539. package/CountryFlags/VE.js +32 -0
  540. package/CountryFlags/VG.d.ts +3 -0
  541. package/CountryFlags/VG.js +45 -0
  542. package/CountryFlags/VI.d.ts +3 -0
  543. package/CountryFlags/VI.js +41 -0
  544. package/CountryFlags/VN.d.ts +3 -0
  545. package/CountryFlags/VN.js +30 -0
  546. package/CountryFlags/VU.d.ts +3 -0
  547. package/CountryFlags/VU.js +35 -0
  548. package/CountryFlags/WF.d.ts +3 -0
  549. package/CountryFlags/WF.js +33 -0
  550. package/CountryFlags/WS.d.ts +3 -0
  551. package/CountryFlags/WS.js +32 -0
  552. package/CountryFlags/XK.d.ts +3 -0
  553. package/CountryFlags/XK.js +32 -0
  554. package/CountryFlags/YE.d.ts +3 -0
  555. package/CountryFlags/YE.js +31 -0
  556. package/CountryFlags/YT.d.ts +3 -0
  557. package/CountryFlags/YT.js +35 -0
  558. package/CountryFlags/ZA.d.ts +3 -0
  559. package/CountryFlags/ZA.js +34 -0
  560. package/CountryFlags/ZM.d.ts +3 -0
  561. package/CountryFlags/ZM.js +33 -0
  562. package/CountryFlags/ZW.d.ts +3 -0
  563. package/CountryFlags/ZW.js +39 -0
  564. package/DatePicker/index.d.ts +3 -0
  565. package/DatePicker/index.js +8 -0
  566. package/ErrorBoundary/index.d.ts +19 -0
  567. package/ErrorBoundary/index.js +78 -0
  568. package/Image/index.d.ts +7 -0
  569. package/Image/index.js +45 -0
  570. package/MaskedField/index.d.ts +33 -0
  571. package/MaskedField/index.js +63 -0
  572. package/MaskedField/templates.d.ts +11 -0
  573. package/MaskedField/templates.js +81 -0
  574. package/MaskedField/useMasked.d.ts +18 -0
  575. package/MaskedField/useMasked.js +96 -0
  576. package/Menu/MenuItem.d.ts +10 -0
  577. package/Menu/MenuItem.js +47 -0
  578. package/Menu/MenuItemInner.d.ts +7 -0
  579. package/Menu/MenuItemInner.js +48 -0
  580. package/Menu/MenuWrapper.d.ts +10 -0
  581. package/Menu/MenuWrapper.js +76 -0
  582. package/Menu/index.d.ts +196 -0
  583. package/Menu/index.js +452 -0
  584. package/Menu/popper-options.d.ts +4 -0
  585. package/Menu/popper-options.js +33 -0
  586. package/Menu/reducer.d.ts +14 -0
  587. package/Menu/reducer.js +19 -0
  588. package/Modal/CloseIcon.d.ts +3 -0
  589. package/Modal/CloseIcon.js +37 -0
  590. package/Modal/ModalConfirmBox.d.ts +9 -0
  591. package/Modal/ModalConfirmBox.js +148 -0
  592. package/Modal/ModalDialog.d.ts +7 -0
  593. package/Modal/ModalDialog.js +99 -0
  594. package/Modal/ModalDrawer.d.ts +11 -0
  595. package/Modal/ModalDrawer.js +150 -0
  596. package/Modal/ModalMessageBox.d.ts +8 -0
  597. package/Modal/ModalMessageBox.js +147 -0
  598. package/Modal/index.d.ts +12 -0
  599. package/Modal/index.js +54 -0
  600. package/NoSSR/index.d.ts +7 -0
  601. package/NoSSR/index.js +15 -0
  602. package/PhoneField/CountryFlagComponent.d.ts +6 -0
  603. package/PhoneField/CountryFlagComponent.js +44 -0
  604. package/PhoneField/UnknownFlag.d.ts +3 -0
  605. package/PhoneField/UnknownFlag.js +34 -0
  606. package/PhoneField/index.d.ts +54 -0
  607. package/PhoneField/index.js +97 -0
  608. package/PhoneField/templates.d.ts +82 -0
  609. package/PhoneField/templates.js +45 -0
  610. package/PhoneField/usePhoneUtils.d.ts +69 -0
  611. package/PhoneField/usePhoneUtils.js +172 -0
  612. package/README.md +12 -10
  613. package/SelectBox/IconChevronDown.d.ts +3 -0
  614. package/SelectBox/IconChevronDown.js +9 -0
  615. package/SelectBox/SelectButton.d.ts +10 -0
  616. package/SelectBox/SelectButton.js +78 -0
  617. package/SelectBox/index.d.ts +40 -0
  618. package/SelectBox/index.js +188 -0
  619. package/SelectBox/popper-options.d.ts +4 -0
  620. package/SelectBox/popper-options.js +33 -0
  621. package/Surface/SurfaceContainer.d.ts +8 -0
  622. package/Surface/SurfaceContainer.js +39 -0
  623. package/Surface/SurfaceContent.d.ts +8 -0
  624. package/Surface/SurfaceContent.js +31 -0
  625. package/Surface/SurfaceHeader.d.ts +4 -0
  626. package/Surface/SurfaceHeader.js +30 -0
  627. package/Surface/SurfaceSubheader.d.ts +4 -0
  628. package/Surface/SurfaceSubheader.js +29 -0
  629. package/Surface/index.d.ts +62 -0
  630. package/Surface/index.js +61 -0
  631. package/Table/Table.d.ts +8 -0
  632. package/Table/Table.js +46 -0
  633. package/Table/TableBody.d.ts +4 -0
  634. package/Table/TableBody.js +30 -0
  635. package/Table/TableCaption.d.ts +4 -0
  636. package/Table/TableCaption.js +30 -0
  637. package/Table/TableCell.d.ts +4 -0
  638. package/Table/TableCell.js +31 -0
  639. package/Table/TableFooter.d.ts +4 -0
  640. package/Table/TableFooter.js +36 -0
  641. package/Table/TableHeader.d.ts +4 -0
  642. package/Table/TableHeader.js +30 -0
  643. package/Table/TableHeaderCell.d.ts +4 -0
  644. package/Table/TableHeaderCell.js +35 -0
  645. package/Table/TableRow.d.ts +4 -0
  646. package/Table/TableRow.js +30 -0
  647. package/Table/index.d.ts +18 -0
  648. package/Table/index.js +45 -0
  649. package/TextField/TextFieldContainer.d.ts +8 -0
  650. package/TextField/TextFieldContainer.js +52 -0
  651. package/TextField/TextFieldErrorText.d.ts +7 -0
  652. package/TextField/TextFieldErrorText.js +75 -0
  653. package/TextField/TextFieldIconWrapper.d.ts +18 -0
  654. package/TextField/TextFieldIconWrapper.js +73 -0
  655. package/TextField/TextFieldInput.d.ts +7 -0
  656. package/TextField/TextFieldInput.js +71 -0
  657. package/TextField/TextFieldInputWrapper.d.ts +14 -0
  658. package/TextField/TextFieldInputWrapper.js +76 -0
  659. package/TextField/TextFieldLabel.d.ts +7 -0
  660. package/TextField/TextFieldLabel.js +50 -0
  661. package/TextField/TextFieldLabelAsterisk.d.ts +13 -0
  662. package/TextField/TextFieldLabelAsterisk.js +51 -0
  663. package/TextField/index.d.ts +80 -0
  664. package/TextField/index.js +100 -0
  665. package/ThemeProvider/createTheme.d.ts +3 -0
  666. package/ThemeProvider/createTheme.js +46 -0
  667. package/ThemeProvider/index.d.ts +57 -0
  668. package/ThemeProvider/index.js +29 -0
  669. package/Typography/Base.d.ts +6 -0
  670. package/Typography/Base.js +12 -0
  671. package/Typography/Blockquote.d.ts +6 -0
  672. package/Typography/Blockquote.js +23 -0
  673. package/Typography/Del.d.ts +6 -0
  674. package/Typography/Del.js +11 -0
  675. package/Typography/Em.d.ts +6 -0
  676. package/Typography/Em.js +11 -0
  677. package/Typography/H1.d.ts +6 -0
  678. package/Typography/H1.js +12 -0
  679. package/Typography/H2.d.ts +6 -0
  680. package/Typography/H2.js +12 -0
  681. package/Typography/H3.d.ts +6 -0
  682. package/Typography/H3.js +12 -0
  683. package/Typography/H4.d.ts +6 -0
  684. package/Typography/H4.js +12 -0
  685. package/Typography/H5.d.ts +6 -0
  686. package/Typography/H5.js +12 -0
  687. package/Typography/List.d.ts +14 -0
  688. package/Typography/List.js +32 -0
  689. package/Typography/Paragraph.d.ts +14 -0
  690. package/Typography/Paragraph.js +52 -0
  691. package/Typography/SectionDescription.d.ts +7 -0
  692. package/Typography/SectionDescription.js +17 -0
  693. package/Typography/SectionTitle.d.ts +8 -0
  694. package/Typography/SectionTitle.js +31 -0
  695. package/Typography/Span.d.ts +6 -0
  696. package/Typography/Span.js +11 -0
  697. package/Typography/Strong.d.ts +6 -0
  698. package/Typography/Strong.js +11 -0
  699. package/Typography/U.d.ts +6 -0
  700. package/Typography/U.js +10 -0
  701. package/Typography/index.d.ts +3 -0
  702. package/Typography/index.js +22 -0
  703. package/index.d.ts +1 -0
  704. package/index.js +1 -7
  705. package/package.json +3 -9
package/Modal/index.js ADDED
@@ -0,0 +1,54 @@
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
+ const React = __importStar(require("react"));
30
+ const ModalDialog_1 = __importDefault(require("./ModalDialog"));
31
+ const ModalConfirmBox_1 = __importDefault(require("./ModalConfirmBox"));
32
+ const ModalMessageBox_1 = __importDefault(require("./ModalMessageBox"));
33
+ const ModalDrawer_1 = __importDefault(require("./ModalDrawer"));
34
+ const isDialog = (props) => ('variant' in props && props.variant === 'dialog') || typeof props.variant === 'undefined';
35
+ const isConfirmBox = (props) => 'variant' in props && props.variant === 'confirm-box';
36
+ const isMessageBox = (props) => 'variant' in props && props.variant === 'message-box';
37
+ const isDrawer = (props) => 'variant' in props && props.variant === 'drawer';
38
+ const Modal = (props, ref) => {
39
+ if (isDialog(props)) {
40
+ return React.createElement(ModalDialog_1.default, Object.assign({}, props, { ref: ref }));
41
+ }
42
+ if (isConfirmBox(props)) {
43
+ return React.createElement(ModalConfirmBox_1.default, Object.assign({}, props, { ref: ref }));
44
+ }
45
+ if (isMessageBox(props)) {
46
+ return React.createElement(ModalMessageBox_1.default, Object.assign({}, props, { ref: ref }));
47
+ }
48
+ if (isDrawer(props)) {
49
+ return React.createElement(ModalDrawer_1.default, Object.assign({}, props, { ref: ref }));
50
+ }
51
+ const { variant } = props;
52
+ throw new Error(`Expected «variant» property is «dialog», «drawer», «message-box» or «confirm-box», but got «${variant}»`);
53
+ };
54
+ exports.default = React.forwardRef(Modal);
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ interface NoSSRProps {
3
+ children: React.ReactNode | React.ReactNode[];
4
+ fallback?: React.ReactNode | React.ReactNode[];
5
+ }
6
+ declare const NoSSR: React.FC<NoSSRProps>;
7
+ export default NoSSR;
package/NoSSR/index.js ADDED
@@ -0,0 +1,15 @@
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
+ const react_1 = __importDefault(require("react"));
7
+ const NoSSR = props => {
8
+ const { fallback, children } = props;
9
+ const [mountedState, setMountedState] = react_1.default.useState(false);
10
+ react_1.default.useEffect(() => {
11
+ setMountedState(true);
12
+ }, []);
13
+ return mountedState ? react_1.default.createElement(react_1.default.Fragment, null, children) : react_1.default.createElement(react_1.default.Fragment, null, fallback ? fallback : null);
14
+ };
15
+ exports.default = NoSSR;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ export interface CountryFlagComponentProps extends React.HTMLAttributes<HTMLSpanElement> {
3
+ readonly flag: JSX.Element | null;
4
+ }
5
+ declare const CountryFlagComponent: React.FC<CountryFlagComponentProps>;
6
+ export default CountryFlagComponent;
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ const react_1 = __importDefault(require("react"));
18
+ const styled_1 = __importDefault(require("@emotion/styled"));
19
+ const UnknownFlag_1 = __importDefault(require("./UnknownFlag"));
20
+ const CountryFlagContainer = styled_1.default.span `
21
+ display: flex;
22
+ align-items: center;
23
+ justify-content: center;
24
+ font-size: 1.2em;
25
+ border-radius: 100%;
26
+ overflow: hidden;
27
+ margin-left: 0.5em;
28
+ margin-right: 0.5em;
29
+ position: relative;
30
+ width: 1em;
31
+ height: 1em;
32
+ border: 1px solid ${({ theme }) => theme.color.textPrimary.alpha(0.5).toString()};
33
+ & > svg {
34
+ position: absolute;
35
+ left: 50%;
36
+ top: 50%;
37
+ transform: translate(-50%, -50%);
38
+ }
39
+ `;
40
+ const CountryFlagComponent = props => {
41
+ const { flag } = props, otherProps = __rest(props, ["flag"]);
42
+ return (react_1.default.createElement(CountryFlagContainer, Object.assign({}, otherProps), typeof flag === 'undefined' || flag === null ? react_1.default.createElement(UnknownFlag_1.default, null) : flag));
43
+ };
44
+ exports.default = CountryFlagComponent;
@@ -0,0 +1,3 @@
1
+ import * as React from 'react';
2
+ declare const _default: React.ForwardRefExoticComponent<Omit<React.SVGProps<SVGSVGElement>, "ref"> & React.RefAttributes<SVGSVGElement>>;
3
+ export default _default;
@@ -0,0 +1,34 @@
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
+ const React = __importStar(require("react"));
27
+ const react_1 = require("@emotion/react");
28
+ const UnknownFlag = (props, ref) => {
29
+ const { color } = (0, react_1.useTheme)();
30
+ return (React.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 512 512", ref: ref }, props),
31
+ React.createElement("path", { transform: "translate(78.682 31.951)", d: "m-78.682-31.951h512v512h-512z", fill: color.surface.toString(), strokeLinejoin: "round", strokeWidth: "2.176" }),
32
+ React.createElement("path", { transform: "translate(78.682 31.951)", d: "m177.32 288.09q-4.915 0-8.0953-3.1803-3.1803-3.4694-3.1803-8.3844 0-11.854 5.7824-25.153 5.7823-13.299 15.612-22.551l7.2279-6.6497q9.83-9.2518 15.323-15.323 5.4932-6.3606 8.9626-15.034 3.7585-8.9626 3.7585-20.527 0-11.276-5.4932-20.527-5.4932-9.5409-15.612-15.034-10.119-5.4932-23.129-5.4932-21.395 0-34.116 13.01-12.432 12.721-12.432 33.248 0 4.915-3.1803 8.0953-2.8912 2.8912-7.8062 2.8912t-8.0953-2.8912q-3.1803-3.1803-3.1803-8.0953 0-19.66 8.6735-34.983 8.6735-15.323 24.286-23.997 15.612-8.6735 35.851-8.6735 19.082 0 34.116 8.3844 15.323 8.0953 23.708 22.551 8.6735 14.456 8.6735 32.67 0 14.167-4.6259 24.864-4.6259 10.408-11.854 18.503-6.9388 8.0953-19.949 19.949l-5.2041 4.6259q-8.0953 7.2279-11.565 17.058-3.1803 9.5409-3.1803 19.082 0 4.915-3.1803 8.3844-3.1803 3.1803-8.0953 3.1803zm0 51.174q-7.2279 0-12.143-4.915-4.6259-4.915-4.6259-11.854 0-7.2279 4.915-12.143 4.915-4.915 11.854-4.915t11.854 4.915q5.2041 4.915 5.2041 12.143 0 6.9388-5.2041 11.854-4.915 4.915-11.854 4.915z", fill: color.textPrimary.toString(), strokeWidth: ".72279" })));
33
+ };
34
+ exports.default = React.forwardRef(UnknownFlag);
@@ -0,0 +1,54 @@
1
+ import React from 'react';
2
+ import { TextFieldProps } from '../TextField';
3
+ import type { CountryCode, CountryFlag, PhoneTemplate } from './templates';
4
+ export interface PhoneFieldProps extends Omit<TextFieldProps, 'value' | 'onChange'> {
5
+ /**
6
+ * Phone string format 79876543210 or +7 (987) 654-32-10
7
+ */
8
+ readonly value: string;
9
+ readonly defaultCountry?: CountryCode | null;
10
+ readonly onChange: (payload: PhonePayload) => void;
11
+ readonly templates: readonly PhoneTemplate[];
12
+ }
13
+ export interface PhonePayload {
14
+ /**
15
+ * Phone formatted string, e.g.: +7 (987) 654-32-10
16
+ */
17
+ readonly value: string;
18
+ /**
19
+ * Country code (ISO 3166-1 alpha-2), e.g.: RU
20
+ */
21
+ readonly countryCode: string | null;
22
+ /**
23
+ * JSX Element of Country Flag
24
+ */
25
+ readonly CountryFlag: CountryFlag | null;
26
+ /**
27
+ * Phone template, e.g.: +7 (xxx) xxx-xx-xx. The symbol «x» - is a digit
28
+ */
29
+ readonly template: string;
30
+ /**
31
+ * Phone placeholder, e.g.: +7 (999) 999-99-99
32
+ */
33
+ readonly placeholder: string;
34
+ /**
35
+ * Country calling code, e.g.: 7
36
+ */
37
+ readonly callingCode: string | null;
38
+ /**
39
+ * Phone number without calling code and formatters
40
+ */
41
+ readonly number: string;
42
+ /**
43
+ * Phone number with calling code
44
+ */
45
+ readonly combined: string;
46
+ /**
47
+ * Phone validation status
48
+ */
49
+ readonly isValid: boolean;
50
+ }
51
+ declare const _default: React.ForwardRefExoticComponent<PhoneFieldProps & React.RefAttributes<HTMLDivElement>>;
52
+ export default _default;
53
+ export * from './usePhoneUtils';
54
+ export * from './templates';
@@ -0,0 +1,97 @@
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ var __rest = (this && this.__rest) || function (s, e) {
17
+ var t = {};
18
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
19
+ t[p] = s[p];
20
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
21
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
22
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
23
+ t[p[i]] = s[p[i]];
24
+ }
25
+ return t;
26
+ };
27
+ var __importDefault = (this && this.__importDefault) || function (mod) {
28
+ return (mod && mod.__esModule) ? mod : { "default": mod };
29
+ };
30
+ Object.defineProperty(exports, "__esModule", { value: true });
31
+ const react_1 = __importDefault(require("react"));
32
+ const TextField_1 = __importDefault(require("../TextField"));
33
+ const usePhoneUtils_1 = require("./usePhoneUtils");
34
+ const CountryFlagComponent_1 = __importDefault(require("./CountryFlagComponent"));
35
+ const PhoneField = (props, ref) => {
36
+ const { value, defaultCountry, templates, inputRef, onChange } = props, textFieldProps = __rest(props, ["value", "defaultCountry", "templates", "inputRef", "onChange"]);
37
+ const { formatParsedInput, parseInput, parseAndFormat } = (0, usePhoneUtils_1.usePhoneUtils)({ templates });
38
+ const textInputRef = react_1.default.useRef(null);
39
+ const initialValue = react_1.default.useRef(value);
40
+ const [state, setState] = react_1.default.useState(() => {
41
+ const { text, countryCode, placeholder, number, CountryFlag } = parseAndFormat(String(initialValue.current));
42
+ return {
43
+ currentValue: text,
44
+ number,
45
+ countryCode,
46
+ placeholder,
47
+ CountryFlag,
48
+ };
49
+ });
50
+ const { countryCode, currentValue, placeholder, CountryFlag } = state;
51
+ react_1.default.useEffect(() => {
52
+ if (initialValue.current !== value) {
53
+ initialValue.current = value;
54
+ const formatted = parseAndFormat(String(value));
55
+ if (formatted.text !== currentValue) {
56
+ setState(prev => (Object.assign(Object.assign({}, prev), { currentValue: formatted.text, countryCode: formatted.countryCode, placeholder: formatted.placeholder, CountryFlag: formatted.CountryFlag })));
57
+ }
58
+ }
59
+ }, [countryCode, currentValue, parseAndFormat, placeholder, value]);
60
+ const handleChange = event => {
61
+ var _a;
62
+ const parsed = parseInput(String(event.currentTarget.value), ((_a = textInputRef.current) === null || _a === void 0 ? void 0 : _a.selectionStart) || 0);
63
+ const { caret, text, template, placeholder, countryCode, callingCode, CountryFlag, number, isValid, } = formatParsedInput(parsed.text, parsed.caret);
64
+ onChange({
65
+ value: text,
66
+ placeholder,
67
+ CountryFlag,
68
+ template,
69
+ countryCode,
70
+ callingCode,
71
+ number,
72
+ isValid,
73
+ combined: `${callingCode}${number}`,
74
+ });
75
+ setState(prev => (Object.assign(Object.assign({}, prev), { currentValue: text, countryCode,
76
+ placeholder,
77
+ CountryFlag })));
78
+ setTimeout(() => {
79
+ var _a;
80
+ (_a = textInputRef.current) === null || _a === void 0 ? void 0 : _a.setSelectionRange(caret, caret);
81
+ }, 15);
82
+ };
83
+ return (react_1.default.createElement(TextField_1.default, Object.assign({ ref: ref }, textFieldProps, { startIcon: react_1.default.createElement(CountryFlagComponent_1.default, { flag: CountryFlag, onClick: () => {
84
+ if (textInputRef.current) {
85
+ textInputRef.current.select();
86
+ textInputRef.current.focus();
87
+ }
88
+ } }), value: currentValue, placeholder: placeholder, onChange: handleChange, inputRef: input => {
89
+ textInputRef.current = input;
90
+ if (inputRef && typeof inputRef === 'object') {
91
+ inputRef.current = input;
92
+ }
93
+ } })));
94
+ };
95
+ exports.default = react_1.default.forwardRef(PhoneField);
96
+ __exportStar(require("./usePhoneUtils"), exports);
97
+ __exportStar(require("./templates"), exports);
@@ -0,0 +1,82 @@
1
+ /// <reference types="react" />
2
+ export type CallingCode = string;
3
+ /**
4
+ * Template mask - is a string with chars:\
5
+ * x - digit
6
+ * any - hardcoded symbols\
7
+ * Example (third index in array - is a template mask):
8
+ * ```tsx
9
+ * <PhoneField
10
+ templates={[
11
+ [
12
+ 'RU',
13
+ <RU key="ru" />,
14
+ '7',
15
+ '+x (xxx) xxx-xx-xx', // <-- Template mask
16
+ '+7 (987) 654-32-10',
17
+ /^\+$/,
18
+ ],
19
+ ]}
20
+ ...
21
+ />
22
+ * ```
23
+ */
24
+ export type TemplateMask = string;
25
+ /**
26
+ * Input placeholder
27
+ * Example (fourth index in array - is a placeholer):
28
+ * ```tsx
29
+ * <PhoneField
30
+ templates={[
31
+ [
32
+ 'RU',
33
+ <RU key="ru" />,
34
+ '7',
35
+ '+x (xxx) xxx-xx-xx',
36
+ '+7 (987) 654-32-10', // <-- Placeholder
37
+ /^\+$/,
38
+ ],
39
+ ]}
40
+ ...
41
+ />
42
+ * ```
43
+ */
44
+ export type Placeholder = string;
45
+ /**
46
+ * RegEx for template detection
47
+ * Example (fifth index in array - is a RegEx):
48
+ * ```tsx
49
+ * <PhoneField
50
+ templates={[
51
+ [
52
+ 'RU',
53
+ <RU key="ru" />,
54
+ '7',
55
+ '+x (xxx) xxx-xx-xx',
56
+ '+7 (987) 654-32-10',
57
+ /^\+$/, // <-- RegEx. All input starts «+» will be deteced as current (RU) template
58
+ ],
59
+ ]}
60
+ ...
61
+ />
62
+ * ```
63
+ */
64
+ export type RegExpDetect = RegExp;
65
+ /**
66
+ * JSX Element for display Country Flag
67
+ */
68
+ export type CountryFlag = JSX.Element;
69
+ /**
70
+ * Country ISO-2 code
71
+ */
72
+ export type CountryCode = 'AC' | 'AD' | 'AE' | 'AF' | 'AG' | 'AI' | 'AL' | 'AM' | 'AO' | 'AQ' | 'AR' | 'AS' | 'AT' | 'AU' | 'AW' | 'AX' | 'AZ' | 'BA' | 'BB' | 'BD' | 'BE' | 'BF' | 'BG' | 'BH' | 'BI' | 'BJ' | 'BL' | 'BM' | 'BN' | 'BO' | 'BQ' | 'BR' | 'BS' | 'BT' | 'BV' | 'BW' | 'BY' | 'BZ' | 'CA' | 'CC' | 'CD' | 'CF' | 'CG' | 'CH' | 'CI' | 'CK' | 'CL' | 'CM' | 'CN' | 'CO' | 'CR' | 'CU' | 'CV' | 'CW' | 'CX' | 'CY' | 'CZ' | 'DE' | 'DJ' | 'DK' | 'DM' | 'DO' | 'DZ' | 'EC' | 'EE' | 'EG' | 'EH' | 'ER' | 'ES' | 'ET' | 'EU' | 'FI' | 'FJ' | 'FK' | 'FM' | 'FO' | 'FR' | 'GA' | 'GB' | 'GD' | 'GE' | 'GEAB' | 'GEOS' | 'GF' | 'GG' | 'GH' | 'GI' | 'GL' | 'GM' | 'GN' | 'GP' | 'GQ' | 'GR' | 'GS' | 'GT' | 'GU' | 'GW' | 'GY' | 'HK' | 'HM' | 'HN' | 'HR' | 'HT' | 'HU' | 'IC' | 'ID' | 'IE' | 'IL' | 'IM' | 'IN' | 'IO' | 'IQ' | 'IR' | 'IS' | 'IT' | 'JE' | 'JM' | 'JO' | 'JP' | 'KE' | 'KG' | 'KH' | 'KI' | 'KM' | 'KN' | 'KP' | 'KR' | 'KW' | 'KY' | 'KZ' | 'LA' | 'LB' | 'LC' | 'LI' | 'LK' | 'LR' | 'LS' | 'LT' | 'LU' | 'LV' | 'LY' | 'MA' | 'MC' | 'MD' | 'ME' | 'MF' | 'MG' | 'MH' | 'MK' | 'ML' | 'MM' | 'MN' | 'MO' | 'MP' | 'MQ' | 'MR' | 'MS' | 'MT' | 'MU' | 'MV' | 'MW' | 'MX' | 'MY' | 'MZ' | 'NA' | 'NC' | 'NE' | 'NF' | 'NG' | 'NI' | 'NL' | 'NO' | 'NP' | 'NR' | 'NU' | 'NZ' | 'OM' | 'PA' | 'PE' | 'PF' | 'PG' | 'PH' | 'PK' | 'PL' | 'PM' | 'PN' | 'PR' | 'PS' | 'PT' | 'PW' | 'PY' | 'QA' | 'RE' | 'RO' | 'RS' | 'RU' | 'RW' | 'SA' | 'SB' | 'SC' | 'SD' | 'SE' | 'SG' | 'SH' | 'SI' | 'SJ' | 'SK' | 'SL' | 'SM' | 'SN' | 'SO' | 'SR' | 'SS' | 'ST' | 'SV' | 'SX' | 'SY' | 'SZ' | 'TA' | 'TC' | 'TD' | 'TF' | 'TG' | 'TH' | 'TJ' | 'TK' | 'TL' | 'TM' | 'TN' | 'TO' | 'TR' | 'TT' | 'TV' | 'TW' | 'TZ' | 'UA' | 'UG' | 'UM' | 'US' | 'UY' | 'UZ' | 'VA' | 'VC' | 'VE' | 'VG' | 'VI' | 'VN' | 'VU' | 'WF' | 'WS' | 'XK' | 'YE' | 'YT' | 'ZA' | 'ZM' | 'ZW';
73
+ export type PhoneTemplate = [
74
+ CountryCode | null,
75
+ CountryFlag | null,
76
+ CallingCode | null,
77
+ TemplateMask,
78
+ Placeholder,
79
+ RegExpDetect
80
+ ];
81
+ export declare const templates: PhoneTemplate[];
82
+ export default templates;
@@ -0,0 +1,45 @@
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.templates = void 0;
7
+ const react_1 = __importDefault(require("react"));
8
+ // import UnknownFlag from './UnknownFlag';
9
+ const RU_1 = __importDefault(require("@via-profit/ui-kit/src/CountryFlags/RU"));
10
+ const BY_1 = __importDefault(require("@via-profit/ui-kit/src/CountryFlags/BY"));
11
+ const KZ_1 = __importDefault(require("@via-profit/ui-kit/src/CountryFlags/KZ"));
12
+ const UA_1 = __importDefault(require("@via-profit/ui-kit/src/CountryFlags/UA"));
13
+ const JP_1 = __importDefault(require("@via-profit/ui-kit/src/CountryFlags/JP"));
14
+ const US_1 = __importDefault(require("@via-profit/ui-kit/src/CountryFlags/US"));
15
+ const IL_1 = __importDefault(require("@via-profit/ui-kit/src/CountryFlags/IL"));
16
+ exports.templates = [
17
+ // Russian template
18
+ ['RU', react_1.default.createElement(RU_1.default, { key: "ru-1" }), '7', '+x (xxx) xxx-xx-xx', '+7 (987) 654-32-10', /^\+$/],
19
+ ['RU', react_1.default.createElement(RU_1.default, { key: "ru-2" }), '7', '8 (xxx) xxx-xx-xx', '8 (987) 654-32-10', /^8[^1]{0,}/],
20
+ // ['RU', '7', '+7 (xxx) xxx-xx-xx', '+7 (987) 654-32-10', /^\+{0,1}7{0,1}9/], // 912...
21
+ [
22
+ 'RU',
23
+ react_1.default.createElement(RU_1.default, { key: "ru-3" }),
24
+ '7',
25
+ '+7 (xxx) xxx-xx-xx',
26
+ '+7 (987) 654-32-10',
27
+ /^\+{0,1}7([0-5]|[8-9])[0-9][0-9]/,
28
+ ],
29
+ // Other fucking countries
30
+ ['BY', react_1.default.createElement(BY_1.default, { key: "by" }), '375', '+375 (xx) xxx-xx-xx', '+375 (98) 765-43-21', /^\+{0,1}375/],
31
+ ['KZ', react_1.default.createElement(KZ_1.default, { key: "kz-1" }), '7', '+997 (xx) xxx-xx-xx', '+997 (98) 765-43-21', /^\+{0,1}997/],
32
+ [
33
+ 'KZ',
34
+ react_1.default.createElement(KZ_1.default, { key: "kz-2" }),
35
+ '7',
36
+ '+7 (xxx) xxx-xx-xx',
37
+ '+7 (600) 765-43-21',
38
+ /^\+{0,1}7[6-7][0-9][0-9]/,
39
+ ],
40
+ ['UA', react_1.default.createElement(UA_1.default, { key: "ua" }), '380', '+380 (xx) xxx-xxxx', '+380 (98) 765-4321', /^\+{0,1}380/],
41
+ ['JP', react_1.default.createElement(JP_1.default, { key: "jp" }), '81', '+81 (xx) xxx-xxxx', '+81 (98) 765-4321', /^\+{0,1}81/],
42
+ ['US', react_1.default.createElement(US_1.default, { key: "us" }), '1', '+1 xxx xxx-xx-xx', '+1 987 654-32-10', /^\+{0,1}1/],
43
+ ['IL', react_1.default.createElement(IL_1.default, { key: "il" }), '972', '+972 xx xxx-xx-xx', '+972 65 432-10-01', /^\+972/],
44
+ ];
45
+ exports.default = exports.templates;
@@ -0,0 +1,69 @@
1
+ import type { CountryCode, PhoneTemplate, CountryFlag } from './templates';
2
+ export interface Formatted {
3
+ readonly text: string;
4
+ readonly caret: number;
5
+ readonly countryCode: CountryCode | null;
6
+ readonly CountryFlag: CountryFlag | null;
7
+ readonly callingCode: string | null;
8
+ readonly number: string;
9
+ readonly template: string;
10
+ readonly placeholder: string;
11
+ readonly isValid: boolean;
12
+ }
13
+ type Parse = (text: string, caret?: number) => {
14
+ readonly text: string;
15
+ readonly caret: number;
16
+ };
17
+ type GetTemplateInfo = (parsedValue: string) => {
18
+ readonly countryCode: CountryCode | null;
19
+ readonly CountryFlag: CountryFlag | null;
20
+ readonly callingCode: string | null;
21
+ readonly template: string;
22
+ readonly placeholder: string;
23
+ readonly regexp: RegExp;
24
+ };
25
+ type Validate = (inputValue: string, template: string) => boolean;
26
+ type Format = (text: string, caret: number, defaultCountry?: string | null) => Formatted;
27
+ type ParseAndValidate = (inputValue: string) => boolean;
28
+ type ParseAndFormat = (inputValue: string, caret?: number) => Formatted;
29
+ export declare const usePhoneUtils: (params: {
30
+ templates: readonly PhoneTemplate[];
31
+ }) => {
32
+ /**
33
+ * Validate parsed phone string by template\
34
+ * ```js
35
+ * // Example:
36
+ * validateParsedInput('79129876543', '7 (xxx) xxx-xx-xx'); // true
37
+ * validateParsedInput('79129876', '7 (xxx) xxx-xx-xx'); // false
38
+ * ```
39
+ */
40
+ validateParsedInput: Validate;
41
+ getTemplateInfo: GetTemplateInfo;
42
+ /**
43
+ * Parse plain phone string and validate result\
44
+ * ```js
45
+ * // Example:
46
+ * parseAndValidate('+7 912 659-99-88'); // true
47
+ * parseAndValidate('+7 912 659-99-'); // false
48
+ * ```
49
+ */
50
+ parseAndValidate: ParseAndValidate;
51
+ parseAndFormat: ParseAndFormat;
52
+ /**
53
+ * Format phone string by template\
54
+ * ```js
55
+ * // Example:
56
+ * format('')
57
+ * ```
58
+ */
59
+ formatParsedInput: Format;
60
+ /**
61
+ * Parse input phone string\
62
+ * ```js
63
+ * // Example:
64
+ * const { text, caret } = parseInput('+7 (912', 7); // { '7912', 4 }
65
+ * ```
66
+ */
67
+ parseInput: Parse;
68
+ };
69
+ export {};