@coorpacademy/components 11.35.3-alpha.4 → 11.35.3-alpha.5.4

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 (338) hide show
  1. package/es/atom/button-link/index.d.ts +3 -7
  2. package/es/atom/button-link/index.d.ts.map +1 -1
  3. package/es/atom/button-link/index.js +1 -1
  4. package/es/atom/button-link/index.js.map +1 -1
  5. package/es/atom/button-link/style.css +2 -2
  6. package/es/atom/button-link/types.d.ts +4 -10
  7. package/es/atom/button-link/types.d.ts.map +1 -1
  8. package/es/atom/button-link/types.js +3 -3
  9. package/es/atom/button-link/types.js.map +1 -1
  10. package/es/atom/button-menu/index.d.ts +1 -3
  11. package/es/atom/button-menu/index.d.ts.map +1 -1
  12. package/es/atom/button-menu/types.d.ts +2 -6
  13. package/es/atom/button-menu/types.d.ts.map +1 -1
  14. package/es/atom/icon/index.d.ts +35 -17
  15. package/es/atom/icon/index.d.ts.map +1 -1
  16. package/es/atom/icon/index.js +32 -15
  17. package/es/atom/icon/index.js.map +1 -1
  18. package/es/atom/radio-with-title/index.d.ts +16 -10
  19. package/es/atom/radio-with-title/index.d.ts.map +1 -1
  20. package/es/atom/radio-with-title/types.d.ts +16 -9
  21. package/es/atom/radio-with-title/types.d.ts.map +1 -1
  22. package/es/atom/status-item/index.native.js +2 -2
  23. package/es/atom/status-item/index.native.js.map +1 -1
  24. package/es/atom/tag/index.d.ts +12 -1
  25. package/es/atom/tag/style.css +1 -0
  26. package/es/atom/title/index.d.ts +16 -9
  27. package/es/molecule/banner/style.css +1 -0
  28. package/es/molecule/base-modal/style.css +0 -1
  29. package/es/molecule/bulk-progress-bar/index.js +2 -2
  30. package/es/molecule/bulk-progress-bar/index.js.map +1 -1
  31. package/es/molecule/bullet-point-menu-button/index.d.ts +1 -3
  32. package/es/molecule/bullet-point-menu-button/index.d.ts.map +1 -1
  33. package/es/molecule/bullet-point-menu-button/types.d.ts +1 -3
  34. package/es/molecule/bullet-point-menu-button/types.d.ts.map +1 -1
  35. package/es/molecule/button-menu-action/index.d.ts +4 -10
  36. package/es/molecule/button-menu-action/index.d.ts.map +1 -1
  37. package/es/molecule/button-menu-action/types.d.ts +4 -10
  38. package/es/molecule/button-menu-action/types.d.ts.map +1 -1
  39. package/es/molecule/certification-card/index.js +1 -1
  40. package/es/molecule/certification-card/index.js.map +1 -1
  41. package/es/molecule/cm-popin/types.d.ts +59 -84
  42. package/es/molecule/cm-popin/types.d.ts.map +1 -1
  43. package/es/molecule/cm-popin/types.js +1 -1
  44. package/es/molecule/cm-popin/types.js.map +1 -1
  45. package/es/molecule/dashboard/cards-list/style.css +1 -0
  46. package/es/molecule/expandible-actionable-table/index.d.ts +5 -13
  47. package/es/molecule/expandible-actionable-table/index.d.ts.map +1 -1
  48. package/es/molecule/expandible-actionable-table/types.d.ts +5 -13
  49. package/es/molecule/expandible-actionable-table/types.d.ts.map +1 -1
  50. package/es/molecule/icon-preview/index.d.ts +5 -2
  51. package/es/molecule/icon-preview/index.d.ts.map +1 -1
  52. package/es/molecule/icon-preview/index.js +13 -2
  53. package/es/molecule/icon-preview/index.js.map +1 -1
  54. package/es/molecule/icon-preview/style.css +0 -1
  55. package/es/molecule/learner-skill-card/index.js +10 -8
  56. package/es/molecule/learner-skill-card/index.js.map +1 -1
  57. package/es/molecule/learner-skill-card/style.css +1 -0
  58. package/es/molecule/learning-priority-modal/style.css +3 -2
  59. package/es/molecule/progress-wrapper/index.js +1 -1
  60. package/es/molecule/progress-wrapper/index.js.map +1 -1
  61. package/es/molecule/skills-chart-side-information-item/index.d.ts +1 -1
  62. package/es/molecule/skills-chart-side-information-panel/index.d.ts +1 -1
  63. package/es/molecule/title-and-checkbox-wrapper/index.d.ts +16 -9
  64. package/es/molecule/title-radio-wrapper/index.d.ts +16 -10
  65. package/es/molecule/title-radio-wrapper/index.d.ts.map +1 -1
  66. package/es/molecule/title-radio-wrapper/types.d.ts +16 -9
  67. package/es/molecule/title-radio-wrapper/types.d.ts.map +1 -1
  68. package/es/organism/cards-grid/index.d.ts +48 -10
  69. package/es/organism/cards-grid/index.d.ts.map +1 -1
  70. package/es/organism/cards-grid/index.js +3 -2
  71. package/es/organism/cards-grid/index.js.map +1 -1
  72. package/es/organism/content-skill-modal/index.d.ts +38 -64
  73. package/es/organism/content-skill-modal/index.d.ts.map +1 -1
  74. package/es/organism/content-skill-modal/types.d.ts +37 -63
  75. package/es/organism/content-skill-modal/types.d.ts.map +1 -1
  76. package/es/organism/header-with-actions/index.d.ts +12 -32
  77. package/es/organism/header-with-actions/index.d.ts.map +1 -1
  78. package/es/organism/header-with-actions/index.js +7 -85
  79. package/es/organism/header-with-actions/index.js.map +1 -1
  80. package/es/organism/header-with-actions/types.d.ts +17 -54
  81. package/es/organism/header-with-actions/types.d.ts.map +1 -1
  82. package/es/organism/header-with-actions/types.js +6 -22
  83. package/es/organism/header-with-actions/types.js.map +1 -1
  84. package/es/organism/icon-editor/index.d.ts +3 -7
  85. package/es/organism/icon-editor/index.d.ts.map +1 -1
  86. package/es/organism/icon-editor/types.d.ts +3 -7
  87. package/es/organism/icon-editor/types.d.ts.map +1 -1
  88. package/es/organism/list-item/index.js +5 -5
  89. package/es/organism/list-item/index.js.map +1 -1
  90. package/es/organism/list-item/style.css +23 -17
  91. package/es/organism/list-items/index.d.ts +38 -63
  92. package/es/organism/list-items/index.d.ts.map +1 -1
  93. package/es/organism/list-items/index.js +3 -2
  94. package/es/organism/list-items/index.js.map +1 -1
  95. package/es/organism/mooc-header/style.css +1 -0
  96. package/es/organism/rewards-form/index.d.ts +16 -9
  97. package/es/organism/select-opponents/index.d.ts +16 -10
  98. package/es/organism/select-opponents/index.d.ts.map +1 -1
  99. package/es/organism/select-opponents/types.d.ts +16 -9
  100. package/es/organism/select-opponents/types.d.ts.map +1 -1
  101. package/es/organism/setup-header/index.d.ts +12 -28
  102. package/es/organism/sidebar/index.d.ts +2 -2
  103. package/es/organism/skill-edition/index.d.ts.map +1 -1
  104. package/es/organism/skill-edition/index.js +13 -7
  105. package/es/organism/skill-edition/index.js.map +1 -1
  106. package/es/organism/skill-edition/types.d.ts +19 -0
  107. package/es/organism/skill-edition/types.d.ts.map +1 -1
  108. package/es/organism/skill-edition/types.js.map +1 -1
  109. package/es/organism/title-and-input/index.d.ts +34 -26
  110. package/es/organism/title-and-input/index.d.ts.map +1 -1
  111. package/es/organism/title-and-input/types.d.ts +33 -25
  112. package/es/organism/title-and-input/types.d.ts.map +1 -1
  113. package/es/organism/wizard-contents/index.d.ts +27 -36
  114. package/es/template/app-player/loading/index.d.ts +58 -83
  115. package/es/template/app-player/player/index.d.ts +115 -166
  116. package/es/template/app-player/player/slides/index.d.ts +58 -83
  117. package/es/template/app-player/player/slides/index.d.ts.map +1 -1
  118. package/es/template/app-player/popin-correction/index.d.ts +57 -83
  119. package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
  120. package/es/template/app-player/popin-end/index.d.ts +58 -83
  121. package/es/template/app-review/index.d.ts +58 -84
  122. package/es/template/app-review/index.d.ts.map +1 -1
  123. package/es/template/app-review/player/prop-types.d.ts +58 -83
  124. package/es/template/app-review/player/prop-types.d.ts.map +1 -1
  125. package/es/template/app-review/prop-types.d.ts +58 -83
  126. package/es/template/app-review/prop-types.d.ts.map +1 -1
  127. package/es/template/back-office/brand-create/index.d.ts +12 -28
  128. package/es/template/back-office/brand-create/index.d.ts.map +1 -1
  129. package/es/template/back-office/brand-list/index.d.ts +12 -28
  130. package/es/template/back-office/brand-list/index.d.ts.map +1 -1
  131. package/es/template/back-office/brand-update/index.d.ts +182 -305
  132. package/es/template/back-office/brand-update/index.d.ts.map +1 -1
  133. package/es/template/back-office/brand-update/index.js +2 -4
  134. package/es/template/back-office/brand-update/index.js.map +1 -1
  135. package/es/template/back-office/brand-update/style.css +1 -4
  136. package/es/template/back-office/brand-update/utils.d.ts +11 -39
  137. package/es/template/back-office/brand-update/utils.js +1 -20
  138. package/es/template/back-office/brand-update/utils.js.map +1 -1
  139. package/es/template/back-office/dashboard-preview/index.d.ts +12 -28
  140. package/es/template/back-office/layout/index.d.ts +12 -28
  141. package/es/template/back-office/layout/index.d.ts.map +1 -1
  142. package/es/template/common/dashboard/index.d.ts +115 -166
  143. package/es/template/common/search-page/index.d.ts +58 -83
  144. package/es/template/external-course/index.d.ts +58 -83
  145. package/es/template/my-learning/index.d.ts.map +1 -1
  146. package/es/template/my-learning/index.js +1 -1
  147. package/es/template/my-learning/index.js.map +1 -1
  148. package/es/template/skill-detail/all-courses.css +9 -10
  149. package/es/template/skill-detail/all-courses.d.ts +46 -47
  150. package/es/template/skill-detail/all-courses.d.ts.map +1 -1
  151. package/es/template/skill-detail/all-courses.js +14 -23
  152. package/es/template/skill-detail/all-courses.js.map +1 -1
  153. package/es/template/skill-detail/continue-learning.css +7 -2
  154. package/es/template/skill-detail/continue-learning.d.ts +25 -12
  155. package/es/template/skill-detail/continue-learning.d.ts.map +1 -1
  156. package/es/template/skill-detail/continue-learning.js.map +1 -1
  157. package/es/template/skill-detail/index.d.ts +89 -71
  158. package/es/template/skill-detail/index.d.ts.map +1 -1
  159. package/es/template/skill-detail/index.js +99 -55
  160. package/es/template/skill-detail/index.js.map +1 -1
  161. package/es/template/skill-detail/style.css +204 -35
  162. package/es/variables/colors.css +2 -0
  163. package/es/variables/colors.d.ts +4 -3
  164. package/es/variables/colors.d.ts.map +1 -1
  165. package/es/variables/colors.js +5 -4
  166. package/es/variables/colors.js.map +1 -1
  167. package/es/variables/theme.native.js +1 -1
  168. package/es/variables/theme.native.js.map +1 -1
  169. package/lib/atom/button-link/index.d.ts +3 -7
  170. package/lib/atom/button-link/index.d.ts.map +1 -1
  171. package/lib/atom/button-link/index.js +1 -1
  172. package/lib/atom/button-link/index.js.map +1 -1
  173. package/lib/atom/button-link/style.css +2 -2
  174. package/lib/atom/button-link/types.d.ts +4 -10
  175. package/lib/atom/button-link/types.d.ts.map +1 -1
  176. package/lib/atom/button-link/types.js +3 -3
  177. package/lib/atom/button-link/types.js.map +1 -1
  178. package/lib/atom/button-menu/index.d.ts +1 -3
  179. package/lib/atom/button-menu/index.d.ts.map +1 -1
  180. package/lib/atom/button-menu/types.d.ts +2 -6
  181. package/lib/atom/button-menu/types.d.ts.map +1 -1
  182. package/lib/atom/icon/index.d.ts +35 -17
  183. package/lib/atom/icon/index.d.ts.map +1 -1
  184. package/lib/atom/icon/index.js +34 -18
  185. package/lib/atom/icon/index.js.map +1 -1
  186. package/lib/atom/radio-with-title/index.d.ts +16 -10
  187. package/lib/atom/radio-with-title/index.d.ts.map +1 -1
  188. package/lib/atom/radio-with-title/types.d.ts +16 -9
  189. package/lib/atom/radio-with-title/types.d.ts.map +1 -1
  190. package/lib/atom/status-item/index.native.js +2 -2
  191. package/lib/atom/status-item/index.native.js.map +1 -1
  192. package/lib/atom/tag/index.d.ts +12 -1
  193. package/lib/atom/tag/style.css +1 -0
  194. package/lib/atom/title/index.d.ts +16 -9
  195. package/lib/molecule/banner/style.css +1 -0
  196. package/lib/molecule/base-modal/style.css +0 -1
  197. package/lib/molecule/bulk-progress-bar/index.js +2 -2
  198. package/lib/molecule/bulk-progress-bar/index.js.map +1 -1
  199. package/lib/molecule/bullet-point-menu-button/index.d.ts +1 -3
  200. package/lib/molecule/bullet-point-menu-button/index.d.ts.map +1 -1
  201. package/lib/molecule/bullet-point-menu-button/types.d.ts +1 -3
  202. package/lib/molecule/bullet-point-menu-button/types.d.ts.map +1 -1
  203. package/lib/molecule/button-menu-action/index.d.ts +4 -10
  204. package/lib/molecule/button-menu-action/index.d.ts.map +1 -1
  205. package/lib/molecule/button-menu-action/types.d.ts +4 -10
  206. package/lib/molecule/button-menu-action/types.d.ts.map +1 -1
  207. package/lib/molecule/certification-card/index.js +1 -1
  208. package/lib/molecule/certification-card/index.js.map +1 -1
  209. package/lib/molecule/cm-popin/types.d.ts +59 -84
  210. package/lib/molecule/cm-popin/types.d.ts.map +1 -1
  211. package/lib/molecule/cm-popin/types.js +1 -1
  212. package/lib/molecule/cm-popin/types.js.map +1 -1
  213. package/lib/molecule/dashboard/cards-list/style.css +1 -0
  214. package/lib/molecule/expandible-actionable-table/index.d.ts +5 -13
  215. package/lib/molecule/expandible-actionable-table/index.d.ts.map +1 -1
  216. package/lib/molecule/expandible-actionable-table/types.d.ts +5 -13
  217. package/lib/molecule/expandible-actionable-table/types.d.ts.map +1 -1
  218. package/lib/molecule/icon-preview/index.d.ts +5 -2
  219. package/lib/molecule/icon-preview/index.d.ts.map +1 -1
  220. package/lib/molecule/icon-preview/index.js +13 -2
  221. package/lib/molecule/icon-preview/index.js.map +1 -1
  222. package/lib/molecule/icon-preview/style.css +0 -1
  223. package/lib/molecule/learner-skill-card/index.js +10 -8
  224. package/lib/molecule/learner-skill-card/index.js.map +1 -1
  225. package/lib/molecule/learner-skill-card/style.css +1 -0
  226. package/lib/molecule/learning-priority-modal/style.css +3 -2
  227. package/lib/molecule/progress-wrapper/index.js +1 -1
  228. package/lib/molecule/progress-wrapper/index.js.map +1 -1
  229. package/lib/molecule/skills-chart-side-information-item/index.d.ts +1 -1
  230. package/lib/molecule/skills-chart-side-information-panel/index.d.ts +1 -1
  231. package/lib/molecule/title-and-checkbox-wrapper/index.d.ts +16 -9
  232. package/lib/molecule/title-radio-wrapper/index.d.ts +16 -10
  233. package/lib/molecule/title-radio-wrapper/index.d.ts.map +1 -1
  234. package/lib/molecule/title-radio-wrapper/types.d.ts +16 -9
  235. package/lib/molecule/title-radio-wrapper/types.d.ts.map +1 -1
  236. package/lib/organism/cards-grid/index.d.ts +48 -10
  237. package/lib/organism/cards-grid/index.d.ts.map +1 -1
  238. package/lib/organism/cards-grid/index.js +3 -2
  239. package/lib/organism/cards-grid/index.js.map +1 -1
  240. package/lib/organism/content-skill-modal/index.d.ts +38 -64
  241. package/lib/organism/content-skill-modal/index.d.ts.map +1 -1
  242. package/lib/organism/content-skill-modal/types.d.ts +37 -63
  243. package/lib/organism/content-skill-modal/types.d.ts.map +1 -1
  244. package/lib/organism/header-with-actions/index.d.ts +12 -32
  245. package/lib/organism/header-with-actions/index.d.ts.map +1 -1
  246. package/lib/organism/header-with-actions/index.js +7 -85
  247. package/lib/organism/header-with-actions/index.js.map +1 -1
  248. package/lib/organism/header-with-actions/types.d.ts +17 -54
  249. package/lib/organism/header-with-actions/types.d.ts.map +1 -1
  250. package/lib/organism/header-with-actions/types.js +6 -22
  251. package/lib/organism/header-with-actions/types.js.map +1 -1
  252. package/lib/organism/icon-editor/index.d.ts +3 -7
  253. package/lib/organism/icon-editor/index.d.ts.map +1 -1
  254. package/lib/organism/icon-editor/types.d.ts +3 -7
  255. package/lib/organism/icon-editor/types.d.ts.map +1 -1
  256. package/lib/organism/list-item/index.js +5 -5
  257. package/lib/organism/list-item/index.js.map +1 -1
  258. package/lib/organism/list-item/style.css +23 -17
  259. package/lib/organism/list-items/index.d.ts +38 -63
  260. package/lib/organism/list-items/index.d.ts.map +1 -1
  261. package/lib/organism/list-items/index.js +3 -2
  262. package/lib/organism/list-items/index.js.map +1 -1
  263. package/lib/organism/mooc-header/style.css +1 -0
  264. package/lib/organism/rewards-form/index.d.ts +16 -9
  265. package/lib/organism/select-opponents/index.d.ts +16 -10
  266. package/lib/organism/select-opponents/index.d.ts.map +1 -1
  267. package/lib/organism/select-opponents/types.d.ts +16 -9
  268. package/lib/organism/select-opponents/types.d.ts.map +1 -1
  269. package/lib/organism/setup-header/index.d.ts +12 -28
  270. package/lib/organism/sidebar/index.d.ts +2 -2
  271. package/lib/organism/skill-edition/index.d.ts.map +1 -1
  272. package/lib/organism/skill-edition/index.js +13 -7
  273. package/lib/organism/skill-edition/index.js.map +1 -1
  274. package/lib/organism/skill-edition/types.d.ts +19 -0
  275. package/lib/organism/skill-edition/types.d.ts.map +1 -1
  276. package/lib/organism/skill-edition/types.js.map +1 -1
  277. package/lib/organism/title-and-input/index.d.ts +34 -26
  278. package/lib/organism/title-and-input/index.d.ts.map +1 -1
  279. package/lib/organism/title-and-input/types.d.ts +33 -25
  280. package/lib/organism/title-and-input/types.d.ts.map +1 -1
  281. package/lib/organism/wizard-contents/index.d.ts +27 -36
  282. package/lib/template/app-player/loading/index.d.ts +58 -83
  283. package/lib/template/app-player/player/index.d.ts +115 -166
  284. package/lib/template/app-player/player/slides/index.d.ts +58 -83
  285. package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
  286. package/lib/template/app-player/popin-correction/index.d.ts +57 -83
  287. package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
  288. package/lib/template/app-player/popin-end/index.d.ts +58 -83
  289. package/lib/template/app-review/index.d.ts +58 -84
  290. package/lib/template/app-review/index.d.ts.map +1 -1
  291. package/lib/template/app-review/player/prop-types.d.ts +58 -83
  292. package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
  293. package/lib/template/app-review/prop-types.d.ts +58 -83
  294. package/lib/template/app-review/prop-types.d.ts.map +1 -1
  295. package/lib/template/back-office/brand-create/index.d.ts +12 -28
  296. package/lib/template/back-office/brand-create/index.d.ts.map +1 -1
  297. package/lib/template/back-office/brand-list/index.d.ts +12 -28
  298. package/lib/template/back-office/brand-list/index.d.ts.map +1 -1
  299. package/lib/template/back-office/brand-update/index.d.ts +182 -305
  300. package/lib/template/back-office/brand-update/index.d.ts.map +1 -1
  301. package/lib/template/back-office/brand-update/index.js +2 -4
  302. package/lib/template/back-office/brand-update/index.js.map +1 -1
  303. package/lib/template/back-office/brand-update/style.css +1 -4
  304. package/lib/template/back-office/brand-update/utils.d.ts +11 -39
  305. package/lib/template/back-office/brand-update/utils.js +1 -20
  306. package/lib/template/back-office/brand-update/utils.js.map +1 -1
  307. package/lib/template/back-office/dashboard-preview/index.d.ts +12 -28
  308. package/lib/template/back-office/layout/index.d.ts +12 -28
  309. package/lib/template/back-office/layout/index.d.ts.map +1 -1
  310. package/lib/template/common/dashboard/index.d.ts +115 -166
  311. package/lib/template/common/search-page/index.d.ts +58 -83
  312. package/lib/template/external-course/index.d.ts +58 -83
  313. package/lib/template/my-learning/index.d.ts.map +1 -1
  314. package/lib/template/my-learning/index.js +1 -1
  315. package/lib/template/my-learning/index.js.map +1 -1
  316. package/lib/template/skill-detail/all-courses.css +9 -10
  317. package/lib/template/skill-detail/all-courses.d.ts +46 -47
  318. package/lib/template/skill-detail/all-courses.d.ts.map +1 -1
  319. package/lib/template/skill-detail/all-courses.js +13 -23
  320. package/lib/template/skill-detail/all-courses.js.map +1 -1
  321. package/lib/template/skill-detail/continue-learning.css +7 -2
  322. package/lib/template/skill-detail/continue-learning.d.ts +25 -12
  323. package/lib/template/skill-detail/continue-learning.d.ts.map +1 -1
  324. package/lib/template/skill-detail/continue-learning.js.map +1 -1
  325. package/lib/template/skill-detail/index.d.ts +89 -71
  326. package/lib/template/skill-detail/index.d.ts.map +1 -1
  327. package/lib/template/skill-detail/index.js +99 -55
  328. package/lib/template/skill-detail/index.js.map +1 -1
  329. package/lib/template/skill-detail/style.css +204 -35
  330. package/lib/variables/colors.css +2 -0
  331. package/lib/variables/colors.d.ts +4 -3
  332. package/lib/variables/colors.d.ts.map +1 -1
  333. package/lib/variables/colors.js +5 -4
  334. package/lib/variables/colors.js.map +1 -1
  335. package/lib/variables/theme.native.js +1 -1
  336. package/lib/variables/theme.native.js.map +1 -1
  337. package/package.json +2 -2
  338. package/locales/.mtslconfig.json +0 -1
