@coorpacademy/components 11.11.15-alpha.10 → 11.11.15-alpha.202

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 (716) hide show
  1. package/es/atom/autocomplete/index.d.ts +3 -1
  2. package/es/atom/autocomplete/index.d.ts.map +1 -1
  3. package/es/atom/autocomplete/index.js +45 -17
  4. package/es/atom/autocomplete/index.js.map +1 -1
  5. package/es/atom/autocomplete/style.css +150 -1
  6. package/es/atom/avatar/style.css +1 -1
  7. package/es/atom/battle-opponent/index.d.ts.map +1 -1
  8. package/es/atom/battle-opponent/index.js +4 -2
  9. package/es/atom/battle-opponent/index.js.map +1 -1
  10. package/es/atom/battle-opponent/style.css +12 -0
  11. package/es/atom/button/index.d.ts +14 -3
  12. package/es/atom/button/index.d.ts.map +1 -1
  13. package/es/atom/button/index.js +77 -39
  14. package/es/atom/button/index.js.map +1 -1
  15. package/es/atom/button/index.native.d.ts.map +1 -1
  16. package/es/atom/button/index.native.js +6 -1
  17. package/es/atom/button/index.native.js.map +1 -1
  18. package/es/atom/button-link/index.d.ts +23 -22
  19. package/es/atom/button-link/index.d.ts.map +1 -1
  20. package/es/atom/button-link/index.js +23 -35
  21. package/es/atom/button-link/index.js.map +1 -1
  22. package/es/atom/button-link/style.css +1 -1
  23. package/es/atom/button-link/types.d.ts +50 -0
  24. package/es/atom/button-link/types.d.ts.map +1 -0
  25. package/es/atom/button-link/types.js +25 -0
  26. package/es/atom/button-link/types.js.map +1 -0
  27. package/es/atom/button-link-icon-only/index.d.ts.map +1 -1
  28. package/es/atom/button-link-icon-only/index.js +1 -0
  29. package/es/atom/button-link-icon-only/index.js.map +1 -1
  30. package/es/atom/button-link-icon-only/style.css +16 -1
  31. package/es/atom/button-menu/index.d.ts +14 -13
  32. package/es/atom/button-menu/index.d.ts.map +1 -1
  33. package/es/atom/button-menu/index.js +5 -13
  34. package/es/atom/button-menu/index.js.map +1 -1
  35. package/es/atom/button-menu/types.d.ts +35 -0
  36. package/es/atom/button-menu/types.d.ts.map +1 -0
  37. package/es/atom/button-menu/types.js +14 -0
  38. package/es/atom/button-menu/types.js.map +1 -0
  39. package/es/atom/choice/index.native.d.ts.map +1 -1
  40. package/es/atom/choice/index.native.js +2 -1
  41. package/es/atom/choice/index.native.js.map +1 -1
  42. package/es/atom/cta/index.d.ts +36 -60
  43. package/es/atom/cta/index.d.ts.map +1 -1
  44. package/es/atom/cta/index.js +55 -94
  45. package/es/atom/cta/index.js.map +1 -1
  46. package/es/atom/cta/prop-types.d.ts +40 -0
  47. package/es/atom/cta/prop-types.d.ts.map +1 -0
  48. package/es/atom/cta/prop-types.js +22 -0
  49. package/es/atom/cta/prop-types.js.map +1 -0
  50. package/es/atom/difficulty-level/style.css +1 -1
  51. package/es/atom/drag-and-drop/index.d.ts +2 -0
  52. package/es/atom/drag-and-drop/index.d.ts.map +1 -1
  53. package/es/atom/drag-and-drop/index.js +55 -19
  54. package/es/atom/drag-and-drop/index.js.map +1 -1
  55. package/es/atom/drag-and-drop/style.css +25 -8
  56. package/es/atom/html/index.native.js +2 -2
  57. package/es/atom/html/index.native.js.map +1 -1
  58. package/es/atom/image-upload/index.d.ts +5 -1
  59. package/es/atom/image-upload/index.d.ts.map +1 -1
  60. package/es/atom/image-upload/index.js +10 -12
  61. package/es/atom/image-upload/index.js.map +1 -1
  62. package/es/atom/image-upload/style.css +8 -1
  63. package/es/atom/input-html/index.d.ts +34 -23
  64. package/es/atom/input-html/index.d.ts.map +1 -1
  65. package/es/atom/input-html/index.js +63 -94
  66. package/es/atom/input-html/index.js.map +1 -1
  67. package/es/atom/input-html/input-preview.d.ts.map +1 -1
  68. package/es/atom/input-html/input-preview.js +2 -0
  69. package/es/atom/input-html/input-preview.js.map +1 -1
  70. package/es/atom/input-textarea/index.d.ts.map +1 -1
  71. package/es/atom/input-textarea/index.js +2 -1
  72. package/es/atom/input-textarea/index.js.map +1 -1
  73. package/es/atom/link/index.d.ts +2 -0
  74. package/es/atom/link/index.d.ts.map +1 -1
  75. package/es/atom/link/index.js +18 -11
  76. package/es/atom/link/index.js.map +1 -1
  77. package/es/atom/select/index.d.ts.map +1 -1
  78. package/es/atom/select/index.js +2 -0
  79. package/es/atom/select/index.js.map +1 -1
  80. package/es/atom/select-modal/index.native.d.ts.map +1 -1
  81. package/es/atom/select-modal/index.native.js +4 -5
  82. package/es/atom/select-modal/index.native.js.map +1 -1
  83. package/es/atom/slide/index.d.ts +2 -0
  84. package/es/atom/status-item/style.css +3 -0
  85. package/es/atom/text/index.native.d.ts +3 -6
  86. package/es/atom/text/index.native.d.ts.map +1 -1
  87. package/es/atom/text/index.native.js +11 -11
  88. package/es/atom/text/index.native.js.map +1 -1
  89. package/es/atom/tooltip/index.d.ts +5 -1
  90. package/es/atom/tooltip/index.d.ts.map +1 -1
  91. package/es/atom/tooltip/index.js +37 -18
  92. package/es/atom/tooltip/index.js.map +1 -1
  93. package/es/atom/tooltip/style.css +1 -1
  94. package/es/atom/video-upload/index.d.ts +2 -0
  95. package/es/globals.d.js.map +1 -1
  96. package/es/hoc/modal/select-item/index.native.d.ts.map +1 -1
  97. package/es/hoc/modal/select-item/index.native.js +4 -2
  98. package/es/hoc/modal/select-item/index.native.js.map +1 -1
  99. package/es/hoc/transition/child-prop-types.d.ts +16 -0
  100. package/es/hoc/transition/child-prop-types.d.ts.map +1 -0
  101. package/es/hoc/transition/child-prop-types.js +9 -0
  102. package/es/hoc/transition/child-prop-types.js.map +1 -0
  103. package/es/hoc/transition/index.d.ts +14 -9
  104. package/es/hoc/transition/index.d.ts.map +1 -1
  105. package/es/hoc/transition/index.js +34 -30
  106. package/es/hoc/transition/index.js.map +1 -1
  107. package/es/hoc/transition/transition-prop-types.d.ts +20 -0
  108. package/es/hoc/transition/transition-prop-types.d.ts.map +1 -0
  109. package/es/hoc/transition/transition-prop-types.js +12 -0
  110. package/es/hoc/transition/transition-prop-types.js.map +1 -0
  111. package/es/molecule/add-to-my-list/index.d.ts.map +1 -1
  112. package/es/molecule/add-to-my-list/index.js +2 -0
  113. package/es/molecule/add-to-my-list/index.js.map +1 -1
  114. package/es/molecule/audio/index.d.ts.map +1 -1
  115. package/es/molecule/audio/index.js +1 -0
  116. package/es/molecule/audio/index.js.map +1 -1
  117. package/es/molecule/brand-form-group/index.d.ts +21 -4
  118. package/es/molecule/brand-form-group/index.d.ts.map +1 -1
  119. package/es/molecule/brand-form-group/index.js +14 -2
  120. package/es/molecule/brand-form-group/index.js.map +1 -1
  121. package/es/molecule/brand-form-group/style.css +29 -7
  122. package/es/molecule/bullet-point-menu-button/index.d.ts +20 -17
  123. package/es/molecule/bullet-point-menu-button/index.d.ts.map +1 -1
  124. package/es/molecule/bullet-point-menu-button/index.js +9 -11
  125. package/es/molecule/bullet-point-menu-button/index.js.map +1 -1
  126. package/es/molecule/bullet-point-menu-button/style.css +20 -0
  127. package/es/molecule/bullet-point-menu-button/types.d.ts +31 -0
  128. package/es/molecule/bullet-point-menu-button/types.d.ts.map +1 -0
  129. package/es/molecule/bullet-point-menu-button/types.js +13 -0
  130. package/es/molecule/bullet-point-menu-button/types.js.map +1 -0
  131. package/es/molecule/card/customer.js +1 -1
  132. package/es/molecule/card/customer.js.map +1 -1
  133. package/es/molecule/card/favorite.css +15 -35
  134. package/es/molecule/card/favorite.d.ts +15 -9
  135. package/es/molecule/card/favorite.d.ts.map +1 -1
  136. package/es/molecule/card/favorite.js +103 -62
  137. package/es/molecule/card/favorite.js.map +1 -1
  138. package/es/molecule/card/selectable.js +1 -1
  139. package/es/molecule/card/selectable.js.map +1 -1
  140. package/es/molecule/cm-popin/index.d.ts.map +1 -1
  141. package/es/molecule/cm-popin/index.js +2 -2
  142. package/es/molecule/cm-popin/index.js.map +1 -1
  143. package/es/molecule/cm-popin/style.css +32 -17
  144. package/es/molecule/course-section/style.css +4 -6
  145. package/es/molecule/discipline-header/index.d.ts +2 -1
  146. package/es/molecule/discipline-header/index.d.ts.map +1 -1
  147. package/es/molecule/discipline-header/index.js +29 -14
  148. package/es/molecule/discipline-header/index.js.map +1 -1
  149. package/es/molecule/discipline-header/style.css +36 -9
  150. package/es/molecule/drag-and-drop/index.js +3 -1
  151. package/es/molecule/drag-and-drop/index.js.map +1 -1
  152. package/es/molecule/drag-and-drop/overlay.d.ts.map +1 -1
  153. package/es/molecule/drag-and-drop/overlay.js +2 -1
  154. package/es/molecule/drag-and-drop/overlay.js.map +1 -1
  155. package/es/molecule/drag-and-drop/upload-report.d.ts.map +1 -1
  156. package/es/molecule/drag-and-drop/upload-report.js +1 -0
  157. package/es/molecule/drag-and-drop/upload-report.js.map +1 -1
  158. package/es/molecule/drag-and-drop-wrapper/index.d.ts +2 -0
  159. package/es/molecule/draggable/index.d.ts.map +1 -1
  160. package/es/molecule/draggable/index.js +1 -0
  161. package/es/molecule/draggable/index.js.map +1 -1
  162. package/es/molecule/draggable/style.css +9 -5
  163. package/es/molecule/draggable-list/index.d.ts +50 -2
  164. package/es/molecule/draggable-list/index.d.ts.map +1 -1
  165. package/es/molecule/draggable-list/index.js +7 -4
  166. package/es/molecule/draggable-list/index.js.map +1 -1
  167. package/es/molecule/empty-state-dashboard/index.d.ts +1 -1
  168. package/es/molecule/empty-state-dashboard/index.d.ts.map +1 -1
  169. package/es/molecule/empty-state-dashboard/index.js +2 -2
  170. package/es/molecule/empty-state-dashboard/index.js.map +1 -1
  171. package/es/molecule/empty-state-dashboard/types.d.ts +8 -0
  172. package/es/molecule/empty-state-dashboard/types.d.ts.map +1 -1
  173. package/es/molecule/empty-state-dashboard/types.js.map +1 -1
  174. package/es/molecule/expandible-actionable-table/index.d.ts +103 -0
  175. package/es/molecule/expandible-actionable-table/index.d.ts.map +1 -0
  176. package/es/molecule/expandible-actionable-table/index.js +194 -0
  177. package/es/molecule/expandible-actionable-table/index.js.map +1 -0
  178. package/es/molecule/expandible-actionable-table/style.css +134 -0
  179. package/es/molecule/expandible-actionable-table/types.d.ts +116 -0
  180. package/es/molecule/expandible-actionable-table/types.d.ts.map +1 -0
  181. package/es/molecule/expandible-actionable-table/types.js +33 -0
  182. package/es/molecule/expandible-actionable-table/types.js.map +1 -0
  183. package/es/molecule/external-content-button/index.d.ts.map +1 -1
  184. package/es/molecule/external-content-button/index.js +2 -1
  185. package/es/molecule/external-content-button/index.js.map +1 -1
  186. package/es/molecule/news/index.d.ts +2 -0
  187. package/es/molecule/questions/free-text/index.d.ts.map +1 -1
  188. package/es/molecule/questions/free-text/index.js +1 -0
  189. package/es/molecule/questions/free-text/index.js.map +1 -1
  190. package/es/molecule/questions/mobile/slider/index.native.d.ts.map +1 -1
  191. package/es/molecule/questions/mobile/slider/index.native.js +6 -4
  192. package/es/molecule/questions/mobile/slider/index.native.js.map +1 -1
  193. package/es/molecule/questions/qcm/index.d.ts.map +1 -1
  194. package/es/molecule/questions/qcm/index.js +3 -1
  195. package/es/molecule/questions/qcm/index.js.map +1 -1
  196. package/es/molecule/questions/qcm-drag/index.d.ts.map +1 -1
  197. package/es/molecule/questions/qcm-drag/index.js +4 -1
  198. package/es/molecule/questions/qcm-drag/index.js.map +1 -1
  199. package/es/molecule/questions/qcm-graphic/index.js +6 -3
  200. package/es/molecule/questions/qcm-graphic/index.js.map +1 -1
  201. package/es/molecule/questions/qcm-graphic/style.css +2 -1
  202. package/es/molecule/questions/question-range/index.js +2 -1
  203. package/es/molecule/questions/question-range/index.js.map +1 -1
  204. package/es/molecule/questions/template/index.d.ts.map +1 -1
  205. package/es/molecule/questions/template/index.js +2 -1
  206. package/es/molecule/questions/template/index.js.map +1 -1
  207. package/es/molecule/review-correction-popin/index.d.ts.map +1 -1
  208. package/es/molecule/review-correction-popin/index.js +38 -14
  209. package/es/molecule/review-correction-popin/index.js.map +1 -1
  210. package/es/molecule/review-correction-popin/index.native.d.ts.map +1 -1
  211. package/es/molecule/review-correction-popin/index.native.js +12 -2
  212. package/es/molecule/review-correction-popin/index.native.js.map +1 -1
  213. package/es/molecule/review-correction-popin/style.css +11 -53
  214. package/es/molecule/scope-tabs/index.js +2 -1
  215. package/es/molecule/scope-tabs/index.js.map +1 -1
  216. package/es/molecule/select-multiple/index.d.ts.map +1 -1
  217. package/es/molecule/select-multiple/index.js +7 -7
  218. package/es/molecule/select-multiple/index.js.map +1 -1
  219. package/es/molecule/setup-slide/index.d.ts +2 -0
  220. package/es/molecule/setup-slider/index.d.ts +2 -0
  221. package/es/molecule/setup-slider/index.d.ts.map +1 -1
  222. package/es/molecule/setup-slider/index.js +4 -1
  223. package/es/molecule/setup-slider/index.js.map +1 -1
  224. package/es/molecule/setup-slider/style.css +3 -0
  225. package/es/molecule/title-and-checkbox-wrapper/index.d.ts +2 -0
  226. package/es/molecule/uploading-file-progress/index.d.ts +1 -1
  227. package/es/molecule/uploading-file-progress/index.d.ts.map +1 -1
  228. package/es/molecule/uploading-file-progress/index.js.map +1 -1
  229. package/es/molecule/uploading-file-progress/types.d.ts +10 -1
  230. package/es/molecule/uploading-file-progress/types.d.ts.map +1 -1
  231. package/es/molecule/uploading-file-progress/types.js.map +1 -1
  232. package/es/organism/brand-form/index.d.ts +21 -4
  233. package/es/organism/brand-form/index.d.ts.map +1 -1
  234. package/es/organism/brand-form/index.js +1 -8
  235. package/es/organism/brand-form/index.js.map +1 -1
  236. package/es/organism/brand-form/style.css +0 -13
  237. package/es/organism/course-selection/style.css +1 -0
  238. package/es/organism/list-item/index.d.ts +2 -0
  239. package/es/organism/list-item/index.d.ts.map +1 -1
  240. package/es/organism/list-item/index.js +8 -5
  241. package/es/organism/list-item/index.js.map +1 -1
  242. package/es/organism/list-item/style.css +6 -4
  243. package/es/organism/list-items/index.d.ts +121 -23
  244. package/es/organism/list-items/index.d.ts.map +1 -1
  245. package/es/organism/list-items/index.js +63 -14
  246. package/es/organism/list-items/index.js.map +1 -1
  247. package/es/organism/list-items/style.css +17 -0
  248. package/es/organism/mobile-intro-popin/index.native.d.ts +20 -0
  249. package/es/organism/mobile-intro-popin/index.native.d.ts.map +1 -0
  250. package/es/organism/mobile-intro-popin/index.native.js +152 -0
  251. package/es/organism/mobile-intro-popin/index.native.js.map +1 -0
  252. package/es/organism/mooc/image-slider/index.d.ts +2 -0
  253. package/es/organism/mooc-footer/index.js +1 -1
  254. package/es/organism/mooc-footer/index.js.map +1 -1
  255. package/es/organism/mooc-header/index.d.ts +3 -0
  256. package/es/organism/mooc-header/index.d.ts.map +1 -1
  257. package/es/organism/mooc-header/index.js +6 -2
  258. package/es/organism/mooc-header/index.js.map +1 -1
  259. package/es/organism/mooc-header/style.css +0 -1
  260. package/es/organism/review-skills/index.native.js +1 -1
  261. package/es/organism/review-skills/index.native.js.map +1 -1
  262. package/es/organism/review-slide/index.native.d.ts.map +1 -1
  263. package/es/organism/review-slide/index.native.js +39 -18
  264. package/es/organism/review-slide/index.native.js.map +1 -1
  265. package/es/organism/rewards-form/index.d.ts +2 -0
  266. package/es/organism/sidebar/index.d.ts +2 -0
  267. package/es/organism/sidebar/index.d.ts.map +1 -1
  268. package/es/organism/wizard-contents/index.d.ts +94 -4
  269. package/es/organism/wizard-contents/index.d.ts.map +1 -1
  270. package/es/organism/wizard-contents/index.js +7 -1
  271. package/es/organism/wizard-contents/index.js.map +1 -1
  272. package/es/template/activity/engine-stars.d.ts.map +1 -1
  273. package/es/template/activity/engine-stars.js +2 -1
  274. package/es/template/activity/engine-stars.js.map +1 -1
  275. package/es/template/activity/stars-summary.css +5 -3
  276. package/es/template/activity/stars-summary.d.ts.map +1 -1
  277. package/es/template/activity/stars-summary.js +3 -2
  278. package/es/template/activity/stars-summary.js.map +1 -1
  279. package/es/template/app-player/player/index.d.ts +2 -0
  280. package/es/template/app-player/player/slides/footer/index.js +1 -1
  281. package/es/template/app-player/player/slides/footer/index.js.map +1 -1
  282. package/es/template/app-player/player/slides/header/index.js +2 -1
  283. package/es/template/app-player/player/slides/header/index.js.map +1 -1
  284. package/es/template/app-player/player/slides/header/microlearning.css +10 -0
  285. package/es/template/app-player/player/slides/header/microlearning.d.ts +1 -0
  286. package/es/template/app-player/player/slides/header/microlearning.d.ts.map +1 -1
  287. package/es/template/app-player/player/slides/header/microlearning.js +34 -18
  288. package/es/template/app-player/player/slides/header/microlearning.js.map +1 -1
  289. package/es/template/app-player/player/slides/index.d.ts +2 -0
  290. package/es/template/app-player/player/slides/index.d.ts.map +1 -1
  291. package/es/template/app-player/popin-correction/index.d.ts +2 -0
  292. package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
  293. package/es/template/app-player/popin-end/index.d.ts +1 -0
  294. package/es/template/app-player/popin-end/summary.d.ts +1 -0
  295. package/es/template/app-player/popin-header/index.d.ts +1 -0
  296. package/es/template/app-player/popin-header/index.d.ts.map +1 -1
  297. package/es/template/app-review/index.native.d.ts.map +1 -1
  298. package/es/template/app-review/index.native.js +3 -3
  299. package/es/template/app-review/index.native.js.map +1 -1
  300. package/es/template/back-office/brand-update/index.d.ts +298 -773
  301. package/es/template/back-office/brand-update/index.d.ts.map +1 -1
  302. package/es/template/back-office/brand-update/index.js +14 -1
  303. package/es/template/back-office/brand-update/index.js.map +1 -1
  304. package/es/template/cockpit/jw-uploader/index.d.ts +2 -0
  305. package/es/template/common/discipline/index.d.ts.map +1 -1
  306. package/es/template/common/discipline/index.js +4 -2
  307. package/es/template/common/discipline/index.js.map +1 -1
  308. package/es/template/common/search-page/index.d.ts +14 -3
  309. package/es/template/external-course/index.d.ts +18 -22
  310. package/es/template/external-course/index.d.ts.map +1 -1
  311. package/es/template/external-course/index.js +67 -57
  312. package/es/template/external-course/index.js.map +1 -1
  313. package/es/template/mobile-login/confirm-email-sent/index.native.d.ts +13 -0
  314. package/es/template/mobile-login/confirm-email-sent/index.native.d.ts.map +1 -0
  315. package/es/template/mobile-login/confirm-email-sent/index.native.js +214 -0
  316. package/es/template/mobile-login/confirm-email-sent/index.native.js.map +1 -0
  317. package/es/template/mobile-login/qr-code-scanner/index.native.d.ts +16 -0
  318. package/es/template/mobile-login/qr-code-scanner/index.native.d.ts.map +1 -0
  319. package/es/template/mobile-login/qr-code-scanner/index.native.js +351 -0
  320. package/es/template/mobile-login/qr-code-scanner/index.native.js.map +1 -0
  321. package/es/template/mobile-login/receive-email/index.native.d.ts +14 -0
  322. package/es/template/mobile-login/receive-email/index.native.d.ts.map +1 -0
  323. package/es/template/mobile-login/receive-email/index.native.js +204 -0
  324. package/es/template/mobile-login/receive-email/index.native.js.map +1 -0
  325. package/es/template/mobile-login/welcome/index.native.d.ts +18 -0
  326. package/es/template/mobile-login/welcome/index.native.d.ts.map +1 -0
  327. package/es/template/mobile-login/welcome/index.native.js +290 -0
  328. package/es/template/mobile-login/welcome/index.native.js.map +1 -0
  329. package/es/template/teams-dashboard/index.d.ts +2 -0
  330. package/es/util/button-icons.d.ts +1 -0
  331. package/es/util/button-icons.d.ts.map +1 -1
  332. package/es/util/button-icons.js +3 -2
  333. package/es/util/button-icons.js.map +1 -1
  334. package/es/util/proptypes.d.ts.map +1 -1
  335. package/es/util/proptypes.js +2 -2
  336. package/es/util/proptypes.js.map +1 -1
  337. package/es/util/use-mobile-keyboard-visibility.d.ts +3 -0
  338. package/es/util/use-mobile-keyboard-visibility.d.ts.map +1 -0
  339. package/es/util/use-mobile-keyboard-visibility.js +22 -0
  340. package/es/util/use-mobile-keyboard-visibility.js.map +1 -0
  341. package/lib/atom/autocomplete/index.d.ts +3 -1
  342. package/lib/atom/autocomplete/index.d.ts.map +1 -1
  343. package/lib/atom/autocomplete/index.js +48 -16
  344. package/lib/atom/autocomplete/index.js.map +1 -1
  345. package/lib/atom/autocomplete/style.css +150 -1
  346. package/lib/atom/avatar/style.css +1 -1
  347. package/lib/atom/battle-opponent/index.d.ts.map +1 -1
  348. package/lib/atom/battle-opponent/index.js +4 -2
  349. package/lib/atom/battle-opponent/index.js.map +1 -1
  350. package/lib/atom/battle-opponent/style.css +12 -0
  351. package/lib/atom/button/index.d.ts +14 -3
  352. package/lib/atom/button/index.d.ts.map +1 -1
  353. package/lib/atom/button/index.js +82 -39
  354. package/lib/atom/button/index.js.map +1 -1
  355. package/lib/atom/button/index.native.d.ts.map +1 -1
  356. package/lib/atom/button/index.native.js +6 -1
  357. package/lib/atom/button/index.native.js.map +1 -1
  358. package/lib/atom/button-link/index.d.ts +23 -22
  359. package/lib/atom/button-link/index.d.ts.map +1 -1
  360. package/lib/atom/button-link/index.js +24 -37
  361. package/lib/atom/button-link/index.js.map +1 -1
  362. package/lib/atom/button-link/style.css +1 -1
  363. package/lib/atom/button-link/types.d.ts +50 -0
  364. package/lib/atom/button-link/types.d.ts.map +1 -0
  365. package/lib/atom/button-link/types.js +36 -0
  366. package/lib/atom/button-link/types.js.map +1 -0
  367. package/lib/atom/button-link-icon-only/index.d.ts.map +1 -1
  368. package/lib/atom/button-link-icon-only/index.js +1 -0
  369. package/lib/atom/button-link-icon-only/index.js.map +1 -1
  370. package/lib/atom/button-link-icon-only/style.css +16 -1
  371. package/lib/atom/button-menu/index.d.ts +14 -13
  372. package/lib/atom/button-menu/index.d.ts.map +1 -1
  373. package/lib/atom/button-menu/index.js +6 -14
  374. package/lib/atom/button-menu/index.js.map +1 -1
  375. package/lib/atom/button-menu/types.d.ts +35 -0
  376. package/lib/atom/button-menu/types.d.ts.map +1 -0
  377. package/lib/atom/button-menu/types.js +24 -0
  378. package/lib/atom/button-menu/types.js.map +1 -0
  379. package/lib/atom/choice/index.native.d.ts.map +1 -1
  380. package/lib/atom/choice/index.native.js +2 -1
  381. package/lib/atom/choice/index.native.js.map +1 -1
  382. package/lib/atom/cta/index.d.ts +36 -60
  383. package/lib/atom/cta/index.d.ts.map +1 -1
  384. package/lib/atom/cta/index.js +61 -95
  385. package/lib/atom/cta/index.js.map +1 -1
  386. package/lib/atom/cta/prop-types.d.ts +40 -0
  387. package/lib/atom/cta/prop-types.d.ts.map +1 -0
  388. package/lib/atom/cta/prop-types.js +32 -0
  389. package/lib/atom/cta/prop-types.js.map +1 -0
  390. package/lib/atom/difficulty-level/style.css +1 -1
  391. package/lib/atom/drag-and-drop/index.d.ts +2 -0
  392. package/lib/atom/drag-and-drop/index.d.ts.map +1 -1
  393. package/lib/atom/drag-and-drop/index.js +55 -19
  394. package/lib/atom/drag-and-drop/index.js.map +1 -1
  395. package/lib/atom/drag-and-drop/style.css +25 -8
  396. package/lib/atom/html/index.native.js +2 -2
  397. package/lib/atom/html/index.native.js.map +1 -1
  398. package/lib/atom/image-upload/index.d.ts +5 -1
  399. package/lib/atom/image-upload/index.d.ts.map +1 -1
  400. package/lib/atom/image-upload/index.js +10 -13
  401. package/lib/atom/image-upload/index.js.map +1 -1
  402. package/lib/atom/image-upload/style.css +8 -1
  403. package/lib/atom/input-html/index.d.ts +34 -23
  404. package/lib/atom/input-html/index.d.ts.map +1 -1
  405. package/lib/atom/input-html/index.js +67 -94
  406. package/lib/atom/input-html/index.js.map +1 -1
  407. package/lib/atom/input-html/input-preview.d.ts.map +1 -1
  408. package/lib/atom/input-html/input-preview.js +2 -0
  409. package/lib/atom/input-html/input-preview.js.map +1 -1
  410. package/lib/atom/input-textarea/index.d.ts.map +1 -1
  411. package/lib/atom/input-textarea/index.js +2 -1
  412. package/lib/atom/input-textarea/index.js.map +1 -1
  413. package/lib/atom/link/index.d.ts +2 -0
  414. package/lib/atom/link/index.d.ts.map +1 -1
  415. package/lib/atom/link/index.js +18 -11
  416. package/lib/atom/link/index.js.map +1 -1
  417. package/lib/atom/select/index.d.ts.map +1 -1
  418. package/lib/atom/select/index.js +2 -0
  419. package/lib/atom/select/index.js.map +1 -1
  420. package/lib/atom/select-modal/index.native.d.ts.map +1 -1
  421. package/lib/atom/select-modal/index.native.js +4 -5
  422. package/lib/atom/select-modal/index.native.js.map +1 -1
  423. package/lib/atom/slide/index.d.ts +2 -0
  424. package/lib/atom/status-item/style.css +3 -0
  425. package/lib/atom/text/index.native.d.ts +3 -6
  426. package/lib/atom/text/index.native.d.ts.map +1 -1
  427. package/lib/atom/text/index.native.js +13 -17
  428. package/lib/atom/text/index.native.js.map +1 -1
  429. package/lib/atom/tooltip/index.d.ts +5 -1
  430. package/lib/atom/tooltip/index.d.ts.map +1 -1
  431. package/lib/atom/tooltip/index.js +39 -18
  432. package/lib/atom/tooltip/index.js.map +1 -1
  433. package/lib/atom/tooltip/style.css +1 -1
  434. package/lib/atom/video-upload/index.d.ts +2 -0
  435. package/lib/globals.d.js.map +1 -1
  436. package/lib/hoc/modal/select-item/index.native.d.ts.map +1 -1
  437. package/lib/hoc/modal/select-item/index.native.js +4 -2
  438. package/lib/hoc/modal/select-item/index.native.js.map +1 -1
  439. package/lib/hoc/transition/child-prop-types.d.ts +16 -0
  440. package/lib/hoc/transition/child-prop-types.d.ts.map +1 -0
  441. package/lib/hoc/transition/child-prop-types.js +18 -0
  442. package/lib/hoc/transition/child-prop-types.js.map +1 -0
  443. package/lib/hoc/transition/index.d.ts +14 -9
  444. package/lib/hoc/transition/index.d.ts.map +1 -1
  445. package/lib/hoc/transition/index.js +35 -30
  446. package/lib/hoc/transition/index.js.map +1 -1
  447. package/lib/hoc/transition/transition-prop-types.d.ts +20 -0
  448. package/lib/hoc/transition/transition-prop-types.d.ts.map +1 -0
  449. package/lib/hoc/transition/transition-prop-types.js +21 -0
  450. package/lib/hoc/transition/transition-prop-types.js.map +1 -0
  451. package/lib/molecule/add-to-my-list/index.d.ts.map +1 -1
  452. package/lib/molecule/add-to-my-list/index.js +2 -0
  453. package/lib/molecule/add-to-my-list/index.js.map +1 -1
  454. package/lib/molecule/audio/index.d.ts.map +1 -1
  455. package/lib/molecule/audio/index.js +1 -0
  456. package/lib/molecule/audio/index.js.map +1 -1
  457. package/lib/molecule/brand-form-group/index.d.ts +21 -4
  458. package/lib/molecule/brand-form-group/index.d.ts.map +1 -1
  459. package/lib/molecule/brand-form-group/index.js +18 -2
  460. package/lib/molecule/brand-form-group/index.js.map +1 -1
  461. package/lib/molecule/brand-form-group/style.css +29 -7
  462. package/lib/molecule/bullet-point-menu-button/index.d.ts +20 -17
  463. package/lib/molecule/bullet-point-menu-button/index.d.ts.map +1 -1
  464. package/lib/molecule/bullet-point-menu-button/index.js +10 -11
  465. package/lib/molecule/bullet-point-menu-button/index.js.map +1 -1
  466. package/lib/molecule/bullet-point-menu-button/style.css +20 -0
  467. package/lib/molecule/bullet-point-menu-button/types.d.ts +31 -0
  468. package/lib/molecule/bullet-point-menu-button/types.d.ts.map +1 -0
  469. package/lib/molecule/bullet-point-menu-button/types.js +23 -0
  470. package/lib/molecule/bullet-point-menu-button/types.js.map +1 -0
  471. package/lib/molecule/card/customer.js +1 -1
  472. package/lib/molecule/card/customer.js.map +1 -1
  473. package/lib/molecule/card/favorite.css +15 -35
  474. package/lib/molecule/card/favorite.d.ts +15 -9
  475. package/lib/molecule/card/favorite.d.ts.map +1 -1
  476. package/lib/molecule/card/favorite.js +114 -65
  477. package/lib/molecule/card/favorite.js.map +1 -1
  478. package/lib/molecule/card/selectable.js +1 -1
  479. package/lib/molecule/card/selectable.js.map +1 -1
  480. package/lib/molecule/cm-popin/index.d.ts.map +1 -1
  481. package/lib/molecule/cm-popin/index.js +2 -2
  482. package/lib/molecule/cm-popin/index.js.map +1 -1
  483. package/lib/molecule/cm-popin/style.css +32 -17
  484. package/lib/molecule/course-section/style.css +4 -6
  485. package/lib/molecule/discipline-header/index.d.ts +2 -1
  486. package/lib/molecule/discipline-header/index.d.ts.map +1 -1
  487. package/lib/molecule/discipline-header/index.js +30 -14
  488. package/lib/molecule/discipline-header/index.js.map +1 -1
  489. package/lib/molecule/discipline-header/style.css +36 -9
  490. package/lib/molecule/drag-and-drop/index.js +3 -1
  491. package/lib/molecule/drag-and-drop/index.js.map +1 -1
  492. package/lib/molecule/drag-and-drop/overlay.d.ts.map +1 -1
  493. package/lib/molecule/drag-and-drop/overlay.js +2 -1
  494. package/lib/molecule/drag-and-drop/overlay.js.map +1 -1
  495. package/lib/molecule/drag-and-drop/upload-report.d.ts.map +1 -1
  496. package/lib/molecule/drag-and-drop/upload-report.js +1 -0
  497. package/lib/molecule/drag-and-drop/upload-report.js.map +1 -1
  498. package/lib/molecule/drag-and-drop-wrapper/index.d.ts +2 -0
  499. package/lib/molecule/draggable/index.d.ts.map +1 -1
  500. package/lib/molecule/draggable/index.js +1 -0
  501. package/lib/molecule/draggable/index.js.map +1 -1
  502. package/lib/molecule/draggable/style.css +9 -5
  503. package/lib/molecule/draggable-list/index.d.ts +50 -2
  504. package/lib/molecule/draggable-list/index.d.ts.map +1 -1
  505. package/lib/molecule/draggable-list/index.js +8 -4
  506. package/lib/molecule/draggable-list/index.js.map +1 -1
  507. package/lib/molecule/empty-state-dashboard/index.d.ts +1 -1
  508. package/lib/molecule/empty-state-dashboard/index.d.ts.map +1 -1
  509. package/lib/molecule/empty-state-dashboard/index.js +2 -2
  510. package/lib/molecule/empty-state-dashboard/index.js.map +1 -1
  511. package/lib/molecule/empty-state-dashboard/types.d.ts +8 -0
  512. package/lib/molecule/empty-state-dashboard/types.d.ts.map +1 -1
  513. package/lib/molecule/empty-state-dashboard/types.js.map +1 -1
  514. package/lib/molecule/expandible-actionable-table/index.d.ts +103 -0
  515. package/lib/molecule/expandible-actionable-table/index.d.ts.map +1 -0
  516. package/lib/molecule/expandible-actionable-table/index.js +216 -0
  517. package/lib/molecule/expandible-actionable-table/index.js.map +1 -0
  518. package/lib/molecule/expandible-actionable-table/style.css +134 -0
  519. package/lib/molecule/expandible-actionable-table/types.d.ts +116 -0
  520. package/lib/molecule/expandible-actionable-table/types.d.ts.map +1 -0
  521. package/lib/molecule/expandible-actionable-table/types.js +47 -0
  522. package/lib/molecule/expandible-actionable-table/types.js.map +1 -0
  523. package/lib/molecule/external-content-button/index.d.ts.map +1 -1
  524. package/lib/molecule/external-content-button/index.js +2 -1
  525. package/lib/molecule/external-content-button/index.js.map +1 -1
  526. package/lib/molecule/news/index.d.ts +2 -0
  527. package/lib/molecule/questions/free-text/index.d.ts.map +1 -1
  528. package/lib/molecule/questions/free-text/index.js +1 -0
  529. package/lib/molecule/questions/free-text/index.js.map +1 -1
  530. package/lib/molecule/questions/mobile/slider/index.native.d.ts.map +1 -1
  531. package/lib/molecule/questions/mobile/slider/index.native.js +6 -4
  532. package/lib/molecule/questions/mobile/slider/index.native.js.map +1 -1
  533. package/lib/molecule/questions/qcm/index.d.ts.map +1 -1
  534. package/lib/molecule/questions/qcm/index.js +3 -1
  535. package/lib/molecule/questions/qcm/index.js.map +1 -1
  536. package/lib/molecule/questions/qcm-drag/index.d.ts.map +1 -1
  537. package/lib/molecule/questions/qcm-drag/index.js +4 -1
  538. package/lib/molecule/questions/qcm-drag/index.js.map +1 -1
  539. package/lib/molecule/questions/qcm-graphic/index.js +6 -3
  540. package/lib/molecule/questions/qcm-graphic/index.js.map +1 -1
  541. package/lib/molecule/questions/qcm-graphic/style.css +2 -1
  542. package/lib/molecule/questions/question-range/index.js +2 -1
  543. package/lib/molecule/questions/question-range/index.js.map +1 -1
  544. package/lib/molecule/questions/template/index.d.ts.map +1 -1
  545. package/lib/molecule/questions/template/index.js +2 -1
  546. package/lib/molecule/questions/template/index.js.map +1 -1
  547. package/lib/molecule/review-correction-popin/index.d.ts.map +1 -1
  548. package/lib/molecule/review-correction-popin/index.js +44 -14
  549. package/lib/molecule/review-correction-popin/index.js.map +1 -1
  550. package/lib/molecule/review-correction-popin/index.native.d.ts.map +1 -1
  551. package/lib/molecule/review-correction-popin/index.native.js +12 -2
  552. package/lib/molecule/review-correction-popin/index.native.js.map +1 -1
  553. package/lib/molecule/review-correction-popin/style.css +11 -53
  554. package/lib/molecule/scope-tabs/index.js +4 -1
  555. package/lib/molecule/scope-tabs/index.js.map +1 -1
  556. package/lib/molecule/select-multiple/index.d.ts.map +1 -1
  557. package/lib/molecule/select-multiple/index.js +7 -7
  558. package/lib/molecule/select-multiple/index.js.map +1 -1
  559. package/lib/molecule/setup-slide/index.d.ts +2 -0
  560. package/lib/molecule/setup-slider/index.d.ts +2 -0
  561. package/lib/molecule/setup-slider/index.d.ts.map +1 -1
  562. package/lib/molecule/setup-slider/index.js +5 -1
  563. package/lib/molecule/setup-slider/index.js.map +1 -1
  564. package/lib/molecule/setup-slider/style.css +3 -0
  565. package/lib/molecule/title-and-checkbox-wrapper/index.d.ts +2 -0
  566. package/lib/molecule/uploading-file-progress/index.d.ts +1 -1
  567. package/lib/molecule/uploading-file-progress/index.d.ts.map +1 -1
  568. package/lib/molecule/uploading-file-progress/index.js.map +1 -1
  569. package/lib/molecule/uploading-file-progress/types.d.ts +10 -1
  570. package/lib/molecule/uploading-file-progress/types.d.ts.map +1 -1
  571. package/lib/molecule/uploading-file-progress/types.js.map +1 -1
  572. package/lib/organism/brand-form/index.d.ts +21 -4
  573. package/lib/organism/brand-form/index.d.ts.map +1 -1
  574. package/lib/organism/brand-form/index.js +1 -9
  575. package/lib/organism/brand-form/index.js.map +1 -1
  576. package/lib/organism/brand-form/style.css +0 -13
  577. package/lib/organism/course-selection/style.css +1 -0
  578. package/lib/organism/list-item/index.d.ts +2 -0
  579. package/lib/organism/list-item/index.d.ts.map +1 -1
  580. package/lib/organism/list-item/index.js +8 -5
  581. package/lib/organism/list-item/index.js.map +1 -1
  582. package/lib/organism/list-item/style.css +6 -4
  583. package/lib/organism/list-items/index.d.ts +121 -23
  584. package/lib/organism/list-items/index.d.ts.map +1 -1
  585. package/lib/organism/list-items/index.js +66 -14
  586. package/lib/organism/list-items/index.js.map +1 -1
  587. package/lib/organism/list-items/style.css +17 -0
  588. package/lib/organism/mobile-intro-popin/index.native.d.ts +20 -0
  589. package/lib/organism/mobile-intro-popin/index.native.d.ts.map +1 -0
  590. package/lib/organism/mobile-intro-popin/index.native.js +169 -0
  591. package/lib/organism/mobile-intro-popin/index.native.js.map +1 -0
  592. package/lib/organism/mooc/image-slider/index.d.ts +2 -0
  593. package/lib/organism/mooc-footer/index.js +1 -1
  594. package/lib/organism/mooc-footer/index.js.map +1 -1
  595. package/lib/organism/mooc-header/index.d.ts +3 -0
  596. package/lib/organism/mooc-header/index.d.ts.map +1 -1
  597. package/lib/organism/mooc-header/index.js +6 -2
  598. package/lib/organism/mooc-header/index.js.map +1 -1
  599. package/lib/organism/mooc-header/style.css +0 -1
  600. package/lib/organism/review-skills/index.native.js +1 -1
  601. package/lib/organism/review-skills/index.native.js.map +1 -1
  602. package/lib/organism/review-slide/index.native.d.ts.map +1 -1
  603. package/lib/organism/review-slide/index.native.js +39 -17
  604. package/lib/organism/review-slide/index.native.js.map +1 -1
  605. package/lib/organism/rewards-form/index.d.ts +2 -0
  606. package/lib/organism/sidebar/index.d.ts +2 -0
  607. package/lib/organism/sidebar/index.d.ts.map +1 -1
  608. package/lib/organism/wizard-contents/index.d.ts +94 -4
  609. package/lib/organism/wizard-contents/index.d.ts.map +1 -1
  610. package/lib/organism/wizard-contents/index.js +8 -1
  611. package/lib/organism/wizard-contents/index.js.map +1 -1
  612. package/lib/template/activity/engine-stars.d.ts.map +1 -1
  613. package/lib/template/activity/engine-stars.js +2 -1
  614. package/lib/template/activity/engine-stars.js.map +1 -1
  615. package/lib/template/activity/stars-summary.css +5 -3
  616. package/lib/template/activity/stars-summary.d.ts.map +1 -1
  617. package/lib/template/activity/stars-summary.js +3 -2
  618. package/lib/template/activity/stars-summary.js.map +1 -1
  619. package/lib/template/app-player/player/index.d.ts +2 -0
  620. package/lib/template/app-player/player/slides/footer/index.js +1 -1
  621. package/lib/template/app-player/player/slides/footer/index.js.map +1 -1
  622. package/lib/template/app-player/player/slides/header/index.js +2 -1
  623. package/lib/template/app-player/player/slides/header/index.js.map +1 -1
  624. package/lib/template/app-player/player/slides/header/microlearning.css +10 -0
  625. package/lib/template/app-player/player/slides/header/microlearning.d.ts +1 -0
  626. package/lib/template/app-player/player/slides/header/microlearning.d.ts.map +1 -1
  627. package/lib/template/app-player/player/slides/header/microlearning.js +35 -18
  628. package/lib/template/app-player/player/slides/header/microlearning.js.map +1 -1
  629. package/lib/template/app-player/player/slides/index.d.ts +2 -0
  630. package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
  631. package/lib/template/app-player/popin-correction/index.d.ts +2 -0
  632. package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
  633. package/lib/template/app-player/popin-end/index.d.ts +1 -0
  634. package/lib/template/app-player/popin-end/summary.d.ts +1 -0
  635. package/lib/template/app-player/popin-header/index.d.ts +1 -0
  636. package/lib/template/app-player/popin-header/index.d.ts.map +1 -1
  637. package/lib/template/app-review/index.native.d.ts.map +1 -1
  638. package/lib/template/app-review/index.native.js +2 -2
  639. package/lib/template/app-review/index.native.js.map +1 -1
  640. package/lib/template/back-office/brand-update/index.d.ts +298 -773
  641. package/lib/template/back-office/brand-update/index.d.ts.map +1 -1
  642. package/lib/template/back-office/brand-update/index.js +15 -1
  643. package/lib/template/back-office/brand-update/index.js.map +1 -1
  644. package/lib/template/cockpit/jw-uploader/index.d.ts +2 -0
  645. package/lib/template/common/discipline/index.d.ts.map +1 -1
  646. package/lib/template/common/discipline/index.js +4 -2
  647. package/lib/template/common/discipline/index.js.map +1 -1
  648. package/lib/template/common/search-page/index.d.ts +14 -3
  649. package/lib/template/external-course/index.d.ts +18 -22
  650. package/lib/template/external-course/index.d.ts.map +1 -1
  651. package/lib/template/external-course/index.js +70 -55
  652. package/lib/template/external-course/index.js.map +1 -1
  653. package/lib/template/mobile-login/confirm-email-sent/index.native.d.ts +13 -0
  654. package/lib/template/mobile-login/confirm-email-sent/index.native.d.ts.map +1 -0
  655. package/lib/template/mobile-login/confirm-email-sent/index.native.js +234 -0
  656. package/lib/template/mobile-login/confirm-email-sent/index.native.js.map +1 -0
  657. package/lib/template/mobile-login/qr-code-scanner/index.native.d.ts +16 -0
  658. package/lib/template/mobile-login/qr-code-scanner/index.native.d.ts.map +1 -0
  659. package/lib/template/mobile-login/qr-code-scanner/index.native.js +375 -0
  660. package/lib/template/mobile-login/qr-code-scanner/index.native.js.map +1 -0
  661. package/lib/template/mobile-login/receive-email/index.native.d.ts +14 -0
  662. package/lib/template/mobile-login/receive-email/index.native.d.ts.map +1 -0
  663. package/lib/template/mobile-login/receive-email/index.native.js +223 -0
  664. package/lib/template/mobile-login/receive-email/index.native.js.map +1 -0
  665. package/lib/template/mobile-login/welcome/index.native.d.ts +18 -0
  666. package/lib/template/mobile-login/welcome/index.native.d.ts.map +1 -0
  667. package/lib/template/mobile-login/welcome/index.native.js +311 -0
  668. package/lib/template/mobile-login/welcome/index.native.js.map +1 -0
  669. package/lib/template/teams-dashboard/index.d.ts +2 -0
  670. package/lib/util/button-icons.d.ts +1 -0
  671. package/lib/util/button-icons.d.ts.map +1 -1
  672. package/lib/util/button-icons.js +2 -1
  673. package/lib/util/button-icons.js.map +1 -1
  674. package/lib/util/proptypes.d.ts.map +1 -1
  675. package/lib/util/proptypes.js +2 -2
  676. package/lib/util/proptypes.js.map +1 -1
  677. package/lib/util/use-mobile-keyboard-visibility.d.ts +3 -0
  678. package/lib/util/use-mobile-keyboard-visibility.d.ts.map +1 -0
  679. package/lib/util/use-mobile-keyboard-visibility.js +31 -0
  680. package/lib/util/use-mobile-keyboard-visibility.js.map +1 -0
  681. package/locales/.mtslconfig.json +1 -0
  682. package/locales/bs/global.json +4 -1
  683. package/locales/cs/global.json +4 -1
  684. package/locales/de/global.json +4 -1
  685. package/locales/en/global.json +3 -1
  686. package/locales/es/global.json +4 -1
  687. package/locales/et/global.json +4 -1
  688. package/locales/fr/global.json +4 -1
  689. package/locales/hr/global.json +4 -1
  690. package/locales/hu/global.json +4 -1
  691. package/locales/hy/global.json +4 -1
  692. package/locales/it/global.json +4 -1
  693. package/locales/ja/global.json +4 -1
  694. package/locales/ko/global.json +4 -1
  695. package/locales/nl/global.json +4 -1
  696. package/locales/pl/global.json +4 -1
  697. package/locales/pt/global.json +4 -1
  698. package/locales/ro/global.json +4 -1
  699. package/locales/ru/global.json +4 -1
  700. package/locales/sk/global.json +4 -1
  701. package/locales/th/global.json +4 -1
  702. package/locales/tl/global.json +4 -1
  703. package/locales/tr/global.json +4 -1
  704. package/locales/uk/global.json +4 -1
  705. package/locales/vi/global.json +4 -1
  706. package/locales/zh/global.json +4 -1
  707. package/locales/zh_TW/global.json +4 -1
  708. package/package.json +6 -3
  709. package/es/organism/podcast-popin-intro/index.native.d.ts +0 -10
  710. package/es/organism/podcast-popin-intro/index.native.d.ts.map +0 -1
  711. package/es/organism/podcast-popin-intro/index.native.js +0 -114
  712. package/es/organism/podcast-popin-intro/index.native.js.map +0 -1
  713. package/lib/organism/podcast-popin-intro/index.native.d.ts +0 -10
  714. package/lib/organism/podcast-popin-intro/index.native.d.ts.map +0 -1
  715. package/lib/organism/podcast-popin-intro/index.native.js +0 -131
  716. package/lib/organism/podcast-popin-intro/index.native.js.map +0 -1
