@via-profit/ui-kit 0.1.0-rc.3 → 0.1.0-rc.30

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 (694) hide show
  1. package/Autocomplete/index.d.ts +1 -1
  2. package/Button/ButtonBase.d.ts +59 -1
  3. package/Button/ButtonBase.js +16 -18
  4. package/Button/ButtonContainer.d.ts +36 -0
  5. package/Button/ButtonContainer.js +56 -0
  6. package/Button/ButtonIconWrapper.d.ts +14 -0
  7. package/Button/ButtonIconWrapper.js +37 -0
  8. package/Button/ButtonOutlined.d.ts +5 -0
  9. package/Button/ButtonOutlined.js +87 -0
  10. package/Button/ButtonPlain.d.ts +5 -0
  11. package/Button/ButtonPlain.js +90 -0
  12. package/Button/ButtonStandard.d.ts +3 -17
  13. package/Button/ButtonStandard.js +87 -27
  14. package/Button/ButtonTextWrapper.d.ts +29 -0
  15. package/Button/ButtonTextWrapper.js +35 -0
  16. package/Button/index.d.ts +20 -6
  17. package/Button/index.js +7 -3
  18. package/Calendar/CalendarCell.d.ts +1 -1
  19. package/Calendar/CalendarCell.js +9 -11
  20. package/Calendar/CalendarEmptyCell.d.ts +1 -1
  21. package/Calendar/CalendarEmptyCell.js +1 -1
  22. package/Calendar/CalendarMonthControl.d.ts +1 -1
  23. package/Calendar/CalendarMonthControl.js +5 -5
  24. package/Calendar/CalendarPaper.js +3 -4
  25. package/Calendar/CalendarTopBar.d.ts +1 -1
  26. package/Calendar/CalendarTopBar.js +1 -1
  27. package/Calendar/CalendarWeekDayLabel.js +1 -1
  28. package/Calendar/CalendarWeekDaysBar.d.ts +1 -1
  29. package/Calendar/CalendarWeekDaysBar.js +1 -1
  30. package/Color/index.d.ts +113 -0
  31. package/{color/Color.js → Color/index.js} +107 -9
  32. package/CountryFlags/AC.js +53 -0
  33. package/CountryFlags/AD.js +39 -0
  34. package/CountryFlags/AE.js +32 -0
  35. package/CountryFlags/AF.js +33 -0
  36. package/CountryFlags/AG.js +35 -0
  37. package/CountryFlags/AI.js +37 -0
  38. package/CountryFlags/AL.js +35 -0
  39. package/CountryFlags/AM.d.ts +3 -0
  40. package/CountryFlags/AM.js +31 -0
  41. package/CountryFlags/AO.d.ts +3 -0
  42. package/CountryFlags/AO.js +35 -0
  43. package/CountryFlags/AQ.d.ts +3 -0
  44. package/CountryFlags/AQ.js +30 -0
  45. package/CountryFlags/AR.d.ts +3 -0
  46. package/CountryFlags/AR.js +31 -0
  47. package/CountryFlags/AS.d.ts +3 -0
  48. package/CountryFlags/AS.js +33 -0
  49. package/CountryFlags/AT.d.ts +3 -0
  50. package/CountryFlags/AT.js +30 -0
  51. package/CountryFlags/AU.d.ts +3 -0
  52. package/CountryFlags/AU.js +41 -0
  53. package/CountryFlags/AW.d.ts +3 -0
  54. package/CountryFlags/AW.js +33 -0
  55. package/CountryFlags/AX.d.ts +3 -0
  56. package/CountryFlags/AX.js +31 -0
  57. package/CountryFlags/AZ.d.ts +3 -0
  58. package/CountryFlags/AZ.js +34 -0
  59. package/CountryFlags/BA.d.ts +3 -0
  60. package/CountryFlags/BA.js +40 -0
  61. package/CountryFlags/BB.d.ts +3 -0
  62. package/CountryFlags/BB.js +32 -0
  63. package/CountryFlags/BD.d.ts +3 -0
  64. package/CountryFlags/BD.js +30 -0
  65. package/CountryFlags/BE.d.ts +3 -0
  66. package/CountryFlags/BE.js +31 -0
  67. package/CountryFlags/BF.d.ts +3 -0
  68. package/CountryFlags/BF.js +31 -0
  69. package/CountryFlags/BG.d.ts +3 -0
  70. package/CountryFlags/BG.js +31 -0
  71. package/CountryFlags/BH.d.ts +3 -0
  72. package/CountryFlags/BH.js +30 -0
  73. package/CountryFlags/BI.d.ts +3 -0
  74. package/CountryFlags/BI.js +36 -0
  75. package/CountryFlags/BJ.d.ts +3 -0
  76. package/CountryFlags/BJ.js +31 -0
  77. package/CountryFlags/BL.d.ts +3 -0
  78. package/CountryFlags/BL.js +39 -0
  79. package/CountryFlags/BM.d.ts +3 -0
  80. package/CountryFlags/BM.js +40 -0
  81. package/CountryFlags/BN.d.ts +3 -0
  82. package/CountryFlags/BN.js +34 -0
  83. package/CountryFlags/BO.d.ts +3 -0
  84. package/CountryFlags/BO.js +31 -0
  85. package/CountryFlags/BQ.d.ts +3 -0
  86. package/CountryFlags/BQ.js +33 -0
  87. package/CountryFlags/BR.d.ts +3 -0
  88. package/CountryFlags/BR.js +32 -0
  89. package/CountryFlags/BS.d.ts +3 -0
  90. package/CountryFlags/BS.js +32 -0
  91. package/CountryFlags/BT.d.ts +3 -0
  92. package/CountryFlags/BT.js +31 -0
  93. package/CountryFlags/BV.d.ts +3 -0
  94. package/CountryFlags/BV.js +33 -0
  95. package/CountryFlags/BW.d.ts +3 -0
  96. package/CountryFlags/BW.js +32 -0
  97. package/CountryFlags/BY.d.ts +3 -0
  98. package/CountryFlags/BY.js +35 -0
  99. package/CountryFlags/BZ.d.ts +3 -0
  100. package/CountryFlags/BZ.js +36 -0
  101. package/CountryFlags/CA.d.ts +3 -0
  102. package/CountryFlags/CA.js +31 -0
  103. package/CountryFlags/CC.d.ts +3 -0
  104. package/CountryFlags/CC.js +33 -0
  105. package/CountryFlags/CD.d.ts +3 -0
  106. package/CountryFlags/CD.js +32 -0
  107. package/CountryFlags/CF.d.ts +3 -0
  108. package/CountryFlags/CF.js +36 -0
  109. package/CountryFlags/CG.d.ts +3 -0
  110. package/CountryFlags/CG.js +31 -0
  111. package/CountryFlags/CH.d.ts +3 -0
  112. package/CountryFlags/CH.js +30 -0
  113. package/CountryFlags/CI.d.ts +3 -0
  114. package/CountryFlags/CI.js +31 -0
  115. package/CountryFlags/CK.d.ts +3 -0
  116. package/CountryFlags/CK.js +34 -0
  117. package/CountryFlags/CL.d.ts +3 -0
  118. package/CountryFlags/CL.js +32 -0
  119. package/CountryFlags/CM.d.ts +3 -0
  120. package/CountryFlags/CM.js +32 -0
  121. package/CountryFlags/CN.d.ts +3 -0
  122. package/CountryFlags/CN.js +31 -0
  123. package/CountryFlags/CO.d.ts +3 -0
  124. package/CountryFlags/CO.js +31 -0
  125. package/CountryFlags/CR.d.ts +3 -0
  126. package/CountryFlags/CR.js +31 -0
  127. package/CountryFlags/CU.d.ts +3 -0
  128. package/CountryFlags/CU.js +34 -0
  129. package/CountryFlags/CV.d.ts +3 -0
  130. package/CountryFlags/CV.js +33 -0
  131. package/CountryFlags/CW.d.ts +3 -0
  132. package/CountryFlags/CW.js +32 -0
  133. package/CountryFlags/CX.d.ts +3 -0
  134. package/CountryFlags/CX.js +35 -0
  135. package/CountryFlags/CY.d.ts +3 -0
  136. package/CountryFlags/CY.js +34 -0
  137. package/CountryFlags/CZ.d.ts +3 -0
  138. package/CountryFlags/CZ.js +31 -0
  139. package/CountryFlags/DE.d.ts +3 -0
  140. package/CountryFlags/DE.js +31 -0
  141. package/CountryFlags/DJ.d.ts +3 -0
  142. package/CountryFlags/DJ.js +32 -0
  143. package/CountryFlags/DK.d.ts +3 -0
  144. package/CountryFlags/DK.js +30 -0
  145. package/CountryFlags/DM.d.ts +3 -0
  146. package/CountryFlags/DM.js +39 -0
  147. package/CountryFlags/DO.d.ts +3 -0
  148. package/CountryFlags/DO.js +38 -0
  149. package/CountryFlags/DZ.d.ts +3 -0
  150. package/CountryFlags/DZ.js +33 -0
  151. package/CountryFlags/EC.d.ts +3 -0
  152. package/CountryFlags/EC.js +35 -0
  153. package/CountryFlags/EE.d.ts +3 -0
  154. package/CountryFlags/EE.js +31 -0
  155. package/CountryFlags/EG.d.ts +3 -0
  156. package/CountryFlags/EG.js +32 -0
  157. package/CountryFlags/EH.d.ts +3 -0
  158. package/CountryFlags/EH.js +34 -0
  159. package/CountryFlags/ER.d.ts +3 -0
  160. package/CountryFlags/ER.js +40 -0
  161. package/CountryFlags/ES.d.ts +3 -0
  162. package/CountryFlags/ES.js +34 -0
  163. package/CountryFlags/ET.d.ts +3 -0
  164. package/CountryFlags/ET.js +37 -0
  165. package/CountryFlags/EU.d.ts +3 -0
  166. package/CountryFlags/EU.js +30 -0
  167. package/CountryFlags/FI.d.ts +3 -0
  168. package/CountryFlags/FI.js +30 -0
  169. package/CountryFlags/FJ.d.ts +3 -0
  170. package/CountryFlags/FJ.js +36 -0
  171. package/CountryFlags/FK.d.ts +3 -0
  172. package/CountryFlags/FK.js +43 -0
  173. package/CountryFlags/FM.d.ts +3 -0
  174. package/CountryFlags/FM.js +31 -0
  175. package/CountryFlags/FO.d.ts +3 -0
  176. package/CountryFlags/FO.js +31 -0
  177. package/CountryFlags/FR.d.ts +3 -0
  178. package/CountryFlags/FR.js +31 -0
  179. package/CountryFlags/GA.d.ts +3 -0
  180. package/CountryFlags/GA.js +31 -0
  181. package/CountryFlags/GB.d.ts +3 -0
  182. package/CountryFlags/GB.js +36 -0
  183. package/CountryFlags/GD.d.ts +3 -0
  184. package/CountryFlags/GD.js +38 -0
  185. package/CountryFlags/GE.d.ts +3 -0
  186. package/CountryFlags/GE.js +31 -0
  187. package/CountryFlags/GEAB.d.ts +3 -0
  188. package/CountryFlags/GEAB.js +40 -0
  189. package/CountryFlags/GEOS.d.ts +3 -0
  190. package/CountryFlags/GEOS.js +31 -0
  191. package/CountryFlags/GF.d.ts +3 -0
  192. package/CountryFlags/GF.js +31 -0
  193. package/CountryFlags/GG.d.ts +3 -0
  194. package/CountryFlags/GG.js +31 -0
  195. package/CountryFlags/GH.d.ts +3 -0
  196. package/CountryFlags/GH.js +32 -0
  197. package/CountryFlags/GI.d.ts +3 -0
  198. package/CountryFlags/GI.js +34 -0
  199. package/CountryFlags/GL.d.ts +3 -0
  200. package/CountryFlags/GL.js +32 -0
  201. package/CountryFlags/GM.d.ts +3 -0
  202. package/CountryFlags/GM.js +32 -0
  203. package/CountryFlags/GN.d.ts +3 -0
  204. package/CountryFlags/GN.js +31 -0
  205. package/CountryFlags/GP.d.ts +3 -0
  206. package/{PhoneField/flags/JPFlag.js → CountryFlags/GP.js} +5 -8
  207. package/CountryFlags/GQ.d.ts +3 -0
  208. package/CountryFlags/GQ.js +37 -0
  209. package/CountryFlags/GR.d.ts +3 -0
  210. package/CountryFlags/GR.js +35 -0
  211. package/CountryFlags/GS.d.ts +3 -0
  212. package/CountryFlags/GS.js +49 -0
  213. package/CountryFlags/GT.d.ts +3 -0
  214. package/CountryFlags/GT.js +33 -0
  215. package/CountryFlags/GU.d.ts +3 -0
  216. package/CountryFlags/GU.js +37 -0
  217. package/CountryFlags/GW.d.ts +3 -0
  218. package/CountryFlags/GW.js +32 -0
  219. package/CountryFlags/GY.d.ts +3 -0
  220. package/CountryFlags/GY.js +33 -0
  221. package/CountryFlags/HK.d.ts +3 -0
  222. package/CountryFlags/HK.js +32 -0
  223. package/CountryFlags/HM.d.ts +3 -0
  224. package/CountryFlags/HM.js +41 -0
  225. package/CountryFlags/HN.d.ts +3 -0
  226. package/CountryFlags/HN.js +31 -0
  227. package/CountryFlags/HR.d.ts +3 -0
  228. package/CountryFlags/HR.js +38 -0
  229. package/CountryFlags/HT.d.ts +3 -0
  230. package/CountryFlags/HT.js +36 -0
  231. package/CountryFlags/HU.d.ts +3 -0
  232. package/CountryFlags/HU.js +31 -0
  233. package/CountryFlags/IC.d.ts +3 -0
  234. package/CountryFlags/IC.js +31 -0
  235. package/CountryFlags/ID.d.ts +3 -0
  236. package/CountryFlags/ID.js +30 -0
  237. package/CountryFlags/IE.d.ts +3 -0
  238. package/CountryFlags/IE.js +31 -0
  239. package/CountryFlags/IL.d.ts +3 -0
  240. package/CountryFlags/IL.js +31 -0
  241. package/CountryFlags/IM.d.ts +3 -0
  242. package/CountryFlags/IM.js +31 -0
  243. package/CountryFlags/IN.d.ts +3 -0
  244. package/CountryFlags/IN.js +35 -0
  245. package/CountryFlags/IO.d.ts +3 -0
  246. package/CountryFlags/IO.js +41 -0
  247. package/CountryFlags/IQ.d.ts +3 -0
  248. package/CountryFlags/IQ.js +33 -0
  249. package/CountryFlags/IR.d.ts +3 -0
  250. package/CountryFlags/IR.js +34 -0
  251. package/CountryFlags/IS.d.ts +3 -0
  252. package/CountryFlags/IS.js +31 -0
  253. package/CountryFlags/IT.d.ts +3 -0
  254. package/CountryFlags/IT.js +31 -0
  255. package/CountryFlags/JE.d.ts +3 -0
  256. package/CountryFlags/JE.js +32 -0
  257. package/CountryFlags/JM.d.ts +3 -0
  258. package/CountryFlags/JM.js +32 -0
  259. package/CountryFlags/JO.d.ts +3 -0
  260. package/CountryFlags/JO.js +33 -0
  261. package/CountryFlags/JP.d.ts +3 -0
  262. package/CountryFlags/JP.js +30 -0
  263. package/CountryFlags/KE.d.ts +3 -0
  264. package/CountryFlags/KE.js +38 -0
  265. package/CountryFlags/KG.d.ts +3 -0
  266. package/CountryFlags/KG.js +35 -0
  267. package/CountryFlags/KH.d.ts +3 -0
  268. package/CountryFlags/KH.js +32 -0
  269. package/CountryFlags/KI.d.ts +3 -0
  270. package/CountryFlags/KI.js +35 -0
  271. package/CountryFlags/KM.d.ts +3 -0
  272. package/CountryFlags/KM.js +37 -0
  273. package/CountryFlags/KN.d.ts +3 -0
  274. package/CountryFlags/KN.js +34 -0
  275. package/CountryFlags/KP.d.ts +3 -0
  276. package/CountryFlags/KP.js +35 -0
  277. package/CountryFlags/KR.d.ts +3 -0
  278. package/CountryFlags/KR.js +38 -0
  279. package/CountryFlags/KW.d.ts +3 -0
  280. package/CountryFlags/KW.js +32 -0
  281. package/CountryFlags/KY.d.ts +3 -0
  282. package/CountryFlags/KY.js +41 -0
  283. package/CountryFlags/KZ.d.ts +3 -0
  284. package/CountryFlags/KZ.js +31 -0
  285. package/CountryFlags/LA.d.ts +3 -0
  286. package/CountryFlags/LA.js +32 -0
  287. package/CountryFlags/LB.d.ts +3 -0
  288. package/CountryFlags/LB.js +33 -0
  289. package/CountryFlags/LC.d.ts +3 -0
  290. package/CountryFlags/LC.js +32 -0
  291. package/CountryFlags/LI.d.ts +3 -0
  292. package/CountryFlags/LI.js +31 -0
  293. package/CountryFlags/LK.d.ts +3 -0
  294. package/CountryFlags/LK.js +36 -0
  295. package/CountryFlags/LR.d.ts +3 -0
  296. package/CountryFlags/LR.js +33 -0
  297. package/CountryFlags/LS.d.ts +3 -0
  298. package/CountryFlags/LS.js +33 -0
  299. package/CountryFlags/LT.d.ts +3 -0
  300. package/CountryFlags/LT.js +31 -0
  301. package/CountryFlags/LU.d.ts +3 -0
  302. package/CountryFlags/LU.js +31 -0
  303. package/CountryFlags/LV.d.ts +3 -0
  304. package/CountryFlags/LV.js +31 -0
  305. package/CountryFlags/LY.d.ts +3 -0
  306. package/CountryFlags/LY.js +34 -0
  307. package/CountryFlags/MA.d.ts +3 -0
  308. package/CountryFlags/MA.js +30 -0
  309. package/CountryFlags/MC.d.ts +3 -0
  310. package/CountryFlags/MC.js +30 -0
  311. package/CountryFlags/MD.d.ts +3 -0
  312. package/CountryFlags/MD.js +32 -0
  313. package/CountryFlags/ME.d.ts +3 -0
  314. package/CountryFlags/ME.js +32 -0
  315. package/CountryFlags/MF.d.ts +3 -0
  316. package/CountryFlags/MF.js +33 -0
  317. package/CountryFlags/MG.d.ts +3 -0
  318. package/CountryFlags/MG.js +31 -0
  319. package/CountryFlags/MH.d.ts +3 -0
  320. package/CountryFlags/MH.js +32 -0
  321. package/CountryFlags/MK.d.ts +3 -0
  322. package/CountryFlags/MK.js +33 -0
  323. package/CountryFlags/ML.d.ts +3 -0
  324. package/CountryFlags/ML.js +31 -0
  325. package/CountryFlags/MM.d.ts +3 -0
  326. package/CountryFlags/MM.js +32 -0
  327. package/CountryFlags/MN.d.ts +3 -0
  328. package/CountryFlags/MN.js +37 -0
  329. package/CountryFlags/MO.d.ts +3 -0
  330. package/CountryFlags/MO.js +34 -0
  331. package/CountryFlags/MP.d.ts +3 -0
  332. package/CountryFlags/MP.js +35 -0
  333. package/CountryFlags/MQ.d.ts +3 -0
  334. package/CountryFlags/MQ.js +32 -0
  335. package/CountryFlags/MR.d.ts +3 -0
  336. package/CountryFlags/MR.js +32 -0
  337. package/CountryFlags/MS.d.ts +3 -0
  338. package/CountryFlags/MS.js +40 -0
  339. package/CountryFlags/MT.d.ts +3 -0
  340. package/CountryFlags/MT.js +31 -0
  341. package/CountryFlags/MU.d.ts +3 -0
  342. package/CountryFlags/MU.js +32 -0
  343. package/CountryFlags/MV.d.ts +3 -0
  344. package/CountryFlags/MV.js +31 -0
  345. package/CountryFlags/MW.d.ts +3 -0
  346. package/CountryFlags/MW.js +32 -0
  347. package/CountryFlags/MX.d.ts +3 -0
  348. package/CountryFlags/MX.js +33 -0
  349. package/CountryFlags/MY.d.ts +3 -0
  350. package/CountryFlags/MY.js +33 -0
  351. package/CountryFlags/MZ.d.ts +3 -0
  352. package/CountryFlags/MZ.js +34 -0
  353. package/CountryFlags/NA.d.ts +3 -0
  354. package/CountryFlags/NA.js +33 -0
  355. package/CountryFlags/NC.d.ts +3 -0
  356. package/CountryFlags/NC.js +38 -0
  357. package/CountryFlags/NE.d.ts +3 -0
  358. package/CountryFlags/NE.js +32 -0
  359. package/CountryFlags/NF.d.ts +3 -0
  360. package/CountryFlags/NF.js +31 -0
  361. package/CountryFlags/NG.d.ts +3 -0
  362. package/CountryFlags/NG.js +31 -0
  363. package/CountryFlags/NI.d.ts +3 -0
  364. package/CountryFlags/NI.js +35 -0
  365. package/CountryFlags/NL.d.ts +3 -0
  366. package/CountryFlags/NL.js +31 -0
  367. package/CountryFlags/NO.d.ts +3 -0
  368. package/CountryFlags/NO.js +31 -0
  369. package/CountryFlags/NP.d.ts +3 -0
  370. package/CountryFlags/NP.js +34 -0
  371. package/CountryFlags/NR.d.ts +3 -0
  372. package/CountryFlags/NR.js +31 -0
  373. package/CountryFlags/NU.d.ts +3 -0
  374. package/CountryFlags/NU.js +53 -0
  375. package/CountryFlags/NZ.d.ts +3 -0
  376. package/CountryFlags/NZ.js +41 -0
  377. package/CountryFlags/OM.d.ts +3 -0
  378. package/CountryFlags/OM.js +34 -0
  379. package/CountryFlags/PA.d.ts +3 -0
  380. package/CountryFlags/PA.js +33 -0
  381. package/CountryFlags/PE.d.ts +3 -0
  382. package/CountryFlags/PE.js +31 -0
  383. package/CountryFlags/PF.d.ts +3 -0
  384. package/CountryFlags/PF.js +35 -0
  385. package/CountryFlags/PG.d.ts +3 -0
  386. package/CountryFlags/PG.js +33 -0
  387. package/CountryFlags/PH.d.ts +3 -0
  388. package/CountryFlags/PH.js +33 -0
  389. package/CountryFlags/PK.d.ts +3 -0
  390. package/CountryFlags/PK.js +34 -0
  391. package/CountryFlags/PL.d.ts +3 -0
  392. package/CountryFlags/PL.js +32 -0
  393. package/CountryFlags/PM.d.ts +3 -0
  394. package/{PhoneField/flags/RUFlag.js → CountryFlags/PM.js} +5 -5
  395. package/CountryFlags/PN.d.ts +3 -0
  396. package/CountryFlags/PN.js +43 -0
  397. package/CountryFlags/PR.d.ts +3 -0
  398. package/CountryFlags/PR.js +33 -0
  399. package/CountryFlags/PS.d.ts +3 -0
  400. package/CountryFlags/PS.js +32 -0
  401. package/CountryFlags/PT.d.ts +3 -0
  402. package/CountryFlags/PT.js +33 -0
  403. package/CountryFlags/PW.d.ts +3 -0
  404. package/CountryFlags/PW.js +30 -0
  405. package/CountryFlags/PY.d.ts +3 -0
  406. package/CountryFlags/PY.js +33 -0
  407. package/CountryFlags/QA.d.ts +3 -0
  408. package/CountryFlags/QA.js +30 -0
  409. package/CountryFlags/RE.d.ts +3 -0
  410. package/{PhoneField/flags/UAFlag.js → CountryFlags/RE.js} +5 -4
  411. package/CountryFlags/RO.d.ts +3 -0
  412. package/CountryFlags/RO.js +31 -0
  413. package/CountryFlags/RS.d.ts +3 -0
  414. package/CountryFlags/RS.js +35 -0
  415. package/CountryFlags/RU.d.ts +3 -0
  416. package/CountryFlags/RU.js +32 -0
  417. package/CountryFlags/RW.d.ts +3 -0
  418. package/CountryFlags/RW.js +32 -0
  419. package/CountryFlags/SA.d.ts +3 -0
  420. package/CountryFlags/SA.js +33 -0
  421. package/CountryFlags/SB.d.ts +3 -0
  422. package/CountryFlags/SB.js +33 -0
  423. package/CountryFlags/SC.d.ts +3 -0
  424. package/CountryFlags/SC.js +33 -0
  425. package/CountryFlags/SD.d.ts +3 -0
  426. package/CountryFlags/SD.js +32 -0
  427. package/CountryFlags/SE.d.ts +3 -0
  428. package/CountryFlags/SE.js +30 -0
  429. package/CountryFlags/SG.d.ts +3 -0
  430. package/CountryFlags/SG.js +33 -0
  431. package/CountryFlags/SH.d.ts +3 -0
  432. package/CountryFlags/SH.js +43 -0
  433. package/CountryFlags/SI.d.ts +3 -0
  434. package/CountryFlags/SI.js +34 -0
  435. package/CountryFlags/SJ.d.ts +3 -0
  436. package/CountryFlags/SJ.js +31 -0
  437. package/CountryFlags/SK.d.ts +3 -0
  438. package/CountryFlags/SK.js +35 -0
  439. package/CountryFlags/SL.d.ts +3 -0
  440. package/CountryFlags/SL.js +31 -0
  441. package/CountryFlags/SM.d.ts +3 -0
  442. package/CountryFlags/SM.js +35 -0
  443. package/CountryFlags/SN.d.ts +3 -0
  444. package/CountryFlags/SN.js +32 -0
  445. package/CountryFlags/SO.d.ts +3 -0
  446. package/CountryFlags/SO.js +30 -0
  447. package/CountryFlags/SR.d.ts +3 -0
  448. package/CountryFlags/SR.js +33 -0
  449. package/CountryFlags/SS.d.ts +3 -0
  450. package/CountryFlags/SS.js +34 -0
  451. package/CountryFlags/ST.d.ts +3 -0
  452. package/CountryFlags/ST.js +33 -0
  453. package/CountryFlags/SV.d.ts +3 -0
  454. package/CountryFlags/SV.js +34 -0
  455. package/CountryFlags/SX.d.ts +3 -0
  456. package/CountryFlags/SX.js +37 -0
  457. package/CountryFlags/SY.d.ts +3 -0
  458. package/CountryFlags/SY.js +33 -0
  459. package/CountryFlags/SZ.d.ts +3 -0
  460. package/CountryFlags/SZ.js +35 -0
  461. package/CountryFlags/TA.d.ts +3 -0
  462. package/CountryFlags/TA.js +47 -0
  463. package/CountryFlags/TC.d.ts +3 -0
  464. package/CountryFlags/TC.js +44 -0
  465. package/CountryFlags/TD.d.ts +3 -0
  466. package/CountryFlags/TD.js +31 -0
  467. package/CountryFlags/TF.d.ts +3 -0
  468. package/CountryFlags/TF.js +34 -0
  469. package/CountryFlags/TG.d.ts +3 -0
  470. package/CountryFlags/TG.js +33 -0
  471. package/CountryFlags/TH.d.ts +3 -0
  472. package/CountryFlags/TH.js +32 -0
  473. package/CountryFlags/TJ.d.ts +3 -0
  474. package/CountryFlags/TJ.js +33 -0
  475. package/CountryFlags/TK.d.ts +3 -0
  476. package/CountryFlags/TK.js +33 -0
  477. package/CountryFlags/TL.d.ts +3 -0
  478. package/CountryFlags/TL.js +32 -0
  479. package/CountryFlags/TM.d.ts +3 -0
  480. package/CountryFlags/TM.js +45 -0
  481. package/CountryFlags/TN.d.ts +3 -0
  482. package/CountryFlags/TN.js +33 -0
  483. package/CountryFlags/TO.d.ts +3 -0
  484. package/CountryFlags/TO.js +31 -0
  485. package/CountryFlags/TR.d.ts +3 -0
  486. package/CountryFlags/TR.js +30 -0
  487. package/CountryFlags/TT.d.ts +3 -0
  488. package/CountryFlags/TT.js +31 -0
  489. package/CountryFlags/TV.d.ts +3 -0
  490. package/CountryFlags/TV.js +36 -0
  491. package/CountryFlags/TW.d.ts +3 -0
  492. package/CountryFlags/TW.js +33 -0
  493. package/CountryFlags/TZ.d.ts +3 -0
  494. package/CountryFlags/TZ.js +32 -0
  495. package/CountryFlags/UA.d.ts +3 -0
  496. package/CountryFlags/UA.js +30 -0
  497. package/CountryFlags/UG.d.ts +3 -0
  498. package/CountryFlags/UG.js +35 -0
  499. package/CountryFlags/UM.d.ts +3 -0
  500. package/CountryFlags/UM.js +34 -0
  501. package/CountryFlags/US.d.ts +3 -0
  502. package/CountryFlags/US.js +34 -0
  503. package/CountryFlags/UY.d.ts +3 -0
  504. package/CountryFlags/UY.js +33 -0
  505. package/CountryFlags/UZ.d.ts +3 -0
  506. package/CountryFlags/UZ.js +35 -0
  507. package/CountryFlags/VA.d.ts +3 -0
  508. package/CountryFlags/VA.js +32 -0
  509. package/CountryFlags/VC.d.ts +3 -0
  510. package/CountryFlags/VC.js +32 -0
  511. package/CountryFlags/VE.d.ts +3 -0
  512. package/CountryFlags/VE.js +32 -0
  513. package/CountryFlags/VG.d.ts +3 -0
  514. package/CountryFlags/VG.js +45 -0
  515. package/CountryFlags/VI.d.ts +3 -0
  516. package/CountryFlags/VI.js +41 -0
  517. package/CountryFlags/VN.d.ts +3 -0
  518. package/CountryFlags/VN.js +30 -0
  519. package/CountryFlags/VU.d.ts +3 -0
  520. package/CountryFlags/VU.js +35 -0
  521. package/CountryFlags/WF.d.ts +3 -0
  522. package/CountryFlags/WF.js +33 -0
  523. package/CountryFlags/WS.d.ts +3 -0
  524. package/CountryFlags/WS.js +32 -0
  525. package/CountryFlags/XK.d.ts +3 -0
  526. package/CountryFlags/XK.js +32 -0
  527. package/CountryFlags/YE.d.ts +3 -0
  528. package/CountryFlags/YE.js +31 -0
  529. package/CountryFlags/YT.d.ts +3 -0
  530. package/CountryFlags/YT.js +35 -0
  531. package/CountryFlags/ZA.d.ts +3 -0
  532. package/CountryFlags/ZA.js +34 -0
  533. package/CountryFlags/ZM.d.ts +3 -0
  534. package/CountryFlags/ZM.js +33 -0
  535. package/CountryFlags/ZW.d.ts +3 -0
  536. package/CountryFlags/ZW.js +39 -0
  537. package/Menu/MenuItemInner.js +5 -5
  538. package/Menu/MenuWrapper.js +10 -9
  539. package/Modal/BaseModal/ModalInner.d.ts +13 -0
  540. package/Modal/BaseModal/ModalInner.js +47 -0
  541. package/Modal/BaseModal/ModalOverlay.d.ts +17 -0
  542. package/Modal/BaseModal/ModalOverlay.js +33 -0
  543. package/Modal/BaseModal/ModalWrapper.d.ts +14 -0
  544. package/Modal/BaseModal/ModalWrapper.js +177 -0
  545. package/Modal/BaseModal/RenderModal.d.ts +12 -0
  546. package/Modal/BaseModal/RenderModal.js +20 -0
  547. package/Modal/BaseModal/context.d.ts +30 -0
  548. package/Modal/BaseModal/context.js +44 -0
  549. package/Modal/BaseModal/index.d.ts +46 -0
  550. package/Modal/BaseModal/index.js +66 -0
  551. package/Modal/ConfirmBox/ConfirmBoxContainer.d.ts +14 -0
  552. package/Modal/ConfirmBox/ConfirmBoxContainer.js +28 -0
  553. package/Modal/ConfirmBox/ConfirmBoxContent.d.ts +14 -0
  554. package/Modal/ConfirmBox/ConfirmBoxContent.js +27 -0
  555. package/Modal/ConfirmBox/ConfirmBoxFooter.d.ts +50 -0
  556. package/Modal/ConfirmBox/ConfirmBoxFooter.js +46 -0
  557. package/Modal/ConfirmBox/ConfirmBoxHeader.d.ts +14 -0
  558. package/Modal/ConfirmBox/ConfirmBoxHeader.js +31 -0
  559. package/Modal/ConfirmBox/index.d.ts +55 -0
  560. package/Modal/ConfirmBox/index.js +52 -0
  561. package/Modal/Dialog/DialogInner.d.ts +10 -0
  562. package/Modal/Dialog/DialogInner.js +49 -0
  563. package/Modal/Dialog/index.d.ts +8 -0
  564. package/Modal/Dialog/index.js +54 -0
  565. package/Modal/{CloseIcon.js → Drawer/DrawerCloseIcon.js} +2 -2
  566. package/Modal/Drawer/DrawerContainer.d.ts +4 -0
  567. package/Modal/Drawer/DrawerContainer.js +31 -0
  568. package/Modal/Drawer/DrawerContent.d.ts +4 -0
  569. package/Modal/Drawer/DrawerContent.js +31 -0
  570. package/Modal/Drawer/DrawerFooter.d.ts +4 -0
  571. package/Modal/Drawer/DrawerFooter.js +26 -0
  572. package/Modal/Drawer/DrawerHeader.d.ts +30 -0
  573. package/Modal/Drawer/DrawerHeader.js +61 -0
  574. package/Modal/Drawer/DrawerInner.d.ts +18 -0
  575. package/Modal/Drawer/DrawerInner.js +141 -0
  576. package/Modal/Drawer/index.d.ts +61 -0
  577. package/Modal/Drawer/index.js +70 -0
  578. package/Modal/MessageBox/MessageBoxContainer.d.ts +14 -0
  579. package/Modal/MessageBox/MessageBoxContainer.js +28 -0
  580. package/Modal/MessageBox/MessageBoxContent.d.ts +14 -0
  581. package/Modal/MessageBox/MessageBoxContent.js +27 -0
  582. package/Modal/MessageBox/MessageBoxFooter.d.ts +32 -0
  583. package/Modal/MessageBox/MessageBoxFooter.js +45 -0
  584. package/Modal/MessageBox/MessageBoxHeader.d.ts +14 -0
  585. package/Modal/MessageBox/MessageBoxHeader.js +31 -0
  586. package/Modal/MessageBox/index.d.ts +46 -0
  587. package/Modal/MessageBox/index.js +68 -0
  588. package/Modal/index.d.ts +11 -8
  589. package/Modal/index.js +17 -10
  590. package/PhoneField/CountryFlagComponent.d.ts +6 -0
  591. package/PhoneField/CountryFlagComponent.js +44 -0
  592. package/PhoneField/UnknownFlag.d.ts +3 -0
  593. package/PhoneField/{flags/UnknownFlag.js → UnknownFlag.js} +3 -3
  594. package/PhoneField/index.d.ts +8 -3
  595. package/PhoneField/index.js +29 -14
  596. package/PhoneField/templates.d.ts +81 -2
  597. package/PhoneField/templates.js +40 -13
  598. package/PhoneField/usePhoneUtils.d.ts +6 -2
  599. package/PhoneField/usePhoneUtils.js +23 -8
  600. package/README.md +12 -11
  601. package/SelectBox/SelectButton.js +4 -6
  602. package/SelectBox/index.d.ts +1 -1
  603. package/Surface/SurfaceContainer.d.ts +8 -0
  604. package/Surface/SurfaceContainer.js +33 -0
  605. package/Surface/SurfaceContent.d.ts +8 -0
  606. package/Surface/SurfaceContent.js +31 -0
  607. package/Surface/SurfaceHeader.d.ts +4 -0
  608. package/Surface/SurfaceHeader.js +30 -0
  609. package/Surface/SurfaceSubheader.d.ts +4 -0
  610. package/Surface/SurfaceSubheader.js +29 -0
  611. package/Surface/index.d.ts +62 -0
  612. package/Surface/index.js +61 -0
  613. package/Table/Table.d.ts +8 -0
  614. package/Table/Table.js +46 -0
  615. package/Table/TableBody.d.ts +4 -0
  616. package/Table/TableBody.js +30 -0
  617. package/Table/TableCaption.d.ts +4 -0
  618. package/Table/TableCaption.js +30 -0
  619. package/Table/TableCell.d.ts +4 -0
  620. package/Table/TableCell.js +31 -0
  621. package/Table/TableFooter.d.ts +4 -0
  622. package/Table/TableFooter.js +36 -0
  623. package/Table/TableHeader.d.ts +4 -0
  624. package/Table/TableHeader.js +30 -0
  625. package/Table/TableHeaderCell.d.ts +4 -0
  626. package/Table/TableHeaderCell.js +35 -0
  627. package/Table/TableRow.d.ts +4 -0
  628. package/Table/TableRow.js +30 -0
  629. package/Table/index.d.ts +18 -0
  630. package/Table/index.js +45 -0
  631. package/TextField/TextFieldContainer.d.ts +2 -1
  632. package/TextField/TextFieldContainer.js +2 -2
  633. package/TextField/TextFieldErrorText.d.ts +0 -1
  634. package/TextField/TextFieldErrorText.js +3 -3
  635. package/TextField/TextFieldIconWrapper.d.ts +10 -0
  636. package/TextField/TextFieldIconWrapper.js +2 -2
  637. package/TextField/TextFieldInput.js +20 -9
  638. package/TextField/{TextFieldWrapper.d.ts → TextFieldInputWrapper.d.ts} +1 -1
  639. package/TextField/{TextFieldWrapper.js → TextFieldInputWrapper.js} +13 -13
  640. package/TextField/TextFieldLabel.js +2 -2
  641. package/TextField/TextFieldLabelAsterisk.d.ts +7 -1
  642. package/TextField/TextFieldLabelAsterisk.js +3 -3
  643. package/TextField/index.d.ts +67 -1
  644. package/TextField/index.js +17 -10
  645. package/ThemeProvider/createTheme.d.ts +2 -35
  646. package/ThemeProvider/createTheme.js +28 -16
  647. package/ThemeProvider/index.d.ts +51 -2
  648. package/ThemeProvider/index.js +17 -0
  649. package/Typography/Base.js +1 -0
  650. package/Typography/Blockquote.js +2 -2
  651. package/Typography/Del.js +1 -0
  652. package/Typography/Em.js +1 -0
  653. package/Typography/H1.js +1 -0
  654. package/Typography/H2.js +1 -0
  655. package/Typography/H3.js +1 -0
  656. package/Typography/H4.js +1 -0
  657. package/Typography/H5.js +1 -0
  658. package/Typography/List.d.ts +1 -1
  659. package/Typography/List.js +16 -1
  660. package/Typography/Paragraph.d.ts +14 -6
  661. package/Typography/Paragraph.js +43 -2
  662. package/Typography/SectionDescription.d.ts +3 -4
  663. package/Typography/Span.js +1 -0
  664. package/Typography/Strong.js +1 -0
  665. package/Typography/index.d.ts +3 -0
  666. package/{color → Typography}/index.js +3 -3
  667. package/index.d.ts +1 -4
  668. package/index.js +1 -7
  669. package/package.json +42 -50
  670. package/Button/ButtonAccent.d.ts +0 -10
  671. package/Button/ButtonAccent.js +0 -48
  672. package/Modal/ModalConfirmBox.d.ts +0 -9
  673. package/Modal/ModalConfirmBox.js +0 -148
  674. package/Modal/ModalDialog.d.ts +0 -7
  675. package/Modal/ModalDialog.js +0 -99
  676. package/Modal/ModalDrawer.d.ts +0 -11
  677. package/Modal/ModalDrawer.js +0 -150
  678. package/Modal/ModalMessageBox.d.ts +0 -8
  679. package/Modal/ModalMessageBox.js +0 -147
  680. package/PhoneField/CountryFlag.d.ts +0 -6
  681. package/PhoneField/CountryFlag.js +0 -52
  682. package/PhoneField/flags/BYFlag.js +0 -44
  683. package/PhoneField/flags/KZFlag.js +0 -45
  684. package/PhoneField/flags/USFlag.js +0 -34
  685. package/color/Color.d.ts +0 -44
  686. package/color/index.d.ts +0 -3
  687. /package/{PhoneField/flags/BYFlag.d.ts → CountryFlags/AC.d.ts} +0 -0
  688. /package/{PhoneField/flags/JPFlag.d.ts → CountryFlags/AD.d.ts} +0 -0
  689. /package/{PhoneField/flags/KZFlag.d.ts → CountryFlags/AE.d.ts} +0 -0
  690. /package/{PhoneField/flags/RUFlag.d.ts → CountryFlags/AF.d.ts} +0 -0
  691. /package/{PhoneField/flags/UAFlag.d.ts → CountryFlags/AG.d.ts} +0 -0
  692. /package/{PhoneField/flags/USFlag.d.ts → CountryFlags/AI.d.ts} +0 -0
  693. /package/{PhoneField/flags/UnknownFlag.d.ts → CountryFlags/AL.d.ts} +0 -0
  694. /package/Modal/{CloseIcon.d.ts → Drawer/DrawerCloseIcon.d.ts} +0 -0