@@ -6,7 +6,7 @@ declare const ButtonLink: {
6
6
  type: import("prop-types").Requireable<string>;
7
7
  usage: import("prop-types").Requireable<string>;
8
8
  label: import("prop-types").Requireable<string>;
9
- content: import("prop-types").Requireable<import("prop-types").ReactNodeLike>;
9
+ content: import("prop-types").Requireable<NonNullable<import("prop-types").ReactNodeLike | import("prop-types").InferProps<{}>>>;
10
10
  'aria-label': import("prop-types").Requireable<string>;
11
11
  tooltipText: import("prop-types").Requireable<string>;
12
12
  tooltipPlacement: import("prop-types").Requireable<string>;
@@ -20,9 +20,7 @@ declare const ButtonLink: {
20
20
  color: import("prop-types").Requireable<string>;
21
21
  backgroundColor: import("prop-types").Requireable<string>;
22
22
  size: import("prop-types").Requireable<number>;
23
- customStyle: import("prop-types").Requireable<{
24
- [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
25
- }>;
23
+ customStyle: import("prop-types").Requireable<object>;
26
24
  }>>;
27
25
  }>>;
28
26
  onClick: import("prop-types").Requireable<(...args: any[]) => any>;
@@ -35,9 +33,7 @@ declare const ButtonLink: {
35
33
  hoverColor: import("prop-types").Requireable<string>;
36
34
  disabled: import("prop-types").Requireable<boolean>;
37
35
  className: import("prop-types").Requireable<string>;
38
- customStyle: import("prop-types").Requireable<{
39
- [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
40
- }>;
36
+ customStyle: import("prop-types").Requireable<object>;
41
37
  };
42
38
  };
43
39
  export default ButtonLink;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button-link/index.tsx"],"names":[],"mappings":";AAOA,OAAkB,EAAC,eAAe,EAAW,MAAM,SAAS,CAAC;AAoD7D,QAAA,MAAM,UAAU;YAAW,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmIzC,CAAC;AAIF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button-link/index.tsx"],"names":[],"mappings":";AAOA,OAAkB,EAAC,eAAe,EAAW,MAAM,SAAS,CAAC;AAoD7D,QAAA,MAAM,UAAU;YAAW,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmIzC,CAAC;AAIF,eAAe,UAAU,CAAC"}
@@ -29,7 +29,7 @@ const getButtonContent = (icon, content, hovered, hoverBackgroundColor, hoverCol
29
29
  iconName: faIcon.name,
30
30
  iconColor: hovered && hoverColor ? hoverColor : faIcon.color ?? DEFAULT_ICON_COLOR,
31
31
  // eslint-disable-next-line no-nested-ternary
32
- backgroundColor: !faIcon?.backgroundColor ? 'transparent' : hovered && hoverBackgroundColor ? hoverBackgroundColor : faIcon.backgroundColor,
32
+ backgroundColor: !faIcon?.backgroundColor ? null : hovered && hoverBackgroundColor ? hoverBackgroundColor : faIcon.backgroundColor,
33
33
  size: {
34
34
  faSize: faIcon.size,
35
35
  wrapperSize: faIcon.size
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","useCallback","useState","useMemo","classnames","Link","FaIcon","DEFAULT_ICON_COLOR","ICONS","ToolTip","propTypes","style","getButtonContent","icon","content","hovered","hoverBackgroundColor","hoverColor","type","faIcon","position","Icon","createElement","className","buttonContent","label","iconComponent","iconName","name","iconColor","color","backgroundColor","size","faSize","wrapperSize","customStyle","theme","ButtonLink","props","usage","disabled","dataName","dataTestId","ariaLabel","tooltipText","tooltipPlacement","link","onClick","_noop","onKeyDown","useTitle","styleButton","button","iconButton","primary","secondary","tertiary","text","dangerous","setHovered","handleOnClick","event","handleOnKeyDown","handleMouseOver","handleMouseLeave","TooltipContent","tooltipContentWrapper","renderToolTip","closeToolTipInformationTextAriaLabel","fontSize","anchorId","toolTipIsVisible","placement","_customStyle","_extends","title","onMouseEnter","onMouseLeave","onMouseOver","tabIndex","process","env","NODE_ENV"],"sources":["../../../src/atom/button-link/index.tsx"],"sourcesContent":["import React, {useCallback, useState, useMemo} from 'react';\nimport {noop} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Link from '../link';\nimport FaIcon, {DEFAULT_ICON_COLOR} from '../icon';\nimport {ICONS} from '../../util/button-icons';\nimport ToolTip from '../tooltip';\nimport propTypes, {ButtonLinkProps, IconType} from './types';\nimport style from './style.css';\n\nconst getButtonContent = (\n icon?: IconType,\n content?: string | React.ReactNode,\n hovered?: boolean,\n hoverBackgroundColor?: string,\n hoverColor?: string\n) => {\n const {type, faIcon, position} = icon || {type: '', position: ''};\n const Icon = type && ICONS[type];\n\n if (!Icon && !faIcon) {\n return (\n <div className={style.buttonContent}>\n <span className={style.label}>{content}</span>\n </div>\n );\n }\n\n const iconComponent = faIcon ? (\n <FaIcon\n {...{\n iconName: faIcon.name,\n iconColor: hovered && hoverColor ? hoverColor : faIcon.color ?? DEFAULT_ICON_COLOR,\n // eslint-disable-next-line no-nested-ternary\n backgroundColor: !faIcon?.backgroundColor\n ? 'transparent'\n : hovered && hoverBackgroundColor\n ? hoverBackgroundColor\n : faIcon.backgroundColor,\n size: {\n faSize: faIcon.size,\n wrapperSize: faIcon.size\n },\n customStyle: faIcon.customStyle\n }}\n />\n ) : (\n <Icon className={style.icon} theme=\"coorpmanager\" />\n );\n\n return (\n <div className={style.buttonContent}>\n {position === 'left' ? iconComponent : null}\n {content ? <span className={style.label}>{content}</span> : null}\n {position === 'right' ? iconComponent : null}\n </div>\n );\n};\n\nconst ButtonLink = (props: ButtonLinkProps) => {\n const {\n type,\n usage = 'button',\n label,\n content,\n hoverBackgroundColor,\n hoverColor,\n disabled = false,\n icon,\n 'data-name': dataName,\n 'data-testid': dataTestId = 'button-link',\n 'aria-label': ariaLabel,\n tooltipText,\n tooltipPlacement = 'left',\n link,\n onClick = noop,\n onKeyDown = noop,\n className,\n customStyle,\n useTitle = true\n } = props;\n const styleButton = classnames(\n link && style.link,\n className,\n style.button,\n !label && style.iconButton,\n type === 'primary' && style.primary,\n type === 'secondary' && style.secondary,\n type === 'tertiary' && style.tertiary,\n type === 'text' && style.text,\n type === 'dangerous' && style.dangerous,\n disabled && style.disabled\n );\n\n const [hovered, setHovered] = useState(false);\n\n const handleOnClick = useCallback(event => onClick(event), [onClick]);\n\n const handleOnKeyDown = useCallback(event => onKeyDown(event), [onKeyDown]);\n\n const handleMouseOver = useCallback(() => {\n setHovered(true);\n }, [setHovered]);\n\n const handleMouseLeave = useCallback(() => setHovered(false), [setHovered]);\n\n const TooltipContent = useCallback(\n () => <span className={style.tooltipContentWrapper}>{tooltipText || ariaLabel}</span>,\n [tooltipText, ariaLabel]\n );\n\n const renderToolTip = () => {\n const closeToolTipInformationTextAriaLabel = tooltipText || ariaLabel;\n if (!closeToolTipInformationTextAriaLabel) return null;\n return (\n <ToolTip\n fontSize={12}\n anchorId=\"button-icon\"\n toolTipIsVisible={hovered}\n placement={tooltipPlacement}\n TooltipContent={TooltipContent}\n closeToolTipInformationTextAriaLabel={closeToolTipInformationTextAriaLabel}\n />\n );\n };\n\n const _customStyle = useMemo(() => {\n return {\n ...customStyle,\n ...((hoverBackgroundColor || hoverColor) && hovered\n ? {\n backgroundColor: hoverBackgroundColor,\n color: hoverColor\n }\n : null)\n };\n }, [hoverBackgroundColor, hoverColor, hovered, customStyle]);\n\n if (link) {\n return (\n <Link\n {...link}\n {...(useTitle && {\n title: ariaLabel || label\n })}\n className={styleButton}\n style={customStyle}\n data-name={dataName}\n data-testid={dataTestId}\n aria-label={ariaLabel || label}\n hoverColor={hoverColor}\n hoverBackgroundColor={hoverBackgroundColor}\n onMouseEnter={handleMouseOver}\n onMouseLeave={handleMouseLeave}\n >\n {getButtonContent(icon, content ?? label, hovered, hoverBackgroundColor, hoverColor)}\n {renderToolTip()}\n </Link>\n );\n }\n\n return (\n <button\n {...(useTitle && {\n title: ariaLabel || label\n })}\n {...(ariaLabel && !label\n ? {\n 'data-for': 'button-icon',\n 'data-tip': hovered\n }\n : {})}\n // eslint-disable-next-line react/button-has-type\n type={usage}\n aria-label={ariaLabel || label}\n data-name={dataName}\n data-testid={dataTestId}\n style={_customStyle}\n className={styleButton}\n onClick={handleOnClick}\n onKeyDown={handleOnKeyDown}\n onMouseOver={handleMouseOver}\n onMouseLeave={handleMouseLeave}\n tabIndex={0}\n disabled={disabled}\n >\n {getButtonContent(icon, content ?? label, hovered, hoverBackgroundColor, hoverColor)}\n {renderToolTip()}\n </button>\n );\n};\n\nButtonLink.propTypes = propTypes;\n\nexport default ButtonLink;\n"],"mappings":";;AAAA,OAAOA,KAAK,IAAGC,WAAW,EAAEC,QAAQ,EAAEC,OAAO,QAAO,OAAO;AAE3D,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,IAAI,MAAM,SAAS;AAC1B,OAAOC,MAAM,IAAGC,kBAAkB,QAAO,SAAS;AAClD,SAAQC,KAAK,QAAO,yBAAyB;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C7Bc,YAAY,EAAEb,gBAAiB;IAC/Be,QAAQ,EAAE,CAAE;IACZvC,QAAQ,EAAEA;EAAS,IAElB5B,gBAAgB,CAACC,IAAI,EAAEC,OAAO,IAAIW,KAAK,EAAEV,OAAO,EAAEC,oBAAoB,EAAEC,UAAU,CAAC,EACnFkD,aAAa,CAAC,CACT,CAAC;AAEb,CAAC;AAED9B,UAAU,CAAC3B,SAAS,GAAAsE,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGxE,SAAS;AAEhC,eAAe2B,UAAU","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["React","useCallback","useState","useMemo","classnames","Link","FaIcon","DEFAULT_ICON_COLOR","ICONS","ToolTip","propTypes","style","getButtonContent","icon","content","hovered","hoverBackgroundColor","hoverColor","type","faIcon","position","Icon","createElement","className","buttonContent","label","iconComponent","iconName","name","iconColor","color","backgroundColor","size","faSize","wrapperSize","customStyle","theme","ButtonLink","props","usage","disabled","dataName","dataTestId","ariaLabel","tooltipText","tooltipPlacement","link","onClick","_noop","onKeyDown","useTitle","styleButton","button","iconButton","primary","secondary","tertiary","text","dangerous","setHovered","handleOnClick","event","handleOnKeyDown","handleMouseOver","handleMouseLeave","TooltipContent","tooltipContentWrapper","renderToolTip","closeToolTipInformationTextAriaLabel","fontSize","anchorId","toolTipIsVisible","placement","_customStyle","_extends","title","onMouseEnter","onMouseLeave","onMouseOver","tabIndex","process","env","NODE_ENV"],"sources":["../../../src/atom/button-link/index.tsx"],"sourcesContent":["import React, {useCallback, useState, useMemo} from 'react';\nimport {noop} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Link from '../link';\nimport FaIcon, {DEFAULT_ICON_COLOR, IconProps} from '../icon';\nimport {ICONS} from '../../util/button-icons';\nimport ToolTip from '../tooltip';\nimport propTypes, {ButtonLinkProps, IconType} from './types';\nimport style from './style.css';\n\nconst getButtonContent = (\n icon?: IconType,\n content?: string | React.ReactNode,\n hovered?: boolean,\n hoverBackgroundColor?: string,\n hoverColor?: string\n) => {\n const {type, faIcon, position} = icon || {type: '', position: ''};\n const Icon = type && ICONS[type];\n\n if (!Icon && !faIcon) {\n return (\n <div className={style.buttonContent}>\n <span className={style.label}>{content}</span>\n </div>\n );\n }\n\n const iconComponent = faIcon ? (\n <FaIcon\n {...({\n iconName: faIcon.name,\n iconColor: hovered && hoverColor ? hoverColor : faIcon.color ?? DEFAULT_ICON_COLOR,\n // eslint-disable-next-line no-nested-ternary\n backgroundColor: !faIcon?.backgroundColor\n ? null\n : hovered && hoverBackgroundColor\n ? hoverBackgroundColor\n : faIcon.backgroundColor,\n size: {\n faSize: faIcon.size,\n wrapperSize: faIcon.size\n },\n customStyle: faIcon.customStyle\n } as IconProps)}\n />\n ) : (\n <Icon className={style.icon} theme=\"coorpmanager\" />\n );\n\n return (\n <div className={style.buttonContent}>\n {position === 'left' ? iconComponent : null}\n {content ? <span className={style.label}>{content}</span> : null}\n {position === 'right' ? iconComponent : null}\n </div>\n );\n};\n\nconst ButtonLink = (props: ButtonLinkProps) => {\n const {\n type,\n usage = 'button',\n label,\n content,\n hoverBackgroundColor,\n hoverColor,\n disabled = false,\n icon,\n 'data-name': dataName,\n 'data-testid': dataTestId = 'button-link',\n 'aria-label': ariaLabel,\n tooltipText,\n tooltipPlacement = 'left',\n link,\n onClick = noop,\n onKeyDown = noop,\n className,\n customStyle,\n useTitle = true\n } = props;\n const styleButton = classnames(\n link && style.link,\n className,\n style.button,\n !label && style.iconButton,\n type === 'primary' && style.primary,\n type === 'secondary' && style.secondary,\n type === 'tertiary' && style.tertiary,\n type === 'text' && style.text,\n type === 'dangerous' && style.dangerous,\n disabled && style.disabled\n );\n\n const [hovered, setHovered] = useState(false);\n\n const handleOnClick = useCallback(event => onClick(event), [onClick]);\n\n const handleOnKeyDown = useCallback(event => onKeyDown(event), [onKeyDown]);\n\n const handleMouseOver = useCallback(() => {\n setHovered(true);\n }, [setHovered]);\n\n const handleMouseLeave = useCallback(() => setHovered(false), [setHovered]);\n\n const TooltipContent = useCallback(\n () => <span className={style.tooltipContentWrapper}>{tooltipText || ariaLabel}</span>,\n [tooltipText, ariaLabel]\n );\n\n const renderToolTip = () => {\n const closeToolTipInformationTextAriaLabel = tooltipText || ariaLabel;\n if (!closeToolTipInformationTextAriaLabel) return null;\n return (\n <ToolTip\n fontSize={12}\n anchorId=\"button-icon\"\n toolTipIsVisible={hovered}\n placement={tooltipPlacement}\n TooltipContent={TooltipContent}\n closeToolTipInformationTextAriaLabel={closeToolTipInformationTextAriaLabel}\n />\n );\n };\n\n const _customStyle = useMemo(() => {\n return {\n ...customStyle,\n ...((hoverBackgroundColor || hoverColor) && hovered\n ? {\n backgroundColor: hoverBackgroundColor,\n color: hoverColor\n }\n : null)\n };\n }, [hoverBackgroundColor, hoverColor, hovered, customStyle]);\n\n if (link) {\n return (\n <Link\n {...link}\n {...(useTitle && {\n title: ariaLabel || label\n })}\n className={styleButton}\n style={customStyle}\n data-name={dataName}\n data-testid={dataTestId}\n aria-label={ariaLabel || label}\n hoverColor={hoverColor}\n hoverBackgroundColor={hoverBackgroundColor}\n onMouseEnter={handleMouseOver}\n onMouseLeave={handleMouseLeave}\n >\n {getButtonContent(icon, content ?? label, hovered, hoverBackgroundColor, hoverColor)}\n {renderToolTip()}\n </Link>\n );\n }\n\n return (\n <button\n {...(useTitle && {\n title: ariaLabel || label\n })}\n {...(ariaLabel && !label\n ? {\n 'data-for': 'button-icon',\n 'data-tip': hovered\n }\n : {})}\n // eslint-disable-next-line react/button-has-type\n type={usage}\n aria-label={ariaLabel || label}\n data-name={dataName}\n data-testid={dataTestId}\n style={_customStyle}\n className={styleButton}\n onClick={handleOnClick}\n onKeyDown={handleOnKeyDown}\n onMouseOver={handleMouseOver}\n onMouseLeave={handleMouseLeave}\n tabIndex={0}\n disabled={disabled}\n >\n {getButtonContent(icon, content ?? label, hovered, hoverBackgroundColor, hoverColor)}\n {renderToolTip()}\n </button>\n );\n};\n\nButtonLink.propTypes = propTypes;\n\nexport default ButtonLink;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AAEqB,KAAM;IACZ,cAAYI,SAAS,IAAIlB,KAAM;IAC/B,aAAWgB,QAAS;IACpB,eAAaC,UAAW;IACxB/B,KAAK,EAAE8D,YAAa;IACpBlD,SAAS,EAAE4B,WAAY;IACvBJ,OAAO,EAAEa,aAAc;IACvBX,SAAS,EAAEa,eAAgB;IAC3BgB,WAAW,EAAEf,eAAgB;IAC7Bc,YAAY,EAAEb,gBAAiB;IAC/Be,QAAQ,EAAE,CAAE;IACZvC,QAAQ,EAAEA;EAAS,IAElB5B,gBAAgB,CAACC,IAAI,EAAEC,OAAO,IAAIW,KAAK,EAAEV,OAAO,EAAEC,oBAAoB,EAAEC,UAAU,CAAC,EACnFkD,aAAa,CAAC,CACT,CAAC;AAEb,CAAC;AAED9B,UAAU,CAAC3B,SAAS,GAAAsE,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGxE,SAAS;AAEhC,eAAe2B,UAAU","ignoreList":[]}
@@ -22,7 +22,7 @@
22
22
  align-items: center;
23
23
  cursor: pointer;
24
24
  border: none;
25
- padding: 0px 16px;
25
+ padding: 12px 16px;
26
26
  /* prevents text selection when dragging
27
27
  the mouse over the button */
28
28
  user-select: none;
@@ -39,6 +39,7 @@
39
39
  }
40
40
 
41
41
  .buttonContent {
42
+ gap: 8px;
42
43
  display: flex;
43
44
  justify-content: center;
44
45
  align-items: center;
@@ -55,7 +56,6 @@
55
56
  }
56
57
 
57
58
  .label {
58
- margin: 0 8px 0 8px;
59
59
  text-wrap: nowrap;
60
60
  display: block;
61
61
  }
@@ -9,16 +9,14 @@ export declare const iconPropTypes: {
9
9
  color: PropTypes.Requireable<string>;
10
10
  backgroundColor: PropTypes.Requireable<string>;
11
11
  size: PropTypes.Requireable<number>;
12
- customStyle: PropTypes.Requireable<{
13
- [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
14
- }>;
12
+ customStyle: PropTypes.Requireable<object>;
15
13
  }>>;
16
14
  };
17
15
  declare const propTypes: {
18
16
  type: PropTypes.Requireable<string>;
19
17
  usage: PropTypes.Requireable<string>;
20
18
  label: PropTypes.Requireable<string>;
21
- content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
19
+ content: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike | PropTypes.InferProps<{}>>>;
22
20
  'aria-label': PropTypes.Requireable<string>;
23
21
  tooltipText: PropTypes.Requireable<string>;
24
22
  tooltipPlacement: PropTypes.Requireable<string>;
@@ -32,9 +30,7 @@ declare const propTypes: {
32
30
  color: PropTypes.Requireable<string>;
33
31
  backgroundColor: PropTypes.Requireable<string>;
34
32
  size: PropTypes.Requireable<number>;
35
- customStyle: PropTypes.Requireable<{
36
- [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
37
- }>;
33
+ customStyle: PropTypes.Requireable<object>;
38
34
  }>>;
39
35
  }>>;
40
36
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
@@ -47,9 +43,7 @@ declare const propTypes: {
47
43
  hoverColor: PropTypes.Requireable<string>;
48
44
  disabled: PropTypes.Requireable<boolean>;
49
45
  className: PropTypes.Requireable<string>;
50
- customStyle: PropTypes.Requireable<{
51
- [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
52
- }>;
46
+ customStyle: PropTypes.Requireable<object>;
53
47
  };
54
48
  export declare type FaIconType = {
55
49
  name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atom/button-link/types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAC,KAAK,EAAC,MAAM,yBAAyB,CAAC;AAU9C,eAAO,MAAM,aAAa;;;;;;;;;;;;CAIzB,CAAC;AAEF,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsBd,CAAC;AAEF,oBAAY,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,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AAgB,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;IACvD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,IAAI,CAAC,EAAE;QACL,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,MAAM,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;KAClD,CAAC;IACF,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,oBAAY,OAAO,GAAG;IAAC,KAAK,EAAE,eAAe,CAAA;CAAC,CAAC;AAE/C,eAAe,SAAS,CAAC"}
@@ -6,7 +6,7 @@ const faIconPropTypes = {
6
6
  color: PropTypes.string,
7
7
  backgroundColor: PropTypes.string,
8
8
  size: PropTypes.number,
9
- customStyle: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number]))
9
+ customStyle: PropTypes.object
10
10
  };
11
11
  export const iconPropTypes = {
12
12
  position: PropTypes.oneOf(['right', 'left']),
@@ -17,7 +17,7 @@ const propTypes = {
17
17
  type: PropTypes.oneOf(['primary', 'secondary', 'tertiary', 'text', 'dangerous']),
18
18
  usage: PropTypes.oneOf(['button', 'submit', 'reset']),
19
19
  label: PropTypes.string,
20
- content: PropTypes.node,
20
+ content: PropTypes.oneOfType([PropTypes.node, PropTypes.shape({})]),
21
21
  'aria-label': PropTypes.string,
22
22
  tooltipText: PropTypes.string,
23
23
  tooltipPlacement: PropTypes.oneOf(['left', 'right', 'top', 'bottom']),
@@ -34,7 +34,7 @@ const propTypes = {
34
34
  hoverColor: PropTypes.string,
35
35
  disabled: PropTypes.bool,
36
36
  className: PropTypes.string,
37
- customStyle: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number]))
37
+ customStyle: PropTypes.object
38
38
  };
39
39
  export default propTypes;
40
40
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":["PropTypes","ICONS","faIconPropTypes","name","string","isRequired","color","backgroundColor","size","number","customStyle","objectOf","oneOfType","iconPropTypes","position","oneOf","type","_keys","faIcon","shape","propTypes","usage","label","content","node","tooltipText","tooltipPlacement","icon","onClick","func","link","href","download","bool","target","hoverBackgroundColor","hoverColor","disabled","className"],"sources":["../../../src/atom/button-link/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport {keys} from 'lodash/fp';\nimport {ICONS} from '../../util/button-icons';\n\nconst faIconPropTypes = {\n name: PropTypes.string.isRequired,\n color: PropTypes.string,\n backgroundColor: PropTypes.string,\n size: PropTypes.number,\n customStyle: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number]))\n};\n\nexport const iconPropTypes = {\n position: PropTypes.oneOf(['right', 'left']),\n type: PropTypes.oneOf(keys(ICONS)),\n faIcon: PropTypes.shape(faIconPropTypes)\n};\n\nconst propTypes = {\n type: PropTypes.oneOf(['primary', 'secondary', 'tertiary', 'text', 'dangerous']),\n usage: PropTypes.oneOf(['button', 'submit', 'reset']),\n label: PropTypes.string,\n content: PropTypes.node,\n 'aria-label': PropTypes.string,\n tooltipText: PropTypes.string,\n tooltipPlacement: PropTypes.oneOf(['left', 'right', 'top', 'bottom']),\n 'data-name': PropTypes.string,\n 'data-testid': PropTypes.string,\n icon: PropTypes.shape(iconPropTypes),\n onClick: PropTypes.func,\n link: PropTypes.shape({\n href: PropTypes.string,\n download: PropTypes.bool,\n target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top'])\n }),\n hoverBackgroundColor: PropTypes.string,\n hoverColor: PropTypes.string,\n disabled: PropTypes.bool,\n className: PropTypes.string,\n customStyle: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number]))\n};\n\nexport type FaIconType = {\n name: string;\n color?: string;\n backgroundColor?: string;\n size?: number;\n customStyle?: Record<string, unknown>;\n};\n\nexport type IconType = {\n position: 'right' | 'left';\n type?: keyof typeof ICONS;\n faIcon?: FaIconType;\n};\n\nexport type ButtonLinkProps = {\n type?: 'primary' | 'secondary' | 'tertiary' | 'text' | 'dangerous';\n usage?: 'button' | 'submit' | 'reset';\n label?: string;\n content?: React.ReactNode;\n 'aria-label'?: string;\n tooltipText?: string;\n tooltipPlacement?: 'left' | 'right' | 'top' | 'bottom';\n 'data-name'?: string;\n 'data-testid'?: string;\n icon?: IconType;\n onClick?: () => void;\n onKeyDown?: () => void;\n link?: {\n href?: string;\n download?: boolean;\n target?: '_self' | '_blank' | '_parent' | '_top';\n };\n hoverBackgroundColor?: string;\n hoverColor?: string;\n disabled?: boolean;\n className?: string;\n customStyle?: Record<string, unknown>;\n useTitle?: boolean;\n};\n\nexport type Fixture = {props: ButtonLinkProps};\n\nexport default propTypes;\n"],"mappings":";AAAA,OAAOA,SAAS,MAAM,YAAY;AAElC,SAAQC,KAAK,QAAO,yBAAyB;AAE7C,MAAMC,eAAe,GAAG;EACtBC,IAAI,EAAEH,SAAS,CAACI,MAAM,CAACC,UAAU;EACjCC,KAAK,EAAEN,SAAS,CAACI,MAAM;EACvBG,eAAe,EAAEP,SAAS,CAACI,MAAM;EACjCI,IAAI,EAAER,SAAS,CAACS,MAAM;EACtBC,WAAW,EAAEV,SAAS,CAACW,QAAQ,CAACX,SAAS,CAACY,SAAS,CAAC,CAACZ,SAAS,CAACI,MAAM,EAAEJ,SAAS,CAACS,MAAM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,oBAAoB,EAAEnC,SAAS,CAACI,MAAM;EACtCgC,UAAU,EAAEpC,SAAS,CAACI,MAAM;EAC5BiC,QAAQ,EAAErC,SAAS,CAACiC,IAAI;EACxBK,SAAS,EAAEtC,SAAS,CAACI,MAAM;EAC3BM,WAAW,EAAEV,SAAS,CAACW,QAAQ,CAACX,SAAS,CAACY,SAAS,CAAC,CAACZ,SAAS,CAACI,MAAM,EAAEJ,SAAS,CAACS,MAAM,CAAC,CAAC;AAC3F,CAAC;AA4CD,eAAeW,SAAS","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":["PropTypes","ICONS","faIconPropTypes","name","string","isRequired","color","backgroundColor","size","number","customStyle","object","iconPropTypes","position","oneOf","type","_keys","faIcon","shape","propTypes","usage","label","content","oneOfType","node","tooltipText","tooltipPlacement","icon","onClick","func","link","href","download","bool","target","hoverBackgroundColor","hoverColor","disabled","className"],"sources":["../../../src/atom/button-link/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport {keys} from 'lodash/fp';\nimport {ICONS} from '../../util/button-icons';\n\nconst faIconPropTypes = {\n name: PropTypes.string.isRequired,\n color: PropTypes.string,\n backgroundColor: PropTypes.string,\n size: PropTypes.number,\n customStyle: PropTypes.object\n};\n\nexport const iconPropTypes = {\n position: PropTypes.oneOf(['right', 'left']),\n type: PropTypes.oneOf(keys(ICONS)),\n faIcon: PropTypes.shape(faIconPropTypes)\n};\n\nconst propTypes = {\n type: PropTypes.oneOf(['primary', 'secondary', 'tertiary', 'text', 'dangerous']),\n usage: PropTypes.oneOf(['button', 'submit', 'reset']),\n label: PropTypes.string,\n content: PropTypes.oneOfType([PropTypes.node, PropTypes.shape({})]),\n 'aria-label': PropTypes.string,\n tooltipText: PropTypes.string,\n tooltipPlacement: PropTypes.oneOf(['left', 'right', 'top', 'bottom']),\n 'data-name': PropTypes.string,\n 'data-testid': PropTypes.string,\n icon: PropTypes.shape(iconPropTypes),\n onClick: PropTypes.func,\n link: PropTypes.shape({\n href: PropTypes.string,\n download: PropTypes.bool,\n target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top'])\n }),\n hoverBackgroundColor: PropTypes.string,\n hoverColor: PropTypes.string,\n disabled: PropTypes.bool,\n className: PropTypes.string,\n customStyle: PropTypes.object\n};\n\nexport type FaIconType = {\n name: string;\n color?: string;\n backgroundColor?: string;\n size?: number;\n customStyle?: Record<string, unknown>;\n};\n\nexport type IconType = {\n position: 'right' | 'left';\n type?: keyof typeof ICONS;\n faIcon?: FaIconType;\n};\n\nexport type ButtonLinkProps = {\n type?: 'primary' | 'secondary' | 'tertiary' | 'text' | 'dangerous';\n usage?: 'button' | 'submit' | 'reset';\n label?: string;\n content?: React.ReactNode;\n 'aria-label'?: string;\n tooltipText?: string;\n tooltipPlacement?: 'left' | 'right' | 'top' | 'bottom';\n 'data-name'?: string;\n 'data-testid'?: string;\n icon?: IconType;\n onClick?: () => void;\n onKeyDown?: () => void;\n link?: {\n href?: string;\n download?: boolean;\n target?: '_self' | '_blank' | '_parent' | '_top';\n };\n hoverBackgroundColor?: string;\n hoverColor?: string;\n disabled?: boolean;\n className?: string;\n customStyle?: Record<string, unknown>;\n useTitle?: boolean;\n};\n\nexport type Fixture = {props: ButtonLinkProps};\n\nexport default propTypes;\n"],"mappings":";AAAA,OAAOA,SAAS,MAAM,YAAY;AAElC,SAAQC,KAAK,QAAO,yBAAyB;AAE7C,MAAMC,eAAe,GAAG;EACtBC,IAAI,EAAEH,SAAS,CAACI,MAAM,CAACC,UAAU;EACjCC,KAAK,EAAEN,SAAS,CAACI,MAAM;EACvBG,eAAe,EAAEP,SAAS,CAACI,MAAM;EACjCI,IAAI,EAAER,SAAS,CAACS,MAAM;EACtBC,WAAW,EAAEV,SAAS,CAACW;AACzB,CAAC;AAED,OAAO,MAAMC,aAAa,GAAG;EAC3BC,QAAQ,EAAEb,SAAS,CAACc,KAAK,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;EAC5CC,IAAI,EAAEf,SAAS,CAACc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AC5BiC,QAAQ,EAAErC,SAAS,CAACiC,IAAI;EACxBK,SAAS,EAAEtC,SAAS,CAACI,MAAM;EAC3BM,WAAW,EAAEV,SAAS,CAACW;AACzB,CAAC;AA4CD,eAAeQ,SAAS","ignoreList":[]}
@@ -19,9 +19,7 @@ declare const ButtonMenu: {
19
19
  color: import("prop-types").Requireable<string>;
20
20
  backgroundColor: import("prop-types").Requireable<string>;
21
21
  size: import("prop-types").Requireable<number>;
22
- customStyle: import("prop-types").Requireable<{
23
- [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
24
- }>;
22
+ customStyle: import("prop-types").Requireable<object>;
25
23
  }>>;
26
24
  }>>;