@@ -9,11 +9,13 @@ declare namespace Autocomplete {
9
9
  const required: PropTypes.Requireable<boolean>;
10
10
  const modified: PropTypes.Requireable<boolean>;
11
11
  const error: PropTypes.Requireable<boolean>;
12
+ const errorMessage: PropTypes.Requireable<string>;
12
13
  const suggestions: PropTypes.Requireable<(PropTypes.InferProps<{
13
14
  name: PropTypes.Requireable<string>;
14
15
  value: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
15
16
  }> | null | undefined)[]>;
16
- const onChange: PropTypes.Requireable<(...args: any[]) => any>;
17
+ const theme: PropTypes.Requireable<string>;
18
+ const onInput: PropTypes.Requireable<(...args: any[]) => any>;
17
19
  const onFetch: PropTypes.Requireable<(...args: any[]) => any>;
18
20
  const onClear: PropTypes.Requireable<(...args: any[]) => any>;
19
21
  const onBlur: PropTypes.Requireable<(...args: any[]) => any>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/autocomplete/index.js"],"names":[],"mappings":";AAUA,uDAoEC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/autocomplete/index.js"],"names":[],"mappings":";AAgBA,uDA8FC"}
@@ -1,11 +1,18 @@
1
+ import _keys from "lodash/fp/keys";
2
+ import _isEmpty from "lodash/fp/isEmpty";
1
3
  import _isNil from "lodash/fp/isNil";
2
4
  import _noop from "lodash/fp/noop";
3
- import React, { useMemo } from 'react';
5
+ import React, { useCallback, useMemo } from 'react';
4
6
  import Autosuggest from 'react-autosuggest';
5
7
  import PropTypes from 'prop-types';
6
8
  import classnames from 'classnames';
9
+ import { NovaSolidStatusClose as ErrorIcon } from '@coorpacademy/nova-icons';
7
10
  import getClassState from '../../util/get-class-state';
8
11
  import style from './style.css';
12
+ const THEME_STYLE = {
13
+ coorpmanager: style.coorpmanager,
14
+ default: style.default
15
+ };
9
16
 
10
17
  const renderSuggestion = suggestion => /*#__PURE__*/React.createElement("span", null, suggestion.name);
11
18
 
@@ -17,32 +24,51 @@ const Autocomplete = props => {
17
24
  required,
18
25
  modified = false,
19
26
  error = false,
27
+ errorMessage,
20
28
  suggestions = [],
21
- onChange = _noop,
29
+ onInput = _noop,
22
30
  onFetch = _noop,
23
31
  onClear = _noop,
24
32
  onBlur = _noop,
25
33
  onSuggestionSelected = _noop,
26
- title: propsTitle
34
+ title: propsTitle,
35
+ theme = 'default'
27
36
  } = props;
28
- const title = `${propsTitle}${required ? ' *' : ''}`;
29
- const className = getClassState(style.default, style.modified, style.error, modified, error);
30
- const handleChange = useMemo(() => e => onChange(e), [onChange]);
31
- const handleBlur = useMemo(() => (e, selectedSuggestion) => onBlur(e, selectedSuggestion), [onBlur]);
32
- const handleSuggestionsFetchRequested = useMemo(() => e => onFetch(e), [onFetch]);
33
- const handleSuggestionsClearRequested = useMemo(() => e => onClear(e), [onClear]);
34
- const handleSuggestionsSelected = useMemo(() => (e, data) => onSuggestionSelected(data), [onSuggestionSelected]);
37
+ const mainClass = THEME_STYLE[theme];
38
+ const title = useMemo(() => `${propsTitle}${required ? '*' : ''}`, [propsTitle, required]);
39
+ const className = useMemo(() => getClassState(style.default, style.modified, style.error, modified, error), [modified, error]);
40
+ const handleInput = useCallback(e => {
41
+ onInput(e);
42
+ }, [onInput]);
43
+ const handleBlur = useCallback((e, selectedSuggestion) => onBlur(e, selectedSuggestion), [onBlur]);
44
+ const handleSuggestionsFetchRequested = useCallback(e => onFetch(e), [onFetch]);
45
+ const handleSuggestionsClearRequested = useCallback(e => onClear(e), [onClear]);
46
+ const handleSuggestionsSelected = useCallback((e, data) => onSuggestionSelected(data), [onSuggestionSelected]);
35
47
  const inputProps = {
36
48
  placeholder,
37
49
  value,
38
- onChange: handleChange,
39
- onBlur: handleBlur
50
+ onChange: _noop,
51
+ onBlur: handleBlur,
52
+ onInput: handleInput,
53
+ 'data-testid': 'autocomplete-input'
40
54
  };
55
+ const errorIconView = theme === 'coorpmanager' && error ? /*#__PURE__*/React.createElement(ErrorIcon, {
56
+ className: style.leftIcon
57
+ }) : null;
58
+ const errorText = theme === 'coorpmanager' && error ? /*#__PURE__*/React.createElement("div", {
59
+ className: style.errorText // eslint-disable-next-line react/no-danger
60
+ ,
61
+ dangerouslySetInnerHTML: {
62
+ __html: errorMessage
63
+ }
64
+ }) : null;
41
65
  return /*#__PURE__*/React.createElement("div", {
42
- className: classnames(className, _isNil(title) && style.isNoTitle)
66
+ className: classnames(mainClass, className, _isNil(propsTitle) && style.isNoTitle)
43
67
  }, /*#__PURE__*/React.createElement("label", null, /*#__PURE__*/React.createElement("span", {
44
- className: style.title
45
- }, title), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Autosuggest, {
68
+ className: classnames(style.title, _isEmpty(value) && style.noValue)
69
+ }, title), /*#__PURE__*/React.createElement("div", {
70
+ className: style.inputContainer
71
+ }, /*#__PURE__*/React.createElement(Autosuggest, {
46
72
  theme: {
47
73
  container: style.container,
48
74
  input: style.input,
@@ -60,7 +86,7 @@ const Autocomplete = props => {
60
86
  inputProps: inputProps,
61
87
  focusInputOnSuggestionClick: false,
62
88
  onSuggestionSelected: handleSuggestionsSelected
63
- }))), /*#__PURE__*/React.createElement("div", {
89
+ }), errorIconView, errorText)), /*#__PURE__*/React.createElement("div", {
64
90
  className: style.description
65
91
  }, description));