@@ -30,7 +30,7 @@ export type AutocompleteRef<T> = Pick<MenuRef<T>, 'scrollToItem' | 'scrollTo' |
30
30
  readonly blur: () => void;
31
31
  readonly clearInput: () => void;
32
32
  };
33
- declare const _default: <T, Multiple extends boolean | undefined = undefined>(props: Pick<MenuProps<T, Multiple>, "zIndex" | "value" | "isOpen" | "estimatedItemSize" | "overscanCount" | "items" | "endThreshold" | "multiple" | "getOptionSelected" | "onEndReached" | "onSelectItem" | "renderItem" | "onRequestClose"> & {
33
+ declare const _default: <T, Multiple extends boolean | undefined = undefined>(props: Pick<MenuProps<T, Multiple>, "zIndex" | "isOpen" | "estimatedItemSize" | "overscanCount" | "items" | "value" | "endThreshold" | "multiple" | "getOptionSelected" | "onEndReached" | "onSelectItem" | "renderItem" | "onRequestClose"> & {
34
34
  readonly containerRef?: React.Ref<HTMLDivElement> | undefined;
35
35
  readonly itemToString: ItemToString<T, Multiple>;
36
36
  readonly renderInput: (params: RenderInputProps<T, Multiple>) => React.ReactNode;
@@ -1,4 +1,62 @@
1
1
  import React from 'react';
2
- export type ButtonBaseProps = React.ButtonHTMLAttributes<HTMLButtonElement>;
2
+ import { ButtonIconWrapperProps } from './ButtonIconWrapper';
3
+ import { ButtonTextWrapperProps } from './ButtonTextWrapper';
4
+ import { ButtonContainerProps } from './ButtonContainer';
5
+ type ButtonNativeProps = React.ButtonHTMLAttributes<HTMLButtonElement>;
6
+ export interface ButtonBaseProps extends Omit<ButtonNativeProps, 'color'> {
7
+ /**
8
+ * Icon or another JSX element placed before button label\
9
+ * Example:
10
+ * ```tsx
11
+ * <Button startIcon={<MyIconElement />}>
12
+ * Label
13
+ * </Button>
14
+ * ```
15
+ */
16
+ readonly startIcon?: JSX.Element;
17
+ /**
18
+ * Icon or another JSX element placed after button label
19
+ * Example:
20
+ * ```tsx
21
+ * <Button endIcon={<MyIconElement />}>
22
+ * Label
23
+ * </Button>
24
+ * ```
25
+ */
26
+ readonly endIcon?: JSX.Element;
27
+ /**
28
+ * If true, then expect SVG icon as children. The button will be rendered as icon button
29
+ * Example:
30
+ * ```tsx
31
+ * <Button iconOnly>
32
+ * <MyIconSVG />
33
+ * </Button>
34
+ * ```
35
+ `
36
+ */
37
+ readonly iconOnly?: ButtonContainerProps['iconOnly'];
38
+ /**
39
+ * You can pass the primary, default, secondary name of the colors or your specified color value
40
+ */
41
+ readonly color?: ButtonContainerProps['color'];
42
+ /**
43
+ * Overridable components map
44
+ */
45
+ readonly overrides?: ButtonBaseOverrides;
46
+ }
47
+ export interface ButtonBaseOverrides {
48
+ /**
49
+ * Element container
50
+ */
51
+ readonly Container?: React.ForwardRefExoticComponent<ButtonContainerProps & React.RefAttributes<HTMLButtonElement>>;
52
+ /**
53
+ * icon wrapper
54
+ */
55
+ readonly IconWrapper?: React.ForwardRefExoticComponent<ButtonIconWrapperProps & React.RefAttributes<HTMLSpanElement>>;
56
+ /**
57
+ * text wrapper
58
+ */
59
+ readonly TextWrapper?: React.ForwardRefExoticComponent<ButtonTextWrapperProps & React.RefAttributes<HTMLSpanElement>>;
60
+ }
3
61
  declare const _default: React.ForwardRefExoticComponent<ButtonBaseProps & React.RefAttributes<HTMLButtonElement>>;
4
62
  export default _default;
@@ -15,24 +15,22 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  const react_1 = __importDefault(require("react"));
18
- const styled_1 = __importDefault(require("@emotion/styled"));
19
- const Button = styled_1.default.button `
20
- border-radius: ${({ theme }) => theme.shape.radiusFactor * 2}em;
21
- padding: 0.8em 1em;
22
- cursor: pointer;
23
- font-size: 1em;
24
- border: 0;
25
- outline: transparent;
26
- transition: all 180ms ease-out 0s;
27
- background: none;
28
- color: currentColor;
29
- `;
30
- const ButtonText = styled_1.default.span `
31
- font-size: 0.86em;
32
- `;
18
+ const ButtonIconWrapper_1 = __importDefault(require("./ButtonIconWrapper"));
19
+ const ButtonTextWrapper_1 = __importDefault(require("./ButtonTextWrapper"));
20
+ const ButtonContainer_1 = __importDefault(require("./ButtonContainer"));
33
21
  const ButtonBase = (props, ref) => {
34
- const { children } = props, otherProps = __rest(props, ["children"]);
35
- return (react_1.default.createElement(Button, Object.assign({}, otherProps, { ref: ref }),
36
- react_1.default.createElement(ButtonText, null, children)));
22
+ const { children, startIcon, endIcon, color, overrides, iconOnly } = props, nativeProps = __rest(props, ["children", "startIcon", "endIcon", "color", "overrides", "iconOnly"]);
23
+ const overridesMap = react_1.default.useMemo(() => (Object.assign({ TextWrapper: ButtonTextWrapper_1.default,
24
+ IconWrapper: ButtonIconWrapper_1.default,
25
+ Container: ButtonContainer_1.default }, overrides)), [overrides]);
26
+ if (iconOnly &&
27
+ ((typeof startIcon !== 'undefined' && startIcon !== null) ||
28
+ (typeof endIcon !== 'undefined' && endIcon !== null))) {
29
+ console.warn('The «iconOnly» property should not be used simultaneously with «startIcon» and/or «endIcon»');
30
+ }
31
+ return (react_1.default.createElement(overridesMap.Container, Object.assign({}, nativeProps, { color: color, iconOnly: iconOnly, ref: ref }),
32
+ typeof startIcon !== 'undefined' && startIcon !== null && (react_1.default.createElement(overridesMap.IconWrapper, { position: "start" }, startIcon)),
33
+ react_1.default.createElement(overridesMap.TextWrapper, { iconOnly: iconOnly }, children),
34
+ typeof endIcon !== 'undefined' && endIcon !== null && (react_1.default.createElement(overridesMap.IconWrapper, { position: "end" }, endIcon))));
37
35
  };
38
36
  exports.default = react_1.default.forwardRef(ButtonBase);
@@ -0,0 +1,36 @@
1
+ import React from 'react';
2
+ export type ButtonContainerProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
3
+ /**
4
+ * You can pass the primary, default, secondary name of the colors or your specified color value
5
+ */
6
+ readonly color?: 'default' | 'primary' | 'secondary' | string;
7
+ /**
8
+ * If true, then expect SVG icon as children. The button will be rendered as icon button
9
+ * Example:
10
+ * ```tsx
11
+ * <Button iconOnly>
12
+ * <MyIconSVG />
13
+ * </Button>
14
+ * ```
15
+ `
16
+ */
17
+ readonly iconOnly?: boolean;
18
+ };
19
+ declare const _default: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & {
20
+ /**
21
+ * You can pass the primary, default, secondary name of the colors or your specified color value
22
+ */
23
+ readonly color?: string | undefined;
24
+ /**
25
+ * If true, then expect SVG icon as children. The button will be rendered as icon button
26
+ * Example:
27
+ * ```tsx
28
+ * <Button iconOnly>
29
+ * <MyIconSVG />
30
+ * </Button>
31
+ * ```
32
+ `
33
+ */
34
+ readonly iconOnly?: boolean | undefined;
35
+ } & React.RefAttributes<HTMLButtonElement>>;
36
+ export default _default;
@@ -0,0 +1,56 @@
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 react_2 = require("@emotion/react");
20
+ const StyledButton = styled_1.default.button `
21
+ border-radius: ${({ theme }) => theme.shape.radiusFactor * 2}em;
22
+ padding: 0.8em 1em;
23
+ font-size: 0.8rem;
24
+ cursor: ${({ disabled }) => (disabled ? 'default' : 'pointer')};
25
+ font-size: 1em;
26
+ border-width: 0;
27
+ outline-style: solid;
28
+ outline-color: transparent;
29
+ outline-width: 0.14em;
30
+ transition: all 180ms ease-out 0s;
31
+ background: none;
32
+ display: inline-flex;
33
+ align-items: center;
34
+ color: ${({ color, disabled, theme }) => {
35
+ switch (true) {
36
+ case disabled:
37
+ return theme.color.textSecondary.alpha(0.8).toString();
38
+ case !disabled && typeof color === 'undefined':
39
+ default:
40
+ return theme.color.textPrimary.toString();
41
+ }
42
+ }};
43
+ ${({ iconOnly, theme }) => iconOnly &&
44
+ (0, react_2.css) `
45
+ padding: 1em;
46
+ justify-content: center;
47
+ width: 2.6em;
48
+ height: 2.6em;
49
+ border-radius: ${theme.shape.radiusFactor * 3}em;
50
+ `}
51
+ `;
52
+ const ButtonContainer = (props, ref) => {
53
+ const { children, iconOnly } = props, nativeProps = __rest(props, ["children", "iconOnly"]);
54
+ return (react_1.default.createElement(StyledButton, Object.assign({ iconOnly: iconOnly }, nativeProps, { ref: ref }), children));
55
+ };
56
+ exports.default = react_1.default.forwardRef(ButtonContainer);
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ export type ButtonIconWrapperProps = React.HTMLAttributes<HTMLSpanElement> & {
3
+ /**
4
+ * Icon position
5
+ */
6
+ readonly position: 'start' | 'end';
7
+ };
8
+ declare const _default: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & {
9
+ /**
10
+ * Icon position
11
+ */
12
+ readonly position: "end" | "start";
13
+ } & React.RefAttributes<HTMLSpanElement>>;
14
+ export default _default;
@@ -0,0 +1,37 @@
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 react_2 = require("@emotion/react");
20
+ const Wrapper = styled_1.default.span `
21
+ display: flex;
22
+ align-items: center;
23
+ justify-content: center;
24
+ ${({ $position }) => $position === 'start' &&
25
+ (0, react_2.css) `
26
+ margin-right: 0.8em;
27
+ `};
28
+ ${({ $position }) => $position === 'end' &&
29
+ (0, react_2.css) `
30
+ margin-left: 0.8em;
31
+ `};
32
+ `;
33
+ const ButtonIconWrapper = (props, ref) => {
34
+ const { children, position } = props, nativeProps = __rest(props, ["children", "position"]);
35
+ return (react_1.default.createElement(Wrapper, Object.assign({ "$position": position }, nativeProps, { ref: ref }), children));
36
+ };
37
+ exports.default = react_1.default.forwardRef(ButtonIconWrapper);
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { ButtonBaseProps } from './ButtonBase';
3
+ export type ButtonOutlinedProps = ButtonBaseProps;
4
+ declare const _default: React.ForwardRefExoticComponent<ButtonBaseProps & React.RefAttributes<HTMLButtonElement>>;
5
+ export default _default;
@@ -0,0 +1,87 @@
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 react_2 = require("@emotion/react");
20
+ const Color_1 = __importDefault(require("../Color"));
21
+ const ButtonBase_1 = __importDefault(require("./ButtonBase"));
22
+ const StyledOutlinedButton = (0, styled_1.default)(ButtonBase_1.default) `
23
+ color: ${({ theme, disabled, $color }) => {
24
+ switch (true) {
25
+ case disabled:
26
+ return theme.color.textPrimary.alpha(0.4).toString();
27
+ default:
28
+ return $color.darken(30).toString();
29
+ }
30
+ }};
31
+ border-color: ${({ theme, disabled, $color }) => {
32
+ switch (true) {
33
+ case disabled:
34
+ return theme.color.surface.darken(80).alpha(0.4).toString();
35
+ default:
36
+ return $color.toString();
37
+ }
38
+ }};
39
+ background-color: transparent;
40
+ border-style: solid;
41
+ border-width: 0.14em;
42
+ ${({ disabled, $color, theme }) => !disabled &&
43
+ (0, react_2.css) `
44
+ &:hover {
45
+ background-color: ${$color.darken(20).alpha(0.1).toString()};
46
+ }
47
+ &:active {
48
+ background-color: ${$color.darken(50).alpha(0.3).toString()};
49
+ }
50
+ &:focus-visible {
51
+ outline-color: ${$color.rgbString() === theme.color.accentPrimary.rgbString()
52
+ ? theme.color.textPrimary.toString()
53
+ : theme.color.accentPrimary.toString()};
54
+ }
55
+ `};
56
+ `;
57
+ const ButtonOutlined = (props, ref) => {
58
+ const { children, disabled, color } = props, restProps = __rest(props, ["children", "disabled", "color"]);
59
+ const theme = (0, react_2.useTheme)();
60
+ const $color = react_1.default.useMemo(() => {
61
+ switch (true) {
62
+ case color === 'primary':
63
+ return theme.color.accentPrimary;
64
+ case color === 'secondary':
65
+ return theme.color.accentSecondary;
66
+ case typeof color === 'undefined':
67
+ case color === 'default':
68
+ return theme.color.textPrimary;
69
+ case typeof color === 'string': {
70
+ let c = theme.color.textPrimary;
71
+ try {
72
+ if (color) {
73
+ c = new Color_1.default(color);
74
+ }
75
+ }
76
+ catch (err) {
77
+ console.error(`invalid color value «${color}»`);
78
+ }
79
+ return c;
80
+ }
81
+ default:
82
+ return theme.color.textPrimary;
83
+ }
84
+ }, [color, theme.color]);
85
+ return (react_1.default.createElement(StyledOutlinedButton, Object.assign({ disabled: disabled, "$color": $color }, restProps, { ref: ref }), children));
86
+ };
87
+ exports.default = react_1.default.forwardRef(ButtonOutlined);
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { ButtonBaseProps } from './ButtonBase';
3
+ export type ButtonPlainProps = ButtonBaseProps;
4
+ declare const _default: React.ForwardRefExoticComponent<ButtonBaseProps & React.RefAttributes<HTMLButtonElement>>;
5
+ export default _default;
@@ -0,0 +1,90 @@
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 react_2 = require("@emotion/react");
20
+ const Color_1 = __importDefault(require("../Color"));
21
+ const ButtonBase_1 = __importDefault(require("./ButtonBase"));
22
+ const StyledPlainButton = (0, styled_1.default)(ButtonBase_1.default) `
23
+ box-shadow: none;
24
+ color: ${({ $color, disabled }) => {
25
+ switch (true) {
26
+ case disabled:
27
+ return $color.alpha(0.4).toString();
28
+ default:
29
+ return $color.toString();
30
+ }
31
+ }};
32
+ background: none;
33
+ ${({ disabled, theme, $color }) => !disabled &&
34
+ (0, react_2.css) `
35
+ &:hover {
36
+ color: ${$color.darken(30).toString()};
37
+ background-color: ${$color.alpha(0.1).toString()};
38
+ }
39
+ &:active {
40
+ color: ${$color.darken(80).toString()};
41
+ background-color: ${$color.alpha(0.3).toString()};
42
+ }
43
+ &:focus-visible {
44
+ outline-color: ${$color.rgbString() === theme.color.accentPrimary.rgbString()
45
+ ? theme.color.textPrimary.toString()
46
+ : theme.color.accentPrimary.toString()};
47
+ }
48
+ `}
49
+ `;
50
+ const ButtonPlain = (props, ref) => {
51
+ const { children, disabled, color } = props, restProps = __rest(props, ["children", "disabled", "color"]);
52
+ const theme = (0, react_2.useTheme)();
53
+ const { $color } = react_1.default.useMemo(() => {
54
+ switch (true) {
55
+ case color === 'primary':
56
+ return {
57
+ $color: theme.color.accentPrimary,
58
+ };
59
+ case color === 'secondary':
60
+ return {
61
+ $color: theme.color.accentSecondary,
62
+ };
63
+ case typeof color === 'undefined':
64
+ case color === 'default':
65
+ return {
66
+ $color: theme.color.textPrimary,
67
+ };
68
+ case typeof color === 'string': {
69
+ let $color = theme.color.textPrimary;
70
+ try {
71
+ if (color) {
72
+ $color = new Color_1.default(color);
73
+ }
74
+ }
75
+ catch (err) {
76
+ console.error(`invalid color value «${color}»`);
77
+ }
78
+ return {
79
+ $color,
80
+ };
81
+ }
82
+ default:
83
+ return {
84
+ $color: theme.color.textPrimary,
85
+ };
86
+ }
87
+ }, [color, theme.color]);
88
+ return (react_1.default.createElement(StyledPlainButton, Object.assign({ "$color": $color, disabled: disabled }, restProps, { ref: ref }), children));
89
+ };
90
+ exports.default = react_1.default.forwardRef(ButtonPlain);
@@ -1,19 +1,5 @@
1
1
  import React from 'react';
2
- /**
3
- * Standard
4
- */
5
- export type ButtonStandardProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
6
- /**
7
- * Starticon
8
- */
9
- readonly startIcon?: JSX.Element;
10
- readonly endIcon?: JSX.Element;
11
- };
12
- declare const _default: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & {
13
- /**
14
- * Starticon
15
- */
16
- readonly startIcon?: JSX.Element | undefined;
17
- readonly endIcon?: JSX.Element | undefined;
18
- } & React.RefAttributes<HTMLButtonElement>>;
2
+ import { ButtonBaseProps } from './ButtonBase';
3
+ export type ButtonStandardProps = ButtonBaseProps;
4
+ declare const _default: React.ForwardRefExoticComponent<ButtonBaseProps & React.RefAttributes<HTMLButtonElement>>;
19
5
  export default _default;
@@ -16,35 +16,95 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  const react_1 = __importDefault(require("react"));
18
18
  const styled_1 = __importDefault(require("@emotion/styled"));
19
+ const react_2 = require("@emotion/react");
20
+ const Color_1 = __importDefault(require("../Color"));
19
21
  const ButtonBase_1 = __importDefault(require("./ButtonBase"));
20
- const Button = (0, styled_1.default)(ButtonBase_1.default) `
21
- color: ${({ theme }) => theme.colors.textPrimary().toString()};
22
- background-color: ${({ theme }) => theme.isDark
23
- ? theme.colors.backgroundPrimary().lighten(20).toString()
24
- : theme.colors.backgroundPrimary().toString()};
25
- box-shadow: 0 2px 12px
26
- ${({ theme }) => theme.colors.backgroundPrimary().darken(40).alpha(0.6).toString()};
27
- &:hover {
28
- background-color: ${({ theme }) => theme.colors.backgroundPrimary().darken(20).toString()};
29
- }
30
- &:active {
31
- background-color: ${({ theme }) => theme.colors.backgroundPrimary().darken(40).toString()};
32
- }
33
- &:focus-visible {
34
- outline: 2px solid ${({ theme }) => theme.colors.accentPrimary().toString()};
35
- }
36
- `;
37
- const StartIconWrapper = styled_1.default.span `
38
- margin-right: 0.8em;
39
- `;
40
- const EndIconWrapper = styled_1.default.span `
41
- margin-left: 0.8em;
22
+ const StyledStandardButton = (0, styled_1.default)(ButtonBase_1.default) `
23
+ color: ${({ $color, disabled }) => {
24
+ switch (true) {
25
+ case disabled:
26
+ return $color.alpha(0.4).toString();
27
+ default:
28
+ return $color.toString();
29
+ }
30
+ }};
31
+ background-color: ${({ $background, disabled }) => {
32
+ switch (true) {
33
+ case disabled:
34
+ return $background.darken(10).toString();
35
+ default:
36
+ return $background.toString();
37
+ }
38
+ }};
39
+ box-shadow: 0 0.125em 0.25em ${({ $background }) => $background.darken(100).alpha(0.5).toString()};
40
+ ${({ $background }) => {
41
+ switch (true) {
42
+ case $background.luminance() > 0.49:
43
+ return $background.darken(40).alpha(0.8).toString();
44
+ default:
45
+ return $background.darken(20).alpha(0.5).toString();
46
+ }
47
+ }};
48
+ ${({ disabled, $background, theme }) => !disabled &&
49
+ (0, react_2.css) `
50
+ &:hover {
51
+ background-color: ${$background.darken(30).toString()};
52
+ }
53
+ &:active {
54
+ background-color: ${$background.darken(80).toString()};
55
+ }
56
+ &:focus-visible {
57
+ outline-color: ${$background.rgbString() === theme.color.accentPrimary.rgbString()
58
+ ? theme.color.textPrimary.toString()
59
+ : theme.color.accentPrimary.toString()};
60
+ }
61
+ `}
42
62
  `;
43
63
  const ButtonStandard = (props, ref) => {
44
- const { children, startIcon, endIcon } = props, otherProps = __rest(props, ["children", "startIcon", "endIcon"]);
45
- return (react_1.default.createElement(Button, Object.assign({}, otherProps, { ref: ref }),
46
- typeof startIcon !== 'undefined' && startIcon !== null && (react_1.default.createElement(StartIconWrapper, null, startIcon)),
47
- children,
48
- typeof endIcon !== 'undefined' && endIcon !== null && (react_1.default.createElement(EndIconWrapper, null, endIcon))));
64
+ const { children, disabled, color } = props, restProps = __rest(props, ["children", "disabled", "color"]);
65
+ const theme = (0, react_2.useTheme)();
66
+ const { $background, $color } = react_1.default.useMemo(() => {
67
+ switch (true) {
68
+ case color === 'primary':
69
+ return {
70
+ $color: theme.color.accentPrimaryContrast,
71
+ $background: theme.color.accentPrimary,
72
+ };
73
+ case color === 'secondary':
74
+ return {
75
+ $color: theme.color.accentSecondaryContrast,
76
+ $background: theme.color.accentSecondary,
77
+ };
78
+ case typeof color === 'undefined':
79
+ case color === 'default':
80
+ return {
81
+ $background: theme.color.surface,
82
+ $color: theme.color.textPrimary,
83
+ };
84
+ case typeof color === 'string': {
85
+ let $background = theme.color.surface;
86
+ try {
87
+ if (color) {
88
+ $background = new Color_1.default(color);
89
+ }
90
+ }
91
+ catch (err) {
92
+ console.error(`invalid color value «${color}»`);
93
+ }
94
+ return {
95
+ $background,
96
+ $color: $background.contrast(theme.color.textPrimary.rgbString()) > 5
97
+ ? theme.color.textPrimary
98
+ : theme.color.surface,
99
+ };
100
+ }
101
+ default:
102
+ return {
103
+ $background: theme.color.surface,
104
+ $color: theme.color.textPrimary,
105
+ };
106
+ }
107
+ }, [color, theme.color]);
108
+ return (react_1.default.createElement(StyledStandardButton, Object.assign({ "$color": $color, "$background": $background, disabled: disabled }, restProps, { ref: ref }), children));
49
109
  };
50
110
  exports.default = react_1.default.forwardRef(ButtonStandard);
@@ -0,0 +1,29 @@
1
+ import React from 'react';
2
+ import type { ButtonContainerProps } from './ButtonContainer';
3
+ export type ButtonTextWrapperProps = React.HTMLAttributes<HTMLSpanElement> & {
4
+ /**
5
+ * If true, then expect SVG icon as children. The button will be rendered as icon button
6
+ * Example:
7
+ * ```tsx
8
+ * <Button iconOnly>
9
+ * <MyIconSVG />
10
+ * </Button>
11
+ * ```
12
+ `
13
+ */
14
+ readonly iconOnly?: ButtonContainerProps['iconOnly'];
15
+ };
16
+ declare const _default: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & {
17
+ /**
18
+ * If true, then expect SVG icon as children. The button will be rendered as icon button
19
+ * Example:
20
+ * ```tsx
21
+ * <Button iconOnly>
22
+ * <MyIconSVG />
23
+ * </Button>
24
+ * ```
25
+ `
26
+ */
27
+ readonly iconOnly?: boolean | undefined;
28
+ } & React.RefAttributes<HTMLSpanElement>>;
29
+ export default _default;