27
25
  customStyle: import("prop-types").Requireable<{
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button-menu/index.tsx"],"names":[],"mappings":";AAMA,OAAkB,EAAC,eAAe,EAA+B,MAAM,SAAS,CAAC;AAgEjF,QAAA,MAAM,UAAU;YAAW,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiBzC,CAAC;AAIF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button-menu/index.tsx"],"names":[],"mappings":";AAMA,OAAkB,EAAC,eAAe,EAA+B,MAAM,SAAS,CAAC;AAgEjF,QAAA,MAAM,UAAU;YAAW,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiBzC,CAAC;AAIF,eAAe,UAAU,CAAC"}
@@ -16,9 +16,7 @@ export declare const buttonPropTypes: {
16
16
  color: PropTypes.Requireable<string>;
17
17
  backgroundColor: PropTypes.Requireable<string>;
18
18
  size: PropTypes.Requireable<number>;
19
- customStyle: PropTypes.Requireable<{
20
- [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
21
- }>;
19
+ customStyle: PropTypes.Requireable<object>;
22
20
  }>>;
23
21
  }>>;
24
22
  customStyle: PropTypes.Requireable<{
@@ -42,9 +40,7 @@ declare const propTypes: {
42
40
  color: PropTypes.Requireable<string>;
43
41
  backgroundColor: PropTypes.Requireable<string>;
44
42
  size: PropTypes.Requireable<number>;
45
- customStyle: PropTypes.Requireable<{
46
- [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
47
- }>;
43
+ customStyle: PropTypes.Requireable<object>;
48
44
  }>>;
49
45
  }>>;
50
46
  customStyle: PropTypes.Requireable<{
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atom/button-menu/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAC,eAAe,EAAE,QAAQ,EAAgB,MAAM,sBAAsB,CAAC;AAE9E,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;CAY3B,CAAC;AAEF,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAId,CAAC;AAEF,eAAe,SAAS,CAAC;AAEzB,oBAAY,KAAK,GAAG,UAAU,GAAG,WAAW,GAAG,SAAS,CAAC;AAEzD,oBAAY,WAAW,GAAG,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG;IACjE,IAAI,CAAC,EAAE,SAAS,GAAG,aAAa,GAAG,WAAW,GAAG,eAAe,CAAC;IACjE,cAAc,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;IACzC,IAAI,CAAC,EAAE,QAAQ,GAAG;QAAC,KAAK,CAAC,EAAE,KAAK,CAAA;KAAC,CAAC;CACnC,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC5B,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,oBAAY,sBAAsB,GAAG;IAAC,KAAK,EAAE,eAAe,CAAA;CAAC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atom/button-menu/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAC,eAAe,EAAE,QAAQ,EAAgB,MAAM,sBAAsB,CAAC;AAE9E,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;CAY3B,CAAC;AAEF,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;CAId,CAAC;AAEF,eAAe,SAAS,CAAC;AAEzB,oBAAY,KAAK,GAAG,UAAU,GAAG,WAAW,GAAG,SAAS,CAAC;AAEzD,oBAAY,WAAW,GAAG,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG;IACjE,IAAI,CAAC,EAAE,SAAS,GAAG,aAAa,GAAG,WAAW,GAAG,eAAe,CAAC;IACjE,cAAc,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;IACzC,IAAI,CAAC,EAAE,QAAQ,GAAG;QAAC,KAAK,CAAC,EAAE,KAAK,CAAA;KAAC,CAAC;CACnC,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC5B,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,oBAAY,sBAAsB,GAAG;IAAC,KAAK,EAAE,eAAe,CAAA;CAAC,CAAC"}
@@ -1,22 +1,40 @@
1
- export const DEFAULT_ICON_COLOR: "hsl(0, 0%, 32%)";
2
- export function getForegroundColor(backgroundColor: any): any;
3
- export namespace iconPropTypes {
4
- const iconName: PropTypes.Validator<string>;
5
- const iconColor: PropTypes.Requireable<string>;
6
- const backgroundColor: PropTypes.Requireable<string>;
7
- const gradientBackground: PropTypes.Requireable<boolean>;
8
- const borderRadius: PropTypes.Requireable<string>;
9
- const preset: PropTypes.Requireable<string>;
10
- const size: PropTypes.Requireable<PropTypes.InferProps<{
11
- faSize: PropTypes.Requireable<number>;
12
- wrapperSize: PropTypes.Requireable<number>;
1
+ import React, { CSSProperties } from 'react';
2
+ import PropTypes from 'prop-types';
3
+ export declare const DEFAULT_PRESET = "m";
4
+ export declare const ICON_LUMINOSITY = 32;
5
+ export declare const DEFAULT_WRAPPER_SIZE = 40;
6
+ export declare const ICON_PADDING = 8;
7
+ export declare const DEFAULT_ICON_COLOR = "hsl(0, 0%, 32%)";
8
+ export interface IconSize {
9
+ faSize: number;
10
+ wrapperSize: number;
11
+ }
12
+ export interface IconProps {
13
+ iconName: string;
14
+ iconColor?: string;
15
+ backgroundColor?: string;
16
+ gradientBackground?: boolean;
17
+ borderRadius?: string;
18
+ preset?: string;
19
+ size?: IconSize;
20
+ customStyle?: CSSProperties;
21
+ }
22
+ export declare function getForegroundColor(backgroundColor: string): string;
23
+ declare const Icon: React.FC<IconProps>;
24
+ export declare const propTypes: {
25
+ iconName: PropTypes.Validator<string>;
26
+ iconColor: PropTypes.Requireable<string>;
27
+ backgroundColor: PropTypes.Requireable<string>;
28
+ gradientBackground: PropTypes.Requireable<boolean>;
29
+ borderRadius: PropTypes.Requireable<string>;
30
+ preset: PropTypes.Requireable<string>;
31
+ size: PropTypes.Requireable<PropTypes.InferProps<{
32
+ faSize: PropTypes.Validator<number>;
33
+ wrapperSize: PropTypes.Validator<number>;
13
34
  }>>;
14
- const customStyle: PropTypes.Requireable<{
35
+ customStyle: PropTypes.Requireable<{
15
36
  [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
16
37
  }>;
17
- }
38
+ };
18
39
  export default Icon;
19
- import PropTypes from "prop-types";
20
- declare const Icon: React.NamedExoticComponent<object>;
21
- import React from "react";
22
40
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/icon/index.js"],"names":[],"mappings":"AAkBA,mDAAoD;AAiB7C,8DAC8D;;;;;;;;;;;;;;;;;;AAGrE,uDAsCG"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/icon/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,aAAa,EAAC,MAAM,OAAO,CAAC;AAC3C,OAAO,SAAS,MAAM,YAAY,CAAC;AAanC,eAAO,MAAM,cAAc,MAAM,CAAC;AAClC,eAAO,MAAM,eAAe,KAAK,CAAC;AAClC,eAAO,MAAM,oBAAoB,KAAK,CAAC;AACvC,eAAO,MAAM,YAAY,IAAI,CAAC;AAC9B,eAAO,MAAM,kBAAkB,oBAAoB,CAAC;AAEpD,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,WAAW,CAAC,EAAE,aAAa,CAAC;CAC7B;AAED,wBAAgB,kBAAkB,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,CAElE;AAiBD,QAAA,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAiD7B,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;CAYrB,CAAC;AAUF,eAAe,IAAI,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import PropTypes, { number } from 'prop-types';
2
+ import PropTypes from 'prop-types';
3
3
  import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
4
4
  import { fas } from '@fortawesome/pro-solid-svg-icons';
5
5
  import { library } from '@fortawesome/fontawesome-svg-core';
@@ -10,11 +10,14 @@ import { convert } from 'css-color-function';
10
10
  import { createGradientBackground } from '../../util/get-background-gradient-color';
11
11
  import style from './style.css';
12
12
  library.add(fas);
13
- const DEFAULT_PRESET = 'm';
14
- const ICON_LUMINOSITY = 32;
15
- const DEFAULT_WRAPPER_SIZE = 40;
16
- const ICON_PADDING = 8;
13
+ export const DEFAULT_PRESET = 'm';
14
+ export const ICON_LUMINOSITY = 32;
15
+ export const DEFAULT_WRAPPER_SIZE = 40;
16
+ export const ICON_PADDING = 8;
17
17
  export const DEFAULT_ICON_COLOR = 'hsl(0, 0%, 32%)';
18
+ export function getForegroundColor(backgroundColor) {
19
+ return convert(`color(${backgroundColor} lightness(${ICON_LUMINOSITY}%))`);
20
+ }
18
21
  const SIZE_CONFIGS = {
19
22
  s: {
20
23
  faSize: 12,
@@ -29,10 +32,7 @@ const SIZE_CONFIGS = {
29
32
  wrapperSize: 48
30
33
  }
31
34
  };
32
- export const getForegroundColor = backgroundColor => convert(`color(${backgroundColor} lightness(${ICON_LUMINOSITY}%))`);
33
- // set lightness to 32%
34
-
35
- const Icon = /*#__PURE__*/React.memo(function Icon({
35
+ const Icon = ({
36
36
  iconName,
37
37
  iconColor,
38
38
  backgroundColor,
@@ -41,9 +41,18 @@ const Icon = /*#__PURE__*/React.memo(function Icon({
41
41
  preset = DEFAULT_PRESET,
42
42
  size,
43
43
  customStyle
44
- }) {
44
+ }) => {
45
45
  const effectiveIconColor = iconColor || (backgroundColor ? getForegroundColor(backgroundColor) : DEFAULT_ICON_COLOR);
46
46
  const effectiveSize = size ? merge(SIZE_CONFIGS[DEFAULT_PRESET], size) : getOr(SIZE_CONFIGS[DEFAULT_PRESET], toLower(preset), SIZE_CONFIGS);
47
+ const hasBackground = backgroundColor || gradientBackground;
48
+ if (!hasBackground) {
49
+ return /*#__PURE__*/React.createElement(FontAwesomeIcon, {
50
+ icon: `fa-${iconName}`,
51
+ color: effectiveIconColor,
52
+ fontSize: effectiveSize.faSize,
53
+ style: customStyle
54
+ });
55
+ }
47
56
  const wrapperSize = effectiveSize.wrapperSize - ICON_PADDING * 2;
48
57
  const iconWrapperStyle = {
49
58
  background: gradientBackground ? createGradientBackground(effectiveIconColor, '81%', '91%') : backgroundColor,
@@ -63,8 +72,8 @@ const Icon = /*#__PURE__*/React.memo(function Icon({
63
72
  color: effectiveIconColor,
64
73
  fontSize: effectiveSize.faSize
65
74
  }));
66
- });
67
- export const iconPropTypes = {
75
+ };
76
+ export const propTypes = {
68
77
  iconName: PropTypes.string.isRequired,
69
78
  iconColor: PropTypes.string,
70
79
  backgroundColor: PropTypes.string,
@@ -72,11 +81,19 @@ export const iconPropTypes = {
72
81
  borderRadius: PropTypes.string,
73
82
  preset: PropTypes.oneOf(['s', 'm', 'xl']),
74
83
  size: PropTypes.shape({
75
- faSize: number,
76
- wrapperSize: PropTypes.number
84
+ faSize: PropTypes.number.isRequired,
85
+ wrapperSize: PropTypes.number.isRequired
77
86
  }),
78
87
  customStyle: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number]))
79
88
  };
80
- Icon.propTypes = process.env.NODE_ENV !== "production" ? iconPropTypes : {};
89
+
90
+ // const MemoizedIcon = React.memo(Icon) as React.MemoExoticComponent<React.FC<IconProps>> & {
91
+ // propTypes?: React.WeakValidationMap<IconProps>;
92
+ // defaultProps?: Partial<IconProps>;
93
+ // };
94
+
95
+ Icon.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
96
+ // MemoizedIcon.propTypes = Icon.propTypes;
97
+
81
98
  export default Icon;
82
99
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","PropTypes","number","FontAwesomeIcon","fas","library","toLower","merge","getOr","convert","createGradientBackground","style","add","DEFAULT_PRESET","ICON_LUMINOSITY","DEFAULT_WRAPPER_SIZE","ICON_PADDING","DEFAULT_ICON_COLOR","SIZE_CONFIGS","s","faSize","wrapperSize","m","xl","getForegroundColor","backgroundColor","Icon","memo","iconName","iconColor","gradientBackground","borderRadius","preset","size","customStyle","effectiveIconColor","effectiveSize","iconWrapperStyle","background","width","height","padding","createElement","className","iconWrapper","icon","color","fontSize","iconPropTypes","string","isRequired","bool","oneOf","shape","objectOf","oneOfType","propTypes","process","env","NODE_ENV"],"sources":["../../../src/atom/icon/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes, {number} from 'prop-types';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport {fas} from '@fortawesome/pro-solid-svg-icons';\nimport {library} from '@fortawesome/fontawesome-svg-core';\nimport toLower from 'lodash/fp/toLower';\nimport merge from 'lodash/fp/merge';\nimport getOr from 'lodash/fp/getOr';\nimport {convert} from 'css-color-function';\nimport {createGradientBackground} from '../../util/get-background-gradient-color';\nimport style from './style.css';\n\nlibrary.add(fas);\n\nconst DEFAULT_PRESET = 'm';\nconst ICON_LUMINOSITY = 32;\nconst DEFAULT_WRAPPER_SIZE = 40;\nconst ICON_PADDING = 8;\nexport const DEFAULT_ICON_COLOR = 'hsl(0, 0%, 32%)';\n\nconst SIZE_CONFIGS = {\n s: {\n faSize: 12,\n wrapperSize: 32\n },\n m: {\n faSize: 16,\n wrapperSize: DEFAULT_WRAPPER_SIZE\n },\n xl: {\n faSize: 20,\n wrapperSize: 48\n }\n};\n\nexport const getForegroundColor = backgroundColor =>\n convert(`color(${backgroundColor} lightness(${ICON_LUMINOSITY}%))`);\n// set lightness to 32%\n\nconst Icon = React.memo(function Icon({\n iconName,\n iconColor,\n backgroundColor,\n gradientBackground,\n borderRadius,\n preset = DEFAULT_PRESET,\n size,\n customStyle\n}) {\n const effectiveIconColor =\n iconColor || (backgroundColor ? getForegroundColor(backgroundColor) : DEFAULT_ICON_COLOR);\n\n const effectiveSize = size\n ? merge(SIZE_CONFIGS[DEFAULT_PRESET], size)\n : getOr(SIZE_CONFIGS[DEFAULT_PRESET], toLower(preset), SIZE_CONFIGS);\n\n const wrapperSize = effectiveSize.wrapperSize - ICON_PADDING * 2;\n\n const iconWrapperStyle = {\n background: gradientBackground\n ? createGradientBackground(effectiveIconColor, '81%', '91%')\n : backgroundColor,\n borderRadius,\n width: wrapperSize,\n height: wrapperSize,\n padding: ICON_PADDING\n };\n\n return (\n <div className={style.iconWrapper} style={{...iconWrapperStyle, ...customStyle}}>\n <FontAwesomeIcon\n icon={`fa-${iconName}`}\n color={effectiveIconColor}\n fontSize={effectiveSize.faSize}\n />\n </div>\n );\n});\n\nexport const iconPropTypes = {\n iconName: PropTypes.string.isRequired,\n iconColor: PropTypes.string,\n backgroundColor: PropTypes.string,\n gradientBackground: PropTypes.bool,\n borderRadius: PropTypes.string,\n preset: PropTypes.oneOf(['s', 'm', 'xl']),\n size: PropTypes.shape({\n faSize: number,\n wrapperSize: PropTypes.number\n }),\n customStyle: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number]))\n};\n\nIcon.propTypes = iconPropTypes;\n\nexport default Icon;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,IAAGC,MAAM,QAAO,YAAY;AAC5C,SAAQC,eAAe,QAAO,gCAAgC;AAC9D,SAAQC,GAAG,QAAO,kCAAkC;AACpD,SAAQC,OAAO,QAAO,mCAAmC;AACzD,OAAOC,OAAO,MAAM,mBAAmB;AACvC,OAAOC,KAAK,MAAM,iBAAiB;AACnC,OAAOC,KAAK,MAAM,iBAAiB;AACnC,SAAQC,OAAO,QAAO,oBAAoB;AAC1C,SAAQC,wBAAwB,QAAO,0CAA0C;AACjF,OAAOC,KAAK,MAAM,aAAa;AAE/BN,OAAO,CAACO,GAAG,CAACR,GAAG,CAAC;AAEhB,MAAMS,cAAc,GAAG,GAAG;AAC1B,MAAMC,eAAe,GAAG,EAAE;AAC1B,MAAMC,oBAAoB,GAAG,EAAE;AAC/B,MAAMC,YAAY,GAAG,CAAC;AACtB,OAAO,MAAMC,kBAAkB,GAAG,iBAAiB;AAEnD,MAAMC,YAAY,GAAG;EACnBC,CAAC,EAAE;IACDC,MAAM,EAAE,EAAE;IACVC,WAAW,EAAE;EACf,CAAC;EACDC,CAA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AA,CAACvC,eAAe;IACd0C,IAAI,EAAE,MAAMjB,QAAQ,EAAG;IACvBkB,KAAK,EAAEX,kBAAmB;IAC1BY,QAAQ,EAAEX,aAAa,CAAChB;EAAO,CAChC,CACE,CAAC;AAEV,CAAC,CAAC;AAEF,OAAO,MAAM4B,aAAa,GAAG;EAC3BpB,QAAQ,EAAE3B,SAAS,CAACgD,MAAM,CAACC,UAAU;EACrCrB,SAAS,EAAE5B,SAAS,CAACgD,MAAM;EAC3BxB,eAAe,EAAExB,SAAS,CAACgD,MAAM;EACjCnB,kBAAkB,EAAE7B,SAAS,CAACkD,IAAI;EAClCpB,YAAY,EAAE9B,SAAS,CAACgD,MAAM;EAC9BjB,MAAM,EAAE/B,SAAS,CAACmD,KAAK,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;EACzCnB,IAAI,EAAEhC,SAAS,CAACoD,KAAK,CAAC;IACpBjC,MAAM,EAAElB,MAAM;IACdmB,WAAW,EAAEpB,SAAS,CAACC;EACzB,CAAC,CAAC;EACFgC,WAAW,EAAEjC,SAAS,CAACqD,QAAQ,CAACrD,SAAS,CAACsD,SAAS,CAAC,CAACtD,SAAS,CAACgD,MAAM,EAAEhD,SAAS,CAACC,MAAM,CAAC,CAAC;AAC3F,CAAC;AAEDwB,IAAI,CAAC8B,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGX,aAAa;AAE9B,eAAetB,IAAI","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["React","PropTypes","FontAwesomeIcon","fas","library","toLower","merge","getOr","convert","createGradientBackground","style","add","DEFAULT_PRESET","ICON_LUMINOSITY","DEFAULT_WRAPPER_SIZE","ICON_PADDING","DEFAULT_ICON_COLOR","getForegroundColor","backgroundColor","SIZE_CONFIGS","s","faSize","wrapperSize","m","xl","Icon","iconName","iconColor","gradientBackground","borderRadius","preset","size","customStyle","effectiveIconColor","effectiveSize","hasBackground","createElement","icon","color","fontSize","iconWrapperStyle","background","width","height","padding","className","iconWrapper","propTypes","string","isRequired","bool","oneOf","shape","number","objectOf","oneOfType","process","env","NODE_ENV"],"sources":["../../../src/atom/icon/index.tsx"],"sourcesContent":["import React, {CSSProperties} from 'react';\nimport PropTypes from 'prop-types';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport {fas} from '@fortawesome/pro-solid-svg-icons';\nimport {IconName, library} from '@fortawesome/fontawesome-svg-core';\nimport toLower from 'lodash/fp/toLower';\nimport merge from 'lodash/fp/merge';\nimport getOr from 'lodash/fp/getOr';\nimport {convert} from 'css-color-function';\nimport {createGradientBackground} from '../../util/get-background-gradient-color';\nimport style from './style.css';\n\nlibrary.add(fas);\n\nexport const DEFAULT_PRESET = 'm';\nexport const ICON_LUMINOSITY = 32;\nexport const DEFAULT_WRAPPER_SIZE = 40;\nexport const ICON_PADDING = 8;\nexport const DEFAULT_ICON_COLOR = 'hsl(0, 0%, 32%)';\n\nexport interface IconSize {\n faSize: number;\n wrapperSize: number;\n}\n\nexport interface IconProps {\n iconName: string;\n iconColor?: string;\n backgroundColor?: string;\n gradientBackground?: boolean;\n borderRadius?: string;\n preset?: string;\n size?: IconSize;\n customStyle?: CSSProperties;\n}\n\nexport function getForegroundColor(backgroundColor: string): string {\n return convert(`color(${backgroundColor} lightness(${ICON_LUMINOSITY}%))`);\n}\n\nconst SIZE_CONFIGS: Record<'s' | 'm' | 'xl', IconSize> = {\n s: {\n faSize: 12,\n wrapperSize: 32\n },\n m: {\n faSize: 16,\n wrapperSize: DEFAULT_WRAPPER_SIZE\n },\n xl: {\n faSize: 20,\n wrapperSize: 48\n }\n};\n\nconst Icon: React.FC<IconProps> = ({\n iconName,\n iconColor,\n backgroundColor,\n gradientBackground,\n borderRadius,\n preset = DEFAULT_PRESET,\n size,\n customStyle\n}) => {\n const effectiveIconColor =\n iconColor || (backgroundColor ? getForegroundColor(backgroundColor) : DEFAULT_ICON_COLOR);\n\n const effectiveSize = size\n ? merge(SIZE_CONFIGS[DEFAULT_PRESET], size)\n : getOr(SIZE_CONFIGS[DEFAULT_PRESET], toLower(preset), SIZE_CONFIGS);\n\n const hasBackground = backgroundColor || gradientBackground;\n if (!hasBackground) {\n return (\n <FontAwesomeIcon\n icon={`fa-${iconName}` as IconName}\n color={effectiveIconColor}\n fontSize={effectiveSize.faSize}\n style={customStyle}\n />\n );\n }\n\n const wrapperSize = effectiveSize.wrapperSize - ICON_PADDING * 2;\n const iconWrapperStyle: CSSProperties = {\n background: gradientBackground\n ? createGradientBackground(effectiveIconColor, '81%', '91%')\n : backgroundColor,\n borderRadius,\n width: wrapperSize,\n height: wrapperSize,\n padding: ICON_PADDING\n };\n\n return (\n <div className={style.iconWrapper} style={{...iconWrapperStyle, ...customStyle}}>\n <FontAwesomeIcon\n icon={`fa-${iconName}` as IconName}\n color={effectiveIconColor}\n fontSize={effectiveSize.faSize}\n />\n </div>\n );\n};\n\nexport const propTypes = {\n iconName: PropTypes.string.isRequired,\n iconColor: PropTypes.string,\n backgroundColor: PropTypes.string,\n gradientBackground: PropTypes.bool,\n borderRadius: PropTypes.string,\n preset: PropTypes.oneOf(['s', 'm', 'xl']),\n size: PropTypes.shape({\n faSize: PropTypes.number.isRequired,\n wrapperSize: PropTypes.number.isRequired\n }),\n customStyle: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number]))\n};\n\n// const MemoizedIcon = React.memo(Icon) as React.MemoExoticComponent<React.FC<IconProps>> & {\n// propTypes?: React.WeakValidationMap<IconProps>;\n// defaultProps?: Partial<IconProps>;\n// };\n\nIcon.propTypes = propTypes;\n// MemoizedIcon.propTypes = Icon.propTypes;\n\nexport default Icon;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAuB,OAAO;AAC1C,OAAOC,SAAS,MAAM,YAAY;AAClC,SAAQC,eAAe,QAAO,gCAAgC;AAC9D,SAAQC,GAAG,QAAO,kCAAkC;AACpD,SAAkBC,OAAO,QAAO,mCAAmC;AACnE,OAAOC,OAAO,M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AACkD,KAAK,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;EACzCpB,IAAI,EAAE9B,SAAS,CAACmD,KAAK,CAAC;IACpB/B,MAAM,EAAEpB,SAAS,CAACoD,MAAM,CAACJ,UAAU;IACnC3B,WAAW,EAAErB,SAAS,CAACoD,MAAM,CAACJ;EAChC,CAAC,CAAC;EACFjB,WAAW,EAAE/B,SAAS,CAACqD,QAAQ,CAACrD,SAAS,CAACsD,SAAS,CAAC,CAACtD,SAAS,CAAC+C,MAAM,EAAE/C,SAAS,CAACoD,MAAM,CAAC,CAAC;AAC3F,CAAC;;AAED;AACA;AACA;AACA;;AAEA5B,IAAI,CAACsB,SAAS,GAAAS,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGX,SAAS;AAC1B;;AAEA,eAAetB,IAAI","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { RadioWithTitleProps } from './types';
3
3
  declare const RadioWithTitle: {
4
4
  (props: RadioWithTitleProps): JSX.Element;
@@ -10,7 +10,7 @@ declare const RadioWithTitle: {
10
10
  'data-name': import("prop-types").Requireable<string>;
11
11
  titleSize: import("prop-types").Requireable<string>;
12
12
  subtitleSize: import("prop-types").Requireable<string>;
13
- icon: import("prop-types").Requireable<import("prop-types").InferProps<any>>;
13
+ icon: import("prop-types").Requireable<import("prop-types").InferProps<import("prop-types").ValidationMap<any>>>;
14
14
  tag: import("prop-types").Requireable<import("prop-types").InferProps<{
15
15
  label: import("prop-types").Requireable<string>;
16
16
  type: import("prop-types").Requireable<string>;
@@ -18,13 +18,23 @@ declare const RadioWithTitle: {
18
18
  customStyle: import("prop-types").Requireable<{
19
19
  [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
20
20
  }>;
21
- icon: import("prop-types").Requireable<import("prop-types").InferProps<any>>;
21
+ icon: import("prop-types").Requireable<import("prop-types").InferProps<{
22
+ position: import("prop-types").Requireable<string>;
23
+ iconName?: React.Validator<string> | undefined;
24
+ iconColor?: React.Validator<string | null | undefined> | undefined;
25
+ backgroundColor?: React.Validator<string | null | undefined> | undefined;
26
+ gradientBackground?: React.Validator<boolean | null | undefined> | undefined;
27
+ borderRadius?: React.Validator<string | null | undefined> | undefined;
28
+ preset?: React.Validator<string | null | undefined> | undefined;
29
+ size?: React.Validator<import("../icon").IconSize | null | undefined> | undefined;
30
+ customStyle?: React.Validator<React.CSSProperties | null | undefined> | undefined;
31
+ }>>;
22
32
  }>>;
23
33
  button: import("prop-types").Requireable<import("prop-types").InferProps<{
24
34
  type: import("prop-types").Requireable<string>;
25
35
  usage: import("prop-types").Requireable<string>;
26
36
  label: import("prop-types").Requireable<string>;
27
- content: import("prop-types").Requireable<import("prop-types").ReactNodeLike>;
37
+ content: import("prop-types").Requireable<NonNullable<import("prop-types").ReactNodeLike | import("prop-types").InferProps<{}>>>;
28
38
  'aria-label': import("prop-types").Requireable<string>;
29
39
  tooltipText: import("prop-types").Requireable<string>;
30
40
  tooltipPlacement: import("prop-types").Requireable<string>;
@@ -38,9 +48,7 @@ declare const RadioWithTitle: {
38
48
  color: import("prop-types").Requireable<string>;
39
49
  backgroundColor: import("prop-types").Requireable<string>;
40
50
  size: import("prop-types").Requireable<number>;
41
- customStyle: import("prop-types").Requireable<{
42
- [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
43
- }>;
51
+ customStyle: import("prop-types").Requireable<object>;
44
52
  }>>;
45
53
  }>>;
46
54
  onClick: import("prop-types").Requireable<(...args: any[]) => any>;
@@ -53,9 +61,7 @@ declare const RadioWithTitle: {
53
61
  hoverColor: import("prop-types").Requireable<string>;
54
62
  disabled: import("prop-types").Requireable<boolean>;
55
63
  className: import("prop-types").Requireable<string>;
56
- customStyle: import("prop-types").Requireable<{
57
- [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
58
- }>;
64
+ customStyle: import("prop-types").Requireable<object>;
59
65
  }>>;
60
66
  required: import("prop-types").Requireable<boolean>;
61
67
  }>>>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/radio-with-title/index.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAY,mBAAmB,EAAC,MAAM,SAAS,CAAC;AAEvD,QAAA,MAAM,cAAc;YAAW,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwBjD,CAAC;AAIF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/radio-with-title/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAIzC,OAAO,EAAY,mBAAmB,EAAC,MAAM,SAAS,CAAC;AAEvD,QAAA,MAAM,cAAc;YAAW,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwBjD,CAAC;AAIF,eAAe,cAAc,CAAC"}
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import PropTypes from 'prop-types';
2
3
  export declare const propTypes: {
3
4
  title: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
@@ -7,7 +8,7 @@ export declare const propTypes: {
7
8
  'data-name': PropTypes.Requireable<string>;
8
9
  titleSize: PropTypes.Requireable<string>;
9
10
  subtitleSize: PropTypes.Requireable<string>;
10
- icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
11
+ icon: PropTypes.Requireable<PropTypes.InferProps<PropTypes.ValidationMap<any>>>;
11
12
  tag: PropTypes.Requireable<PropTypes.InferProps<{
12
13
  label: PropTypes.Requireable<string>;
13
14
  type: PropTypes.Requireable<string>;
@@ -15,13 +16,23 @@ export declare const propTypes: {
15
16
  customStyle: PropTypes.Requireable<{
16
17
  [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
17
18
  }>;
18
- icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
19
+ icon: PropTypes.Requireable<PropTypes.InferProps<{
20
+ position: PropTypes.Requireable<string>;
21
+ iconName?: import("react").Validator<string> | undefined;
22
+ iconColor?: import("react").Validator<string | null | undefined> | undefined;
23
+ backgroundColor?: import("react").Validator<string | null | undefined> | undefined;
24
+ gradientBackground?: import("react").Validator<boolean | null | undefined> | undefined;
25
+ borderRadius?: import("react").Validator<string | null | undefined> | undefined;
26
+ preset?: import("react").Validator<string | null | undefined> | undefined;
27
+ size?: import("react").Validator<import("../icon").IconSize | null | undefined> | undefined;
28
+ customStyle?: import("react").Validator<import("react").CSSProperties | null | undefined> | undefined;
29
+ }>>;
19
30
  }>>;
20
31
  button: PropTypes.Requireable<PropTypes.InferProps<{
21
32
  type: PropTypes.Requireable<string>;
22
33
  usage: PropTypes.Requireable<string>;
23
34
  label: PropTypes.Requireable<string>;
24
- content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
35
+ content: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike | PropTypes.InferProps<{}>>>;
25
36
  'aria-label': PropTypes.Requireable<string>;
26
37
  tooltipText: PropTypes.Requireable<string>;
27
38
  tooltipPlacement: PropTypes.Requireable<string>;
@@ -35,9 +46,7 @@ export declare const propTypes: {
35
46
  color: PropTypes.Requireable<string>;
36
47
  backgroundColor: PropTypes.Requireable<string>;
37
48
  size: PropTypes.Requireable<number>;
38
- customStyle: PropTypes.Requireable<{
39
- [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
40
- }>;
49
+ customStyle: PropTypes.Requireable<object>;
41
50
  }>>;
42
51
  }>>;
43
52
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
@@ -50,9 +59,7 @@ export declare const propTypes: {
50
59
  hoverColor: PropTypes.Requireable<string>;
51
60
  disabled: PropTypes.Requireable<boolean>;
52
61
  className: PropTypes.Requireable<string>;
53
- customStyle: PropTypes.Requireable<{
54
- [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
55
- }>;
62
+ customStyle: PropTypes.Requireable<object>;
56
63
  }>>;
57
64
  required: PropTypes.Requireable<boolean>;
58
65
  }>>>;