66
92
  };
@@ -73,11 +99,13 @@ Autocomplete.propTypes = process.env.NODE_ENV !== "production" ? {
73
99
  required: PropTypes.bool,
74
100
  modified: PropTypes.bool,
75
101
  error: PropTypes.bool,
102
+ errorMessage: PropTypes.string,
76
103
  suggestions: PropTypes.arrayOf(PropTypes.shape({
77
104
  name: PropTypes.string,
78
105
  value: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
79
106
  })),
80
- onChange: PropTypes.func,
107
+ theme: PropTypes.oneOf(_keys(THEME_STYLE)),
108
+ onInput: PropTypes.func,
81
109
  onFetch: PropTypes.func,
82
110
  onClear: PropTypes.func,
83
111
  onBlur: PropTypes.func,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","useMemo","Autosuggest","PropTypes","classnames","getClassState","style","renderSuggestion","suggestion","name","Autocomplete","props","placeholder","value","description","required","modified","error","suggestions","onChange","onFetch","onClear","onBlur","onSuggestionSelected","title","propsTitle","className","default","handleChange","e","handleBlur","selectedSuggestion","handleSuggestionsFetchRequested","handleSuggestionsClearRequested","handleSuggestionsSelected","data","inputProps","isNoTitle","container","input","suggestionsContainer","suggestionsContainerOpen","suggestionsList","suggestionHighlighted","propTypes","string","bool","arrayOf","shape","oneOfType","number","func"],"sources":["../../../src/atom/autocomplete/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport Autosuggest from 'react-autosuggest';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {noop, isNil} from 'lodash/fp';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst renderSuggestion = suggestion => <span>{suggestion.name}</span>;\n\nconst Autocomplete = props => {\n const {\n placeholder = '',\n value,\n description,\n required,\n modified = false,\n error = false,\n suggestions = [],\n onChange = noop,\n onFetch = noop,\n onClear = noop,\n onBlur = noop,\n onSuggestionSelected = noop,\n title: propsTitle\n } = props;\n\n const title = `${propsTitle}${required ? ' *' : ''}`;\n const className = getClassState(style.default, style.modified, style.error, modified, error);\n\n const handleChange = useMemo(() => e => onChange(e), [onChange]);\n const handleBlur = useMemo(\n () => (e, selectedSuggestion) => onBlur(e, selectedSuggestion),\n [onBlur]\n );\n const handleSuggestionsFetchRequested = useMemo(() => e => onFetch(e), [onFetch]);\n const handleSuggestionsClearRequested = useMemo(() => e => onClear(e), [onClear]);\n const handleSuggestionsSelected = useMemo(\n () => (e, data) => onSuggestionSelected(data),\n [onSuggestionSelected]\n );\n\n const inputProps = {\n placeholder,\n value,\n onChange: handleChange,\n onBlur: handleBlur\n };\n\n return (\n <div className={classnames(className, isNil(title) && style.isNoTitle)}>\n <label>\n <span className={style.title}>{title}</span>\n <div>\n <Autosuggest\n theme={{\n container: style.container,\n input: style.input,\n suggestionsContainer: style.suggestionsContainer,\n suggestionsContainerOpen: style.suggestionsContainerOpen,\n suggestionsList: style.suggestionsList,\n suggestion: style.suggestion,\n suggestionHighlighted: style.suggestionHighlighted\n }}\n suggestions={suggestions}\n onSuggestionsFetchRequested={handleSuggestionsFetchRequested}\n onSuggestionsClearRequested={handleSuggestionsClearRequested}\n getSuggestionValue={noop}\n renderSuggestion={renderSuggestion}\n inputProps={inputProps}\n focusInputOnSuggestionClick={false}\n onSuggestionSelected={handleSuggestionsSelected}\n />\n </div>\n </label>\n <div className={style.description}>{description}</div>\n </div>\n );\n};\n\nAutocomplete.propTypes = {\n title: PropTypes.string,\n placeholder: PropTypes.string,\n value: PropTypes.string,\n description: PropTypes.string,\n required: PropTypes.bool,\n modified: PropTypes.bool,\n error: PropTypes.bool,\n suggestions: PropTypes.arrayOf(\n PropTypes.shape({\n name: PropTypes.string,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number])\n })\n ),\n onChange: PropTypes.func,\n onFetch: PropTypes.func,\n onClear: PropTypes.func,\n onBlur: PropTypes.func,\n onSuggestionSelected: PropTypes.func\n};\n\nexport default Autocomplete;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,OAAf,QAA6B,OAA7B;AACA,OAAOC,WAAP,MAAwB,mBAAxB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,OAAOC,aAAP,MAA0B,4BAA1B;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,gBAAgB,G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MAJA;EAKvB9B,QAAQ,EAAEZ,SAAS,CAAC2C,IALG;EAMvB9B,QAAQ,EAAEb,SAAS,CAAC2C,IANG;EAOvB7B,KAAK,EAAEd,SAAS,CAAC2C,IAPM;EAQvB5B,WAAW,EAAEf,SAAS,CAAC4C,OAAV,CACX5C,SAAS,CAAC6C,KAAV,CAAgB;IACdvC,IAAI,EAAEN,SAAS,CAAC0C,MADF;IAEdhC,KAAK,EAAEV,SAAS,CAAC8C,SAAV,CAAoB,CAAC9C,SAAS,CAAC0C,MAAX,EAAmB1C,SAAS,CAAC+C,MAA7B,CAApB;EAFO,CAAhB,CADW,CARU;EAcvB/B,QAAQ,EAAEhB,SAAS,CAACgD,IAdG;EAevB/B,OAAO,EAAEjB,SAAS,CAACgD,IAfI;EAgBvB9B,OAAO,EAAElB,SAAS,CAACgD,IAhBI;EAiBvB7B,MAAM,EAAEnB,SAAS,CAACgD,IAjBK;EAkBvB5B,oBAAoB,EAAEpB,SAAS,CAACgD;AAlBT,CAAzB;AAqBA,eAAezC,YAAf"}
1
+ {"version":3,"file":"index.js","names":["React","useCallback","useMemo","Autosuggest","PropTypes","classnames","NovaSolidStatusClose","ErrorIcon","getClassState","style","THEME_STYLE","coorpmanager","default","renderSuggestion","suggestion","name","Autocomplete","props","placeholder","value","description","required","modified","error","errorMessage","suggestions","onInput","onFetch","onClear","onBlur","onSuggestionSelected","title","propsTitle","theme","mainClass","className","handleInput","e","handleBlur","selectedSuggestion","handleSuggestionsFetchRequested","handleSuggestionsClearRequested","handleSuggestionsSelected","data","inputProps","onChange","errorIconView","leftIcon","errorText","__html","isNoTitle","noValue","inputContainer","container","input","suggestionsContainer","suggestionsContainerOpen","suggestionsList","suggestionHighlighted","propTypes","string","bool","arrayOf","shape","oneOfType","number","oneOf","func"],"sources":["../../../src/atom/autocomplete/index.js"],"sourcesContent":["import React, {useCallback, useMemo} from 'react';\nimport Autosuggest from 'react-autosuggest';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {noop, isNil, isEmpty, keys} from 'lodash/fp';\nimport {NovaSolidStatusClose as ErrorIcon} from '@coorpacademy/nova-icons';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst THEME_STYLE = {\n coorpmanager: style.coorpmanager,\n default: style.default\n};\n\nconst renderSuggestion = suggestion => <span>{suggestion.name}</span>;\n\nconst Autocomplete = props => {\n const {\n placeholder = '',\n value,\n description,\n required,\n modified = false,\n error = false,\n errorMessage,\n suggestions = [],\n onInput = noop,\n onFetch = noop,\n onClear = noop,\n onBlur = noop,\n onSuggestionSelected = noop,\n title: propsTitle,\n theme = 'default'\n } = props;\n\n const mainClass = THEME_STYLE[theme];\n const title = useMemo(() => `${propsTitle}${required ? '*' : ''}`, [propsTitle, required]);\n const className = useMemo(\n () => getClassState(style.default, style.modified, style.error, modified, error),\n [modified, error]\n );\n\n const handleInput = useCallback(\n e => {\n onInput(e);\n },\n [onInput]\n );\n const handleBlur = useCallback(\n (e, selectedSuggestion) => onBlur(e, selectedSuggestion),\n [onBlur]\n );\n const handleSuggestionsFetchRequested = useCallback(e => onFetch(e), [onFetch]);\n const handleSuggestionsClearRequested = useCallback(e => onClear(e), [onClear]);\n const handleSuggestionsSelected = useCallback(\n (e, data) => onSuggestionSelected(data),\n [onSuggestionSelected]\n );\n\n const inputProps = {\n placeholder,\n value,\n onChange: noop,\n onBlur: handleBlur,\n onInput: handleInput,\n 'data-testid': 'autocomplete-input'\n };\n\n const errorIconView =\n theme === 'coorpmanager' && error ? <ErrorIcon className={style.leftIcon} /> : null;\n\n const errorText =\n theme === 'coorpmanager' && error ? (\n <div\n className={style.errorText}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: errorMessage}}\n />\n ) : null;\n return (\n <div className={classnames(mainClass, className, isNil(propsTitle) && style.isNoTitle)}>\n <label>\n <span className={classnames(style.title, isEmpty(value) && style.noValue)}>{title}</span>\n <div className={style.inputContainer}>\n <Autosuggest\n theme={{\n container: style.container,\n input: style.input,\n suggestionsContainer: style.suggestionsContainer,\n suggestionsContainerOpen: style.suggestionsContainerOpen,\n suggestionsList: style.suggestionsList,\n suggestion: style.suggestion,\n suggestionHighlighted: style.suggestionHighlighted\n }}\n suggestions={suggestions}\n onSuggestionsFetchRequested={handleSuggestionsFetchRequested}\n onSuggestionsClearRequested={handleSuggestionsClearRequested}\n getSuggestionValue={noop}\n renderSuggestion={renderSuggestion}\n inputProps={inputProps}\n focusInputOnSuggestionClick={false}\n onSuggestionSelected={handleSuggestionsSelected}\n />\n {errorIconView}\n {errorText}\n </div>\n </label>\n <div className={style.description}>{description}</div>\n </div>\n );\n};\n\nAutocomplete.propTypes = {\n title: PropTypes.string,\n placeholder: PropTypes.string,\n value: PropTypes.string,\n description: PropTypes.string,\n required: PropTypes.bool,\n modified: PropTypes.bool,\n error: PropTypes.bool,\n errorMessage: PropTypes.string,\n suggestions: PropTypes.arrayOf(\n PropTypes.shape({\n name: PropTypes.string,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number])\n })\n ),\n theme: PropTypes.oneOf(keys(THEME_STYLE)),\n onInput: PropTypes.func,\n onFetch: PropTypes.func,\n onClear: PropTypes.func,\n onBlur: PropTypes.func,\n onSuggestionSelected: PropTypes.func\n};\n\nexport default Autocomplete;\n"],"mappings":";;;;AAAA,OAAOA,KAAP,IAAeC,WAAf,EAA4BC,OAA5B,QAA0C,OAA1C;AACA,OAAOC,WAAP,MAAwB,mBAAxB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,SAAQC,oBAAoB,IAAIC,SAAhC,QAAgD,0BAAhD;AACA,OAAOC,aAAP,MAA0B,4BAA1B;AACA,OAAOC,KAAP,MAAkB,aAAlB;AAEA,MAAMC,WAAW,GAAG;EAClBC,YAAY,EAAEF,KAAK,CAACE,YADF;EAElBC,OAAO,EAAEH,KAAK,CAACG;AAFG,CAApB;;AAKA,MAAMC,gBAAgB,GAAGC,UAAU,iBAAI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BgB,OAAO,EAAEtB,SAAS,CAAC+D,IAhBI;EAiBvBxC,OAAO,EAAEvB,SAAS,CAAC+D,IAjBI;EAkBvBvC,OAAO,EAAExB,SAAS,CAAC+D,IAlBI;EAmBvBtC,MAAM,EAAEzB,SAAS,CAAC+D,IAnBK;EAoBvBrC,oBAAoB,EAAE1B,SAAS,CAAC+D;AApBT,CAAzB;AAuBA,eAAenD,YAAf"}
@@ -5,6 +5,12 @@
5
5
  @value dark from colors;
6
6
  @value medium from colors;
7
7
  @value white from colors;
8
+ @value cm_positive_100 from colors;
9
+ @value cm_negative_100 from colors;
10
+ @value cm_grey_100 from colors;
11
+ @value cm_grey_150 from colors;
12
+ @value cm_grey_400 from colors;
13
+ @value cm_grey_700 from colors;
8
14
 
9
15
  .default {
10
16
  display: flex;
@@ -127,4 +133,147 @@
127
133
 
128
134
  .suggestionHighlighted {
129
135
  background-color: #ddd;
130
- }
136
+ }
137
+
138
+ /******************************* coorpmanager theme ***************************************/
139
+
140
+ .coorpmanager {
141
+ width: 100%;
142
+ display: flex;
143
+ align-items: flex-start;
144
+ flex-direction: column;
145
+ flex-wrap: nowrap;
146
+ position: relative;
147
+ }
148
+
149
+ .coorpmanager label {
150
+ width: 100%;
151
+ height: 100%;
152
+ margin-right: 0;
153
+ display: flex;
154
+ align-items: flex-start;
155
+ flex-direction: column;
156
+ position: relative;
157
+ }
158
+
159
+ .coorpmanager .title {
160
+ flex-grow: 0;
161
+ font-family: Gilroy;
162
+ font-size: 10px;
163
+ font-weight: bold;
164
+ font-stretch: normal;
165
+ font-style: normal;
166
+ line-height: 1.2;
167
+ letter-spacing: normal;
168
+ text-align: left;
169
+ z-index: 1;
170
+ color: cm_grey_400;
171
+ width: auto;
172
+ transition: all 0.25s linear;
173
+ pointer-events: none;
174
+ display: flex;
175
+ flex-direction: row;
176
+ flex-wrap: nowrap;
177
+ position: absolute;
178
+ top: 7px;
179
+ left: 16px;
180
+ }
181
+
182
+ .coorpmanager .title.noValue{
183
+ font-size: 14px;
184
+ font-weight: 500;
185
+ color: cm_grey_700;
186
+ top: 14px;
187
+ }
188
+
189
+ .coorpmanager:focus-within .title.noValue {
190
+ font-size: 10px;
191
+ font-weight: bold;
192
+ color: cm_grey_400;
193
+ top: 7px;
194
+ }
195
+
196
+ .coorpmanager .inputContainer {
197
+ width: 100%
198
+ }
199
+
200
+ .coorpmanager input {
201
+ width: 100%;
202
+ height: 44px;
203
+ margin: 0px;
204
+ display: flex;
205
+ align-items: flex-start;
206
+ flex-direction: column;
207
+ flex-grow: 0;
208
+ justify-content: center;
209
+ background-color: cm_grey_100;
210
+ box-sizing: border-box;
211
+ border: none;
212
+ border-radius: 7px;
213
+ color: cm_grey_700;
214
+ font-family: Gilroy;
215
+ font-size: 14px;
216
+ font-weight: 500;
217
+ font-stretch: normal;
218
+ font-style: normal;
219
+ line-height: 44px;
220
+ letter-spacing: normal;
221
+ outline: none;
222
+ padding: 19px 30px 5px 16px;
223
+ text-align: left;
224
+ transition: all 0.25s linear;
225
+ }
226
+
227
+ .coorpmanager .suggestionsContainerOpen {
228
+ width: 100%;
229
+ margin-left: 0;
230
+ border-radius: 7px;
231
+ }
232
+
233
+ .coorpmanager:focus-within input::placeholder {
234
+ color: cm_grey_400;
235
+ }
236
+
237
+ .coorpmanager .suggestionsList {
238
+ border-radius: 7px;
239
+ }
240
+
241
+ .coorpmanager .suggestionHighlighted {
242
+ border-radius: 5px;
243
+ }
244
+
245
+ .coorpmanager input::placeholder {
246
+ color: transparent;
247
+ transition: color 0.25s linear;
248
+ }
249
+
250
+ .coorpmanager input:hover {
251
+ background-color: cm_grey_150;
252
+ }
253
+
254
+ .coorpmanager.error .leftIcon {
255
+ background-color: cm_negative_100;
256
+ color: white;
257
+ border-radius: 50%;
258
+ padding: 2px;
259
+ width: 10px;
260
+ height: 10px;
261
+ position: absolute;
262
+ right: 17px;
263
+ top: 14px;
264
+ }
265
+
266
+ .coorpmanager .errorText {
267
+ flex-grow: 0;
268
+ opacity: 0.5;
269
+ font-family: Gilroy;
270
+ font-size: 10px;
271
+ font-weight: 500;
272
+ font-stretch: normal;
273
+ font-style: normal;
274
+ line-height: 1.2;
275
+ letter-spacing: normal;
276
+ text-align: left;
277
+ padding-top: 8px;
278
+ color: cm_negative_100;
279
+ }
@@ -48,5 +48,5 @@
48
48
  .icon {
49
49
  width: 20px;
50
50
  height: 20px;
51
- color: "#fff";
51
+ color: white;
52
52
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/battle-opponent/index.tsx"],"names":[],"mappings":";AAUA,OAAO,EAAC,gBAAgB,EAAC,MAAM,yBAAyB,CAAC;AACzD,OAAkB,EAAC,mBAAmB,EAAC,MAAM,cAAc,CAAC;AAG5D,QAAA,MAAM,cAAc;gHASf,mBAAmB,iBACP,gBAAgB;;;;;;;;;;;;;CAyGhC,CAAC;AAQF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/battle-opponent/index.tsx"],"names":[],"mappings":";AAUA,OAAO,EAAC,gBAAgB,EAAC,MAAM,yBAAyB,CAAC;AACzD,OAAkB,EAAC,mBAAmB,EAAC,MAAM,cAAc,CAAC;AAG5D,QAAA,MAAM,cAAc;gHASf,mBAAmB,iBACP,gBAAgB;;;;;;;;;;;;;CA2GhC,CAAC;AAQF,eAAe,cAAc,CAAC"}
@@ -83,13 +83,15 @@ const BattleOpponent = ({
83
83
  className: style.informationIcon,
84
84
  width: 20,
85
85
  height: 20
86
- })), /*#__PURE__*/React.createElement(ToolTip, {
86
+ })), /*#__PURE__*/React.createElement("span", {
87
+ className: style.toolTipWrapper
88
+ }, /*#__PURE__*/React.createElement(ToolTip, {
87
89
  fontSize: 12,
88
90
  anchorId: battleOpponentInfoId,
89
91
  toolTipIsVisible: toolTipIsVisible,
90
92
  TooltipContent: TooltipContent,
91
93
  closeToolTipInformationTextAriaLabel: translate('Press the escape key to close the information text')
92
- })) : /*#__PURE__*/React.createElement(ArrowRight, {
94
+ }))) : /*#__PURE__*/React.createElement(ArrowRight, {
93
95
  className: style.rightArrow,
94
96
  width: 16,
95
97
  height: 16
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","useCallback","useMemo","useState","useRef","classnames","v5","uuidV5","has","NovaCompositionNavigationArrowRight","ArrowRight","NovaCompositionCoorpacademyInformationIcon","InformationIcon","ToolTip","toggleStateOnKeyPress","Provider","GetTranslateFromContext","propTypes","style","BattleOpponent","isAlreadyEngaged","isRandom","userAvatarSrc","onClick","displayName","tooltipText","ariaLabel","legacyContext","translate","wrapperClassnames","card","random","displayNameClassnames","name","alreadyEngaged","mouseLeaveTimer","setMouseLeaveTimer","undefined","toolTipIsVisible","setToolTipIsVisible","battleOpponentInfoId","URL","buttonRef","handleMouseOver","clearTimeout","current","focus","handleMouseLeave","setTimeout","blur","handleKeyPress","event","TooltipContent","_props","avatar","tooltipIconContainer","informationIcon","rightArrow","contextTypes","childContextTypes"],"sources":["../../../src/atom/battle-opponent/index.tsx"],"sourcesContent":["import React, {useCallback, useMemo, useState, useRef} from 'react';\nimport classnames from 'classnames';\nimport {v5 as uuidV5} from 'uuid';\nimport has from 'lodash/fp/has';\nimport {\n NovaCompositionNavigationArrowRight as ArrowRight,\n NovaCompositionCoorpacademyInformationIcon as InformationIcon\n} from '@coorpacademy/nova-icons';\nimport ToolTip, {toggleStateOnKeyPress} from '../tooltip';\nimport Provider, {GetTranslateFromContext} from '../provider';\nimport {WebContextValues} from '../provider/web-context';\nimport propTypes, {BattleOpponentProps} from './prop-types';\nimport style from './style.css';\n\nconst BattleOpponent = (\n {\n isAlreadyEngaged,\n isRandom,\n userAvatarSrc,\n onClick,\n displayName,\n tooltipText,\n 'aria-label': ariaLabel\n }: BattleOpponentProps,\n legacyContext: WebContextValues\n) => {\n const translate: Required<WebContextValues>['translate'] = GetTranslateFromContext(legacyContext);\n const wrapperClassnames = useMemo(\n () => classnames(style.card, style['opponent-card'], isRandom ? style.random : null),\n [isRandom]\n );\n\n const displayNameClassnames = useMemo(\n () => classnames(style.name, isAlreadyEngaged ? style.alreadyEngaged : null),\n [isAlreadyEngaged]\n );\n\n const [mouseLeaveTimer, setMouseLeaveTimer] = useState<number | undefined>(undefined);\n const [toolTipIsVisible, setToolTipIsVisible] = useState(false);\n\n // to be replaced by useId when React17 is bumped to React18\n const [battleOpponentInfoId] = useState(\n isAlreadyEngaged ? uuidV5('engaged-battle-', uuidV5.URL) : undefined\n );\n\n const buttonRef = useRef(null);\n\n const handleMouseOver = useCallback(() => {\n mouseLeaveTimer && clearTimeout(mouseLeaveTimer);\n // @ts-expect-error (error: focus does not exists on type never)\n /* istanbul ignore next */ has(['current', 'focus'], buttonRef) && buttonRef.current.focus();\n setToolTipIsVisible(true);\n }, [mouseLeaveTimer]);\n\n const handleMouseLeave = useCallback(() => {\n setMouseLeaveTimer(\n setTimeout(() => {\n setToolTipIsVisible(false);\n // @ts-expect-error (error: blur does not exists on type never)\n /* istanbul ignore next */ has(['current', 'blur'], buttonRef) && buttonRef.current.blur();\n }, 500) as unknown as number\n );\n }, []);\n\n const handleKeyPress = useCallback(\n event => {\n toggleStateOnKeyPress(toolTipIsVisible, setToolTipIsVisible, buttonRef)(event);\n },\n [toolTipIsVisible]\n );\n\n const TooltipContent = useCallback(\n _props => (\n <p\n {..._props}\n onMouseOver={handleMouseOver}\n onMouseLeave={handleMouseLeave}\n data-testid=\"battle-opponent-tooltip-content\"\n >\n {tooltipText}\n </p>\n ),\n [handleMouseLeave, handleMouseOver, tooltipText]\n );\n\n return (\n <li\n {...(!isAlreadyEngaged && {onClick})}\n className={wrapperClassnames}\n data-testid=\"battle-opponent-wrapper\"\n tabIndex={0}\n >\n <div className={style.avatar}>{isRandom ? null : <img src={userAvatarSrc} alt=\"\" />}</div>\n <p className={displayNameClassnames} tabIndex={0}>\n {displayName}\n </p>\n {isAlreadyEngaged ? (\n <>\n <button\n ref={buttonRef}\n tabIndex={0}\n type=\"button\"\n className={style.tooltipIconContainer}\n data-testid=\"battle-engaged-opponent-information-button\"\n onKeyDown={handleKeyPress}\n onMouseLeave={handleMouseLeave}\n onMouseOver={handleMouseOver}\n data-for={battleOpponentInfoId}\n data-tooltip-place=\"left\"\n data-tip={isAlreadyEngaged}\n aria-label={ariaLabel}\n >\n <InformationIcon className={style.informationIcon} width={20} height={20} />\n </button>\n <ToolTip\n fontSize={12}\n anchorId={battleOpponentInfoId}\n toolTipIsVisible={toolTipIsVisible}\n TooltipContent={TooltipContent}\n closeToolTipInformationTextAriaLabel={translate(\n 'Press the escape key to close the information text'\n )}\n />\n </>\n ) : (\n <ArrowRight className={style.rightArrow} width={16} height={16} />\n )}\n </li>\n );\n};\n\nBattleOpponent.propTypes = propTypes;\n\nBattleOpponent.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nexport default BattleOpponent;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,WAAf,EAA4BC,OAA5B,EAAqCC,QAArC,EAA+CC,MAA/C,QAA4D,OAA5D;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,SAAQC,EAAE,IAAIC,MAAd,QAA2B,MAA3B;AACA,OAAOC,GAAP,MAAgB,eAAhB;AACA,SACEC,mCAAmC,IAAIC,UADzC,EAEEC,0CAA0C,IAAIC,eAFhD,QAGO,0BAHP;AAIA,OAAOC,OAAP,IAAiBC,qBAAjB,QAA6C,YAA7C;AACA,OAAOC,QAAP,IAAkBC,uBAAlB,QAAgD,aAAhD;AAEA,OAAOC,SAAP,MAA6C,cAA7C;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,cAAc,GAAG,CACrB;EACEC,gBADF;EAEEC,QAFF;EAGEC,aAHF;EAIEC,OAJF;EAKEC,WALF;EAMEC,WANF;EAOE,cAAcC;AAPhB,CADqB,EAUrBC,aAVqB,KAWlB;EACH,MAAMC,SAAkD,GAAGZ,uBAAuB,CAACW,aAAD,CAAlF;EACA,MAAME,iBAAiB,GAAG3B,OAAO,CAC/B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D;IAAiB,SAAS,EAAER,KAAK,CAACsC,eAAlC;IAAmD,KAAK,EAAE,EAA1D;IAA8D,MAAM,EAAE;EAAtE,EAdF,CADF,eAiBE,oBAAC,OAAD;IACE,QAAQ,EAAE,EADZ;IAEE,QAAQ,EAAEhB,oBAFZ;IAGE,gBAAgB,EAAEF,gBAHpB;IAIE,cAAc,EAAEc,cAJlB;IAKE,oCAAoC,EAAExB,SAAS,CAC7C,oDAD6C;EALjD,EAjBF,CADe,gBA6Bf,oBAAC,UAAD;IAAY,SAAS,EAAEV,KAAK,CAACuC,UAA7B;IAAyC,KAAK,EAAE,EAAhD;IAAoD,MAAM,EAAE;EAA5D,EAvCJ,CADF;AA4CD,CAnHD;;AAqHAtC,cAAc,CAACF,SAAf,2CAA2BA,SAA3B;AAEAE,cAAc,CAACuC,YAAf,GAA8B;EAC5B9B,SAAS,EAAEb,QAAQ,CAAC4C,iBAAT,CAA2B/B;AADV,CAA9B;AAIA,eAAeT,cAAf"}
1
+ {"version":3,"file":"index.js","names":["React","useCallback","useMemo","useState","useRef","classnames","v5","uuidV5","has","NovaCompositionNavigationArrowRight","ArrowRight","NovaCompositionCoorpacademyInformationIcon","InformationIcon","ToolTip","toggleStateOnKeyPress","Provider","GetTranslateFromContext","propTypes","style","BattleOpponent","isAlreadyEngaged","isRandom","userAvatarSrc","onClick","displayName","tooltipText","ariaLabel","legacyContext","translate","wrapperClassnames","card","random","displayNameClassnames","name","alreadyEngaged","mouseLeaveTimer","setMouseLeaveTimer","undefined","toolTipIsVisible","setToolTipIsVisible","battleOpponentInfoId","URL","buttonRef","handleMouseOver","clearTimeout","current","focus","handleMouseLeave","setTimeout","blur","handleKeyPress","event","TooltipContent","_props","avatar","tooltipIconContainer","informationIcon","toolTipWrapper","rightArrow","contextTypes","childContextTypes"],"sources":["../../../src/atom/battle-opponent/index.tsx"],"sourcesContent":["import React, {useCallback, useMemo, useState, useRef} from 'react';\nimport classnames from 'classnames';\nimport {v5 as uuidV5} from 'uuid';\nimport has from 'lodash/fp/has';\nimport {\n NovaCompositionNavigationArrowRight as ArrowRight,\n NovaCompositionCoorpacademyInformationIcon as InformationIcon\n} from '@coorpacademy/nova-icons';\nimport ToolTip, {toggleStateOnKeyPress} from '../tooltip';\nimport Provider, {GetTranslateFromContext} from '../provider';\nimport {WebContextValues} from '../provider/web-context';\nimport propTypes, {BattleOpponentProps} from './prop-types';\nimport style from './style.css';\n\nconst BattleOpponent = (\n {\n isAlreadyEngaged,\n isRandom,\n userAvatarSrc,\n onClick,\n displayName,\n tooltipText,\n 'aria-label': ariaLabel\n }: BattleOpponentProps,\n legacyContext: WebContextValues\n) => {\n const translate: Required<WebContextValues>['translate'] = GetTranslateFromContext(legacyContext);\n const wrapperClassnames = useMemo(\n () => classnames(style.card, style['opponent-card'], isRandom ? style.random : null),\n [isRandom]\n );\n\n const displayNameClassnames = useMemo(\n () => classnames(style.name, isAlreadyEngaged ? style.alreadyEngaged : null),\n [isAlreadyEngaged]\n );\n\n const [mouseLeaveTimer, setMouseLeaveTimer] = useState<number | undefined>(undefined);\n const [toolTipIsVisible, setToolTipIsVisible] = useState(false);\n\n // to be replaced by useId when React17 is bumped to React18\n const [battleOpponentInfoId] = useState(\n isAlreadyEngaged ? uuidV5('engaged-battle-', uuidV5.URL) : undefined\n );\n\n const buttonRef = useRef(null);\n\n const handleMouseOver = useCallback(() => {\n mouseLeaveTimer && clearTimeout(mouseLeaveTimer);\n // @ts-expect-error (error: focus does not exists on type never)\n /* istanbul ignore next */ has(['current', 'focus'], buttonRef) && buttonRef.current.focus();\n setToolTipIsVisible(true);\n }, [mouseLeaveTimer]);\n\n const handleMouseLeave = useCallback(() => {\n setMouseLeaveTimer(\n setTimeout(() => {\n setToolTipIsVisible(false);\n // @ts-expect-error (error: blur does not exists on type never)\n /* istanbul ignore next */ has(['current', 'blur'], buttonRef) && buttonRef.current.blur();\n }, 500) as unknown as number\n );\n }, []);\n\n const handleKeyPress = useCallback(\n event => {\n toggleStateOnKeyPress(toolTipIsVisible, setToolTipIsVisible, buttonRef)(event);\n },\n [toolTipIsVisible]\n );\n\n const TooltipContent = useCallback(\n _props => (\n <p\n {..._props}\n onMouseOver={handleMouseOver}\n onMouseLeave={handleMouseLeave}\n data-testid=\"battle-opponent-tooltip-content\"\n >\n {tooltipText}\n </p>\n ),\n [handleMouseLeave, handleMouseOver, tooltipText]\n );\n\n return (\n <li\n {...(!isAlreadyEngaged && {onClick})}\n className={wrapperClassnames}\n data-testid=\"battle-opponent-wrapper\"\n tabIndex={0}\n >\n <div className={style.avatar}>{isRandom ? null : <img src={userAvatarSrc} alt=\"\" />}</div>\n <p className={displayNameClassnames} tabIndex={0}>\n {displayName}\n </p>\n {isAlreadyEngaged ? (\n <>\n <button\n ref={buttonRef}\n tabIndex={0}\n type=\"button\"\n className={style.tooltipIconContainer}\n data-testid=\"battle-engaged-opponent-information-button\"\n onKeyDown={handleKeyPress}\n onMouseLeave={handleMouseLeave}\n onMouseOver={handleMouseOver}\n data-for={battleOpponentInfoId}\n data-tooltip-place=\"left\"\n data-tip={isAlreadyEngaged}\n aria-label={ariaLabel}\n >\n <InformationIcon className={style.informationIcon} width={20} height={20} />\n </button>\n <span className={style.toolTipWrapper}>\n <ToolTip\n fontSize={12}\n anchorId={battleOpponentInfoId}\n toolTipIsVisible={toolTipIsVisible}\n TooltipContent={TooltipContent}\n closeToolTipInformationTextAriaLabel={translate(\n 'Press the escape key to close the information text'\n )}\n />\n </span>\n </>\n ) : (\n <ArrowRight className={style.rightArrow} width={16} height={16} />\n )}\n </li>\n );\n};\n\nBattleOpponent.propTypes = propTypes;\n\nBattleOpponent.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nexport default BattleOpponent;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,WAAf,EAA4BC,OAA5B,EAAqCC,QAArC,EAA+CC,MAA/C,QAA4D,OAA5D;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,SAAQC,EAAE,IAAIC,MAAd,QAA2B,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
  }
114
114
 
115
+ .toolTipWrapper {
116
+ position: absolute;
117
+ width: 100%;
118
+ }
119
+
120
+ .card .tooltipIconContainer + .toolTipWrapper [class*="__react_component_tooltip"]:not([class*="toolTipReact"]) {
121
+ position: sticky;
122
+ top: unset !important;
123
+ left: unset !important;
124
+ max-width: 75%;
125
+ }
126
+
115
127
  @media mobile {
116
128
  .opponent-card {
117
129
  width: 100%;
@@ -5,17 +5,28 @@ declare namespace Button {
5
5
  color: any;
6
6
  submitValue: PropTypes.Requireable<string>;
7
7
  disabled: PropTypes.Requireable<boolean>;
8
- isLinkDisabled: PropTypes.Requireable<boolean>;
9
8
  href: PropTypes.Requireable<string>;
10
9
  download: PropTypes.Requireable<boolean>;
11
10
  target: PropTypes.Requireable<string>;
12
11
  type: PropTypes.Requireable<string>;
13
- onClick: PropTypes.Requireable<(...args: any[]) => any>;
14
12
  children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
15
13
  className: PropTypes.Requireable<string>;
16
- buttonContentClassName: PropTypes.Requireable<string>;
17
14
  style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
18
15
  'data-name': PropTypes.Requireable<string>;
16
+ 'aria-label': PropTypes.Requireable<string>;
17
+ 'data-testid': PropTypes.Requireable<string>;
18
+ useButtonTag: PropTypes.Requireable<boolean>;
19
+ onClick: PropTypes.Requireable<(...args: any[]) => any>;
20
+ onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
21
+ onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
22
+ onMouseOver: PropTypes.Requireable<(...args: any[]) => any>;
23
+ buttonRef: PropTypes.Requireable<PropTypes.InferProps<{}>>;
24
+ 'data-for': PropTypes.Requireable<string>;
25
+ 'data-tooltip-place': PropTypes.Requireable<string>;
26
+ 'data-tip': PropTypes.Requireable<boolean>;
27
+ isLinkDisabled: PropTypes.Requireable<boolean>;
28
+ useWrapper: PropTypes.Requireable<boolean>;
29
+ buttonContentClassName: PropTypes.Requireable<string>;
19
30
  };
20
31
  }
21
32
  import PropTypes from "prop-types";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button/index.js"],"names":[],"mappings":";AA6FA,iDA0BC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button/index.js"],"names":[],"mappings":";AA8IA,iDAgCC"}
@@ -1,8 +1,9 @@
1
1
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
2
 
3
- import React from 'react';
3
+ import React, { useMemo } from 'react';
4
4
  import PropTypes from 'prop-types';
5
5
  import classnames from 'classnames';
6
+ import noop from 'lodash/fp/noop';
6
7
  import { ColorPropType } from '../../util/proptypes';
7
8
  import Link from '../link';
8
9
  import cssStyle from './style.css';
@@ -16,12 +17,21 @@ const ButtonContent = props => {
16
17
  href,
17
18
  target,
18
19
  onClick,
19
- className = cssStyle.button,
20
+ className,
20
21
  children,
21
22
  type,
22
23
  style,
23
24
  'data-name': dataName,
24
- 'aria-label': ariaLabel
25
+ 'aria-label': ariaLabel,
26
+ 'data-testid': dataTestid,
27
+ useButtonTag,
28
+ buttonRef,
29
+ 'data-for': dataFor,
30
+ 'data-tooltip-place': dataTooltipPlace,
31
+ 'data-tip': dataTip,
32
+ onKeyDown = noop,
33
+ onMouseLeave = noop,
34
+ onMouseOver = noop
25
35
  } = props;
26
36
  const anchorClassName = disabled && `${className} ${cssStyle.disabledAnchor}` || className;
27
37
  const anchorOnClick = disabled && null || onClick;
@@ -38,7 +48,8 @@ const ButtonContent = props => {
38
48
  target: target,
39
49
  className: anchorClassName,
40
50
  style: style,
41
- "aria-label": ariaLabel
51
+ "aria-label": ariaLabel,
52
+ "data-testid": dataTestid
42
53
  }, submitValue || children || 'submit');
43
54
 
44
55
  case 'a':
@@ -48,21 +59,45 @@ const ButtonContent = props => {
48
59
  target: target,
49
60
  className: anchorClassName,
50
61
  onClick: anchorOnClick,
51
- style: style
62
+ style: style,
63
+ "data-testid": dataTestid
52
64
  }, submitValue || children);
53
65
 
54
- default:
55
- return /*#__PURE__*/React.createElement("input", {
66
+ case 'button':
67
+ if (useButtonTag) return /*#__PURE__*/React.createElement("button", {
68
+ ref: buttonRef,
69
+ type: "button",
70
+ "data-for": dataFor,
71
+ "data-tooltip-place": dataTooltipPlace,
72
+ "data-tip": dataTip,
56
73
  "data-name": dataName,
57
- type: type,
58
- value: submitValue,
59
- disabled: disabled,
74
+ "data-testid": dataTestid,
75
+ "aria-label": ariaLabel.favorite,
76
+ className: className,
60
77
  onClick: onClick,
61
- className: inputClassName,
62
- style: _extends({
63
- color
64
- }, style)
65
- });
78
+ style: style,
79
+ onKeyDown: onKeyDown,
80
+ onMouseLeave: onMouseLeave,
81
+ onMouseOver: onMouseOver,
82
+ tabIndex: 0
83
+ }, children);
84
+ // falls through in case type is button BUT no button tag is needed, for retro-compatibility
85
+
86
+ default:
87
+ {
88
+ return /*#__PURE__*/React.createElement("input", {
89
+ "data-name": dataName,
90
+ type: type,
91
+ value: submitValue,
92
+ disabled: disabled,
93
+ onClick: onClick,
94
+ className: inputClassName,
95
+ "data-testid": dataTestid,
96
+ style: _extends({
97
+ color
98
+ }, style)
99
+ });
100
+ }
66
101
  }
67
102
  };
68
103
 
@@ -74,12 +109,23 @@ ButtonContent.propTypes = process.env.NODE_ENV !== "production" ? {
74
109
  download: PropTypes.bool,
75
110
  target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top']),
76
111
  type: PropTypes.string,
77
- onClick: PropTypes.func,
78
112
  children: PropTypes.node,
79
113
  className: PropTypes.string,
80
114
  style: PropTypes.shape({}),
81
115
  'data-name': PropTypes.string,
82
- 'aria-label': PropTypes.string
116
+ 'aria-label': PropTypes.string,
117
+ 'data-testid': PropTypes.string,
118
+ useButtonTag: PropTypes.bool,
119
+ // event handlers
120
+ onClick: PropTypes.func,
121
+ onKeyDown: PropTypes.func,
122
+ onMouseLeave: PropTypes.func,
123
+ onMouseOver: PropTypes.func,
124
+ // for ReactTooltip handling
125
+ buttonRef: PropTypes.shape({}),
126
+ 'data-for': PropTypes.string,
127
+ 'data-tooltip-place': PropTypes.string,
128
+ 'data-tip': PropTypes.bool
83
129
  } : {};
84
130
 
85
131
  const Button = props => {
@@ -89,33 +135,25 @@ const Button = props => {
89
135
  isLinkDisabled,
90
136
  type = 'submit',
91
137
  children,
92
- style
138
+ useWrapper = true
93
139
  } = props;
94
- const cNames = isLinkDisabled && classnames([cssStyle.disabledAnchor, className]) || classnames([cssStyle.button, className]);
95
- return /*#__PURE__*/React.createElement("div", {
96
- className: cNames
140
+ const buttonWrapperClassNames = useMemo(() => isLinkDisabled && classnames([cssStyle.disabledAnchor, className]) || classnames([cssStyle.button, className]), [className, isLinkDisabled]);
141
+ const contentClassName = useMemo(() => buttonContentClassName ? buttonContentClassName : cssStyle.buttonContent, [buttonContentClassName]);
142
+ return useWrapper ? /*#__PURE__*/React.createElement("div", {
143
+ className: buttonWrapperClassNames
97
144
  }, /*#__PURE__*/React.createElement(ButtonContent, _extends({}, props, {
98
145
  type: type,
99
- className: buttonContentClassName ? buttonContentClassName : cssStyle.buttonContent,
100
- style: _extends({}, style)
101
- }), children));
146
+ className: contentClassName
147
+ }), children)) : /*#__PURE__*/React.createElement(ButtonContent, _extends({}, props, {
148
+ type: type,
149
+ className: contentClassName
150
+ }), children);
102
151
  };
103
152
 
104
- Button.propTypes = process.env.NODE_ENV !== "production" ? {
105
- color: ColorPropType,
106
- submitValue: PropTypes.string,
107
- disabled: PropTypes.bool,
153
+ Button.propTypes = process.env.NODE_ENV !== "production" ? _extends({
108
154
  isLinkDisabled: PropTypes.bool,
109
- href: PropTypes.string,
110
- download: PropTypes.bool,
111
- target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top']),
112
- type: PropTypes.string,
113
- onClick: PropTypes.func,
114
- children: PropTypes.node,
115
- className: PropTypes.string,
116
- buttonContentClassName: PropTypes.string,
117
- style: PropTypes.shape({}),
118
- 'data-name': PropTypes.string
119
- } : {};
155
+ useWrapper: PropTypes.bool,
156
+ buttonContentClassName: PropTypes.string
157
+ }, ButtonContent.propTypes) : {};
120
158
  export default Button;
121
159
  //# sourceMappingURL=index.js.map