@coorpacademy/components 11.2.9 → 11.2.11-alpha.10

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 (203) hide show
  1. package/es/atom/clue/index.d.ts +1 -1
  2. package/es/atom/lottie-wrapper/index.d.ts.map +1 -1
  3. package/es/atom/lottie-wrapper/index.js +9 -3
  4. package/es/atom/lottie-wrapper/index.js.map +1 -1
  5. package/es/atom/lottie-wrapper/prop-types.d.ts +2 -2
  6. package/es/atom/lottie-wrapper/prop-types.d.ts.map +1 -1
  7. package/es/atom/lottie-wrapper/prop-types.js +1 -1
  8. package/es/atom/lottie-wrapper/prop-types.js.map +1 -1
  9. package/es/atom/promo-code/index.d.ts +1 -1
  10. package/es/atom/provider/index.d.ts +1 -1
  11. package/es/atom/provider/index.js +1 -1
  12. package/es/atom/provider/index.js.map +1 -1
  13. package/es/atom/review-presentation/index.d.ts.map +1 -1
  14. package/es/atom/review-presentation/index.js +82 -20
  15. package/es/atom/review-presentation/index.js.map +1 -1
  16. package/es/atom/review-presentation/prop-types.d.ts +12 -0
  17. package/es/atom/review-presentation/prop-types.d.ts.map +1 -1
  18. package/es/atom/review-presentation/prop-types.js +3 -1
  19. package/es/atom/review-presentation/prop-types.js.map +1 -1
  20. package/es/atom/review-presentation/style.css +3 -14
  21. package/es/atom/select/index.d.ts +16 -17
  22. package/es/atom/select/index.d.ts.map +1 -1
  23. package/es/atom/select/index.js +7 -6
  24. package/es/atom/select/index.js.map +1 -1
  25. package/es/atom/tab-content/index.d.ts +1 -1
  26. package/es/molecule/answer/index.d.ts.map +1 -1
  27. package/es/molecule/answer/index.js +9 -1
  28. package/es/molecule/answer/index.js.map +1 -1
  29. package/es/molecule/battle-request/index.d.ts +1 -1
  30. package/es/molecule/brand-create-form/index.d.ts +1 -1
  31. package/es/molecule/brand-form-group/index.d.ts +2 -2
  32. package/es/molecule/card-with-button/index.d.ts +1 -1
  33. package/es/molecule/cookie-banner/index.d.ts +1 -1
  34. package/es/molecule/dashboard/cards-list/index.d.ts +1 -1
  35. package/es/molecule/discipline-partners/index.d.ts +1 -1
  36. package/es/molecule/external-content-button/index.d.ts +1 -1
  37. package/es/molecule/filters/index.d.ts +1 -1
  38. package/es/molecule/forum/forum-comment/index.d.ts +1 -1
  39. package/es/molecule/forum/forum-post/index.d.ts +1 -1
  40. package/es/molecule/payment-form/index.d.ts +1 -1
  41. package/es/molecule/pdf/index.d.ts +1 -1
  42. package/es/molecule/product-card/index.d.ts +1 -1
  43. package/es/molecule/questions/drop-down/index.d.ts +6 -5
  44. package/es/molecule/questions/drop-down/index.js +5 -2
  45. package/es/molecule/questions/drop-down/index.js.map +1 -1
  46. package/es/molecule/questions/template/index.d.ts +3 -1
  47. package/es/molecule/review-card-congrats/prop-types.d.ts +1 -1
  48. package/es/molecule/scope-content/index.d.ts +1 -1
  49. package/es/molecule/setup-section/index.d.ts +1 -1
  50. package/es/molecule/setup-slide/index.d.ts +1 -1
  51. package/es/molecule/setup-slider/index.d.ts +1 -1
  52. package/es/molecule/subscription-freemium/index.d.ts +1 -1
  53. package/es/molecule/subscription-premium/index.d.ts +1 -1
  54. package/es/molecule/table/index.d.ts +1 -1
  55. package/es/molecule/unsubscribe/index.d.ts +1 -1
  56. package/es/organism/brand-analytics/index.d.ts +1 -1
  57. package/es/organism/brand-form/index.d.ts +2 -2
  58. package/es/organism/cart/index.d.ts +1 -1
  59. package/es/organism/mooc-header/index.d.ts +1 -1
  60. package/es/organism/mooc-header/index.js +1 -1
  61. package/es/organism/mooc-header/index.js.map +1 -1
  62. package/es/organism/review-congrats/index.d.ts.map +1 -1
  63. package/es/organism/review-congrats/index.js +8 -6
  64. package/es/organism/review-congrats/index.js.map +1 -1
  65. package/es/organism/review-congrats/prop-types.d.ts +3 -3
  66. package/es/organism/settings/index.d.ts +1 -1
  67. package/es/organism/user-preferences/index.d.ts +1 -0
  68. package/es/organism/user-preferences/index.d.ts.map +1 -1
  69. package/es/organism/user-preferences/index.js +11 -6
  70. package/es/organism/user-preferences/index.js.map +1 -1
  71. package/es/organism/wizard-contents/index.d.ts +2 -2
  72. package/es/template/activity/index.d.ts +2 -0
  73. package/es/template/activity/index.d.ts.map +1 -1
  74. package/es/template/activity/index.js +4 -1
  75. package/es/template/activity/index.js.map +1 -1
  76. package/es/template/activity/progression-item.d.ts +1 -0
  77. package/es/template/activity/progression-item.d.ts.map +1 -1
  78. package/es/template/activity/progression-item.js +5 -2
  79. package/es/template/activity/progression-item.js.map +1 -1
  80. package/es/template/app-player/player/slides/index.d.ts +2 -2
  81. package/es/template/app-player/player/slides/index.js +1 -1
  82. package/es/template/app-player/player/slides/index.js.map +1 -1
  83. package/es/template/app-review/index.d.ts +11 -3
  84. package/es/template/app-review/index.d.ts.map +1 -1
  85. package/es/template/app-review/player/prop-types.d.ts +3 -3
  86. package/es/template/app-review/prop-types.d.ts +11 -3
  87. package/es/template/app-review/prop-types.d.ts.map +1 -1
  88. package/es/template/app-review/template-context.d.ts +1 -0
  89. package/es/template/app-review/template-context.d.ts.map +1 -1
  90. package/es/template/app-review/template-context.js +2 -1
  91. package/es/template/app-review/template-context.js.map +1 -1
  92. package/es/template/back-office/brand-update/index.d.ts +4 -4
  93. package/es/template/battle-requests/index.d.ts +1 -1
  94. package/es/template/common/authors/index.d.ts +1 -1
  95. package/es/template/common/search-page/index.d.ts +1 -1
  96. package/es/template/review-dashboard-skills/index.d.ts +8 -0
  97. package/es/util/render-with-context.d.ts +1 -4
  98. package/es/util/render-with-context.d.ts.map +1 -1
  99. package/es/util/render-with-context.js +6 -6
  100. package/es/util/render-with-context.js.map +1 -1
  101. package/lib/atom/clue/index.d.ts +1 -1
  102. package/lib/atom/lottie-wrapper/index.d.ts.map +1 -1
  103. package/lib/atom/lottie-wrapper/index.js +9 -3
  104. package/lib/atom/lottie-wrapper/index.js.map +1 -1
  105. package/lib/atom/lottie-wrapper/prop-types.d.ts +2 -2
  106. package/lib/atom/lottie-wrapper/prop-types.d.ts.map +1 -1
  107. package/lib/atom/lottie-wrapper/prop-types.js +1 -1
  108. package/lib/atom/lottie-wrapper/prop-types.js.map +1 -1
  109. package/lib/atom/promo-code/index.d.ts +1 -1
  110. package/lib/atom/provider/index.d.ts +1 -1
  111. package/lib/atom/provider/index.js +1 -1
  112. package/lib/atom/provider/index.js.map +1 -1
  113. package/lib/atom/review-presentation/index.d.ts.map +1 -1
  114. package/lib/atom/review-presentation/index.js +86 -20
  115. package/lib/atom/review-presentation/index.js.map +1 -1
  116. package/lib/atom/review-presentation/prop-types.d.ts +12 -0
  117. package/lib/atom/review-presentation/prop-types.d.ts.map +1 -1
  118. package/lib/atom/review-presentation/prop-types.js +3 -1
  119. package/lib/atom/review-presentation/prop-types.js.map +1 -1
  120. package/lib/atom/review-presentation/style.css +3 -14
  121. package/lib/atom/select/index.d.ts +16 -17
  122. package/lib/atom/select/index.d.ts.map +1 -1
  123. package/lib/atom/select/index.js +7 -6
  124. package/lib/atom/select/index.js.map +1 -1
  125. package/lib/atom/tab-content/index.d.ts +1 -1
  126. package/lib/molecule/answer/index.d.ts.map +1 -1
  127. package/lib/molecule/answer/index.js +10 -1
  128. package/lib/molecule/answer/index.js.map +1 -1
  129. package/lib/molecule/battle-request/index.d.ts +1 -1
  130. package/lib/molecule/brand-create-form/index.d.ts +1 -1
  131. package/lib/molecule/brand-form-group/index.d.ts +2 -2
  132. package/lib/molecule/card-with-button/index.d.ts +1 -1
  133. package/lib/molecule/cookie-banner/index.d.ts +1 -1
  134. package/lib/molecule/dashboard/cards-list/index.d.ts +1 -1
  135. package/lib/molecule/discipline-partners/index.d.ts +1 -1
  136. package/lib/molecule/external-content-button/index.d.ts +1 -1
  137. package/lib/molecule/filters/index.d.ts +1 -1
  138. package/lib/molecule/forum/forum-comment/index.d.ts +1 -1
  139. package/lib/molecule/forum/forum-post/index.d.ts +1 -1
  140. package/lib/molecule/payment-form/index.d.ts +1 -1
  141. package/lib/molecule/pdf/index.d.ts +1 -1
  142. package/lib/molecule/product-card/index.d.ts +1 -1
  143. package/lib/molecule/questions/drop-down/index.d.ts +6 -5
  144. package/lib/molecule/questions/drop-down/index.js +5 -2
  145. package/lib/molecule/questions/drop-down/index.js.map +1 -1
  146. package/lib/molecule/questions/template/index.d.ts +3 -1
  147. package/lib/molecule/review-card-congrats/prop-types.d.ts +1 -1
  148. package/lib/molecule/scope-content/index.d.ts +1 -1
  149. package/lib/molecule/setup-section/index.d.ts +1 -1
  150. package/lib/molecule/setup-slide/index.d.ts +1 -1
  151. package/lib/molecule/setup-slider/index.d.ts +1 -1
  152. package/lib/molecule/subscription-freemium/index.d.ts +1 -1
  153. package/lib/molecule/subscription-premium/index.d.ts +1 -1
  154. package/lib/molecule/table/index.d.ts +1 -1
  155. package/lib/molecule/unsubscribe/index.d.ts +1 -1
  156. package/lib/organism/brand-analytics/index.d.ts +1 -1
  157. package/lib/organism/brand-form/index.d.ts +2 -2
  158. package/lib/organism/cart/index.d.ts +1 -1
  159. package/lib/organism/mooc-header/index.d.ts +1 -1
  160. package/lib/organism/mooc-header/index.js +1 -1
  161. package/lib/organism/mooc-header/index.js.map +1 -1
  162. package/lib/organism/review-congrats/index.d.ts.map +1 -1
  163. package/lib/organism/review-congrats/index.js +3 -1
  164. package/lib/organism/review-congrats/index.js.map +1 -1
  165. package/lib/organism/review-congrats/prop-types.d.ts +3 -3
  166. package/lib/organism/settings/index.d.ts +1 -1
  167. package/lib/organism/user-preferences/index.d.ts +1 -0
  168. package/lib/organism/user-preferences/index.d.ts.map +1 -1
  169. package/lib/organism/user-preferences/index.js +11 -6
  170. package/lib/organism/user-preferences/index.js.map +1 -1
  171. package/lib/organism/wizard-contents/index.d.ts +2 -2
  172. package/lib/template/activity/index.d.ts +2 -0
  173. package/lib/template/activity/index.d.ts.map +1 -1
  174. package/lib/template/activity/index.js +4 -1
  175. package/lib/template/activity/index.js.map +1 -1
  176. package/lib/template/activity/progression-item.d.ts +1 -0
  177. package/lib/template/activity/progression-item.d.ts.map +1 -1
  178. package/lib/template/activity/progression-item.js +5 -2
  179. package/lib/template/activity/progression-item.js.map +1 -1
  180. package/lib/template/app-player/player/slides/index.d.ts +2 -2
  181. package/lib/template/app-player/player/slides/index.js +1 -1
  182. package/lib/template/app-player/player/slides/index.js.map +1 -1
  183. package/lib/template/app-review/index.d.ts +11 -3
  184. package/lib/template/app-review/index.d.ts.map +1 -1
  185. package/lib/template/app-review/player/prop-types.d.ts +3 -3
  186. package/lib/template/app-review/prop-types.d.ts +11 -3
  187. package/lib/template/app-review/prop-types.d.ts.map +1 -1
  188. package/lib/template/app-review/template-context.d.ts +1 -0
  189. package/lib/template/app-review/template-context.d.ts.map +1 -1
  190. package/lib/template/app-review/template-context.js +2 -1
  191. package/lib/template/app-review/template-context.js.map +1 -1
  192. package/lib/template/back-office/brand-update/index.d.ts +4 -4
  193. package/lib/template/battle-requests/index.d.ts +1 -1
  194. package/lib/template/common/authors/index.d.ts +1 -1
  195. package/lib/template/common/search-page/index.d.ts +1 -1
  196. package/lib/template/review-dashboard-skills/index.d.ts +8 -0
  197. package/lib/util/render-with-context.d.ts +1 -4
  198. package/lib/util/render-with-context.d.ts.map +1 -1
  199. package/lib/util/render-with-context.js +6 -6
  200. package/lib/util/render-with-context.js.map +1 -1
  201. package/locales/en/global.json +1 -0
  202. package/package.json +2 -2
  203. package/locales/.mtslconfig.json +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/lottie-wrapper/index.js"],"names":[],"mappings":"AAsBO,iMAmCN;;AAED,wDAkHC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/lottie-wrapper/index.js"],"names":[],"mappings":"AAsBO,iMAmCN;;AAED,wDA4HC"}
@@ -132,9 +132,15 @@ const LottieWrapper = props => {
132
132
  /* istanbul ignore next */
133
133
  _lottieWeb.default.destroy(animationItem.name);
134
134
  }, [lottieAnimationClassName, containerRef, hideOnTransparent, loop, animationSrc, _isIE11, animationItem, autoplay]);
135
- return /*#__PURE__*/_react.default.createElement("div", {
135
+ const accessibilityProps = ariaLabel ? {
136
+ 'aria-label': ariaLabel,
137
+ role: 'img'
138
+ } : {
139
+ 'aria-hidden': 'true',
140
+ role: 'presentation'
141
+ };
142
+ return /*#__PURE__*/_react.default.createElement("div", _extends({}, accessibilityProps, {
136
143
  ref: containerRef,
137
- "aria-label": ariaLabel,
138
144
  "data-name": dataName,
139
145
  className: wrapperClassName,
140
146
  style: _extends({}, width && {
@@ -147,7 +153,7 @@ const LottieWrapper = props => {
147
153
  opacity: isAnimationVisible ? 1 : 0,
148
154
  transition: 'opacity 0.25s ease-in'
149
155
  })
150
- }, _isIE11 ? /*#__PURE__*/_react.default.createElement("img", {
156
+ }), _isIE11 ? /*#__PURE__*/_react.default.createElement("img", {
151
157
  src: ie11ImageBackup,
152
158
  className: ie11BackupImageClassName,
153
159
  "data-name": "ie11-backup-image"
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["isIE11","window","userAgent","get","hasMsCrypto","has","hasRevision","includes","hasTrident","fetchAndLoadAnimation","_lottie","_fetch","animationSrc","containerRef","loop","animationClassnames","hideOnTransparent","autoplay","animationUrl","URL","toString","fetchResult","headers","animationData","json","animation","loadAnimation","container","current","renderer","rendererSettings","className","preserveAspectRatio","LottieWrapper","props","dataName","ariaLabel","width","height","ie11ImageBackup","backupImageClassName","animationControl","animationClassName","useRef","animationItem","setAnimationItem","useState","isAnimationVisible","setIsAnimationVisible","_isIE11","useMemo","wrapperClassName","classnames","style","lottieContainer","lottieAnimationClassName","ie11BackupImageClassName","backupImage","useEffect","keys","omit","ANIMATION_CONTROL","stop","lottie","unfetch","destroy","name","maxWidth","maxHeight","opacity","transition","propTypes"],"sources":["../../../src/atom/lottie-wrapper/index.js"],"sourcesContent":["import React, {useMemo, useRef, useEffect, useState} from 'react';\nimport classnames from 'classnames';\nimport lottie from 'lottie-web';\nimport get from 'lodash/fp/get';\nimport has from 'lodash/fp/has';\nimport includes from 'lodash/fp/includes';\nimport keys from 'lodash/fp/keys';\nimport omit from 'lodash/fp/omit';\nimport unfetch from 'isomorphic-unfetch';\nimport style from './style.css';\nimport propTypes, {ANIMATION_CONTROL} from './prop-types';\n\nconst isIE11 = () => {\n if (typeof window === 'undefined') return;\n const userAgent = get('navigator.userAgent', window);\n const hasMsCrypto = has('msCrypto', window);\n const hasRevision = includes('rv:', userAgent);\n const hasTrident = includes('Trident/', userAgent);\n\n return hasMsCrypto || (hasRevision && hasTrident);\n};\n\nexport const fetchAndLoadAnimation = async (\n _lottie,\n _fetch,\n animationSrc,\n containerRef,\n loop,\n animationClassnames,\n hideOnTransparent,\n autoplay\n) => {\n const animationUrl = new URL(animationSrc).toString();\n const fetchResult = await _fetch(animationUrl, {\n headers: {\n 'X-Requested-With': 'XMLHttpRequest',\n 'Content-Type': 'application/json'\n }\n });\n\n const animationData = await fetchResult.json();\n\n const animation =\n _lottie.loadAnimation &&\n _lottie.loadAnimation({\n container: containerRef.current, // the dom element that will contain the animation\n renderer: 'svg',\n autoplay,\n loop,\n animationData,\n rendererSettings: {\n className: animationClassnames,\n hideOnTransparent,\n preserveAspectRatio: 'xMidYMid meet' // same options as a preserveAspectRatio prop\n }\n });\n return animation;\n};\n\nconst LottieWrapper = props => {\n const {\n className,\n 'data-name': dataName,\n 'aria-label': ariaLabel,\n animationSrc,\n loop = false,\n rendererSettings = {},\n width,\n height,\n ie11ImageBackup,\n backupImageClassName,\n autoplay = true,\n animationControl\n } = props;\n\n const {className: animationClassName, hideOnTransparent = true} = rendererSettings;\n\n const containerRef = useRef(null);\n\n // lottie's animation instance\n const [animationItem, setAnimationItem] = useState(null);\n\n const [isAnimationVisible, setIsAnimationVisible] = useState(autoplay);\n\n const _isIE11 = useMemo(() => isIE11(), []);\n\n const wrapperClassName = useMemo(() => classnames(className, style.lottieContainer), [className]);\n\n const lottieAnimationClassName = useMemo(\n () => classnames(animationClassName, style.animation),\n [animationClassName]\n );\n\n const ie11BackupImageClassName = useMemo(\n () => classnames(backupImageClassName, style.backupImage),\n [backupImageClassName]\n );\n\n useEffect(() => {\n // enzyme does not handle well the state update after an async useEffect in tests\n // to remove when the migration towards @testing-library/react is done\n /* istanbul ignore next */\n if (includes(animationControl, keys(omit('loading', ANIMATION_CONTROL))) && !autoplay) {\n setIsAnimationVisible(true);\n if (animationItem) animationItem[animationControl]();\n if (animationControl === ANIMATION_CONTROL.stop) setIsAnimationVisible(false);\n }\n }, [animationControl, animationItem, autoplay]);\n\n useEffect(() => {\n const loadAnimation = async () => {\n if (!_isIE11 && !animationItem) {\n /* istanbul ignore else */\n if (typeof window !== 'undefined') {\n window.lottie = lottie;\n }\n const animation = await fetchAndLoadAnimation(\n lottie,\n unfetch,\n animationSrc,\n containerRef,\n loop,\n lottieAnimationClassName,\n hideOnTransparent,\n autoplay\n );\n\n /* istanbul ignore next */\n setAnimationItem(animation);\n }\n };\n\n loadAnimation();\n return () => animationItem && /* istanbul ignore next */ lottie.destroy(animationItem.name);\n }, [\n lottieAnimationClassName,\n containerRef,\n hideOnTransparent,\n loop,\n animationSrc,\n _isIE11,\n animationItem,\n autoplay\n ]);\n\n return (\n <div\n ref={containerRef}\n aria-label={ariaLabel}\n data-name={dataName}\n className={wrapperClassName}\n style={{\n ...(width && {\n width: `${width}px`,\n maxWidth: `${width}px`\n }),\n ...(height && {\n height: `${height}px`,\n maxHeight: `${height}px`\n }),\n opacity: isAnimationVisible ? 1 : 0,\n transition: 'opacity 0.25s ease-in'\n }}\n >\n {_isIE11 ? (\n <img\n src={ie11ImageBackup}\n className={ie11BackupImageClassName}\n data-name=\"ie11-backup-image\"\n />\n ) : null}\n </div>\n );\n};\n\nLottieWrapper.propTypes = propTypes;\n\nexport default LottieWrapper;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,MAAM,GAAG,MAAM;EACnB,IAAI,OAAOC,MAAP,KAAkB,WAAtB,EAAmC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;MACZA,MAAM,EAAG,GAAEA,MAAO,IADN;MAEZ8B,SAAS,EAAG,GAAE9B,MAAO;IAFT,CALX;MASH+B,OAAO,EAAEtB,kBAAkB,GAAG,CAAH,GAAO,CAT/B;MAUHuB,UAAU,EAAE;IAVT;EALP,GAkBGrB,OAAO,gBACN;IACE,GAAG,EAAEV,eADP;IAEE,SAAS,EAAEiB,wBAFb;IAGE,aAAU;EAHZ,EADM,GAMJ,IAxBN,CADF;AA4BD,CAlHD;;AAoHAvB,aAAa,CAACsC,SAAd,2CAA0BA,kBAA1B;eAEetC,a"}
1
+ {"version":3,"file":"index.js","names":["isIE11","window","userAgent","get","hasMsCrypto","has","hasRevision","includes","hasTrident","fetchAndLoadAnimation","_lottie","_fetch","animationSrc","containerRef","loop","animationClassnames","hideOnTransparent","autoplay","animationUrl","URL","toString","fetchResult","headers","animationData","json","animation","loadAnimation","container","current","renderer","rendererSettings","className","preserveAspectRatio","LottieWrapper","props","dataName","ariaLabel","width","height","ie11ImageBackup","backupImageClassName","animationControl","animationClassName","useRef","animationItem","setAnimationItem","useState","isAnimationVisible","setIsAnimationVisible","_isIE11","useMemo","wrapperClassName","classnames","style","lottieContainer","lottieAnimationClassName","ie11BackupImageClassName","backupImage","useEffect","keys","omit","ANIMATION_CONTROL","stop","lottie","unfetch","destroy","name","accessibilityProps","role","maxWidth","maxHeight","opacity","transition","propTypes"],"sources":["../../../src/atom/lottie-wrapper/index.js"],"sourcesContent":["import React, {useMemo, useRef, useEffect, useState} from 'react';\nimport classnames from 'classnames';\nimport lottie from 'lottie-web';\nimport get from 'lodash/fp/get';\nimport has from 'lodash/fp/has';\nimport includes from 'lodash/fp/includes';\nimport keys from 'lodash/fp/keys';\nimport omit from 'lodash/fp/omit';\nimport unfetch from 'isomorphic-unfetch';\nimport style from './style.css';\nimport propTypes, {ANIMATION_CONTROL} from './prop-types';\n\nconst isIE11 = () => {\n if (typeof window === 'undefined') return;\n const userAgent = get('navigator.userAgent', window);\n const hasMsCrypto = has('msCrypto', window);\n const hasRevision = includes('rv:', userAgent);\n const hasTrident = includes('Trident/', userAgent);\n\n return hasMsCrypto || (hasRevision && hasTrident);\n};\n\nexport const fetchAndLoadAnimation = async (\n _lottie,\n _fetch,\n animationSrc,\n containerRef,\n loop,\n animationClassnames,\n hideOnTransparent,\n autoplay\n) => {\n const animationUrl = new URL(animationSrc).toString();\n const fetchResult = await _fetch(animationUrl, {\n headers: {\n 'X-Requested-With': 'XMLHttpRequest',\n 'Content-Type': 'application/json'\n }\n });\n\n const animationData = await fetchResult.json();\n\n const animation =\n _lottie.loadAnimation &&\n _lottie.loadAnimation({\n container: containerRef.current, // the dom element that will contain the animation\n renderer: 'svg',\n autoplay,\n loop,\n animationData,\n rendererSettings: {\n className: animationClassnames,\n hideOnTransparent,\n preserveAspectRatio: 'xMidYMid meet' // same options as a preserveAspectRatio prop\n }\n });\n return animation;\n};\n\nconst LottieWrapper = props => {\n const {\n className,\n 'data-name': dataName,\n 'aria-label': ariaLabel,\n animationSrc,\n loop = false,\n rendererSettings = {},\n width,\n height,\n ie11ImageBackup,\n backupImageClassName,\n autoplay = true,\n animationControl\n } = props;\n\n const {className: animationClassName, hideOnTransparent = true} = rendererSettings;\n\n const containerRef = useRef(null);\n\n // lottie's animation instance\n const [animationItem, setAnimationItem] = useState(null);\n\n const [isAnimationVisible, setIsAnimationVisible] = useState(autoplay);\n\n const _isIE11 = useMemo(() => isIE11(), []);\n\n const wrapperClassName = useMemo(() => classnames(className, style.lottieContainer), [className]);\n\n const lottieAnimationClassName = useMemo(\n () => classnames(animationClassName, style.animation),\n [animationClassName]\n );\n\n const ie11BackupImageClassName = useMemo(\n () => classnames(backupImageClassName, style.backupImage),\n [backupImageClassName]\n );\n\n useEffect(() => {\n // enzyme does not handle well the state update after an async useEffect in tests\n // to remove when the migration towards @testing-library/react is done\n /* istanbul ignore next */\n if (includes(animationControl, keys(omit('loading', ANIMATION_CONTROL))) && !autoplay) {\n setIsAnimationVisible(true);\n if (animationItem) animationItem[animationControl]();\n if (animationControl === ANIMATION_CONTROL.stop) setIsAnimationVisible(false);\n }\n }, [animationControl, animationItem, autoplay]);\n\n useEffect(() => {\n const loadAnimation = async () => {\n if (!_isIE11 && !animationItem) {\n /* istanbul ignore else */\n if (typeof window !== 'undefined') {\n window.lottie = lottie;\n }\n const animation = await fetchAndLoadAnimation(\n lottie,\n unfetch,\n animationSrc,\n containerRef,\n loop,\n lottieAnimationClassName,\n hideOnTransparent,\n autoplay\n );\n\n /* istanbul ignore next */\n setAnimationItem(animation);\n }\n };\n\n loadAnimation();\n return () => animationItem && /* istanbul ignore next */ lottie.destroy(animationItem.name);\n }, [\n lottieAnimationClassName,\n containerRef,\n hideOnTransparent,\n loop,\n animationSrc,\n _isIE11,\n animationItem,\n autoplay\n ]);\n\n const accessibilityProps = ariaLabel\n ? {\n 'aria-label': ariaLabel,\n role: 'img'\n }\n : {\n 'aria-hidden': 'true',\n role: 'presentation'\n };\n\n return (\n <div\n {...accessibilityProps}\n ref={containerRef}\n data-name={dataName}\n className={wrapperClassName}\n style={{\n ...(width && {\n width: `${width}px`,\n maxWidth: `${width}px`\n }),\n ...(height && {\n height: `${height}px`,\n maxHeight: `${height}px`\n }),\n opacity: isAnimationVisible ? 1 : 0,\n transition: 'opacity 0.25s ease-in'\n }}\n >\n {_isIE11 ? (\n <img\n src={ie11ImageBackup}\n className={ie11BackupImageClassName}\n data-name=\"ie11-backup-image\"\n />\n ) : null}\n </div>\n );\n};\n\nLottieWrapper.propTypes = propTypes;\n\nexport default LottieWrapper;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,MAAM,GAAG,MAAM;EACnB,IAAI,OAAOC,MAAP,KAAkB,WAAtB,EAAmC;EACnC,MAAMC,SAAS,GAAG,IAAAC,YAAA,EAAI,qBAAJ,EAA2BF,MAA3B,CAAlB;EACA,MAAMG,WAAW,GAAG,IAA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AEhC,KAAM;IAFR,CADV,EAKCC,MAAM,IAAI;MACZA,MAAM,EAAG,GAAEA,MAAO,IADN;MAEZgC,SAAS,EAAG,GAAEhC,MAAO;IAFT,CALX;MASHiC,OAAO,EAAExB,kBAAkB,GAAG,CAAH,GAAO,CAT/B;MAUHyB,UAAU,EAAE;IAVT;EALP,IAkBGvB,OAAO,gBACN;IACE,GAAG,EAAEV,eADP;IAEE,SAAS,EAAEiB,wBAFb;IAGE,aAAU;EAHZ,EADM,GAMJ,IAxBN,CADF;AA4BD,CA5HD;;AA8HAvB,aAAa,CAACwC,SAAd,2CAA0BA,kBAA1B;eAEexC,a"}
@@ -1,6 +1,6 @@
1
1
  import PropTypes from 'prop-types';
2
2
  export declare type LottieAnimationProps = {
3
- 'aria-label': string;
3
+ 'aria-label'?: string;
4
4
  'data-name'?: string;
5
5
  animationSrc: string;
6
6
  loop?: boolean;
@@ -23,7 +23,7 @@ export declare const ANIMATION_CONTROL: {
23
23
  loading: string;
24
24
  };
25
25
  declare const propTypes: {
26
- 'aria-label': PropTypes.Validator<string>;
26
+ 'aria-label': PropTypes.Requireable<string>;
27
27
  'data-name': PropTypes.Requireable<string>;
28
28
  animationSrc: PropTypes.Validator<string>;
29
29
  loop: PropTypes.Requireable<boolean>;
@@ -1 +1 @@
1
- {"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/atom/lottie-wrapper/prop-types.ts"],"names":[],"mappings":"AACA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,oBAAY,oBAAoB,GAAG;IACjC,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,gBAAgB,CAAC,EAAE;QACjB,iBAAiB,CAAC,EAAE,OAAO,CAAC;QAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,MAAM,CAAC,EAAE,MAAM,CAAC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7 +17,7 @@ const ANIMATION_CONTROL = {
17
17
  };
18
18
  exports.ANIMATION_CONTROL = ANIMATION_CONTROL;
19
19
  const propTypes = {
20
- 'aria-label': _propTypes.default.string.isRequired,
20
+ 'aria-label': _propTypes.default.string,
21
21
  'data-name': _propTypes.default.string,
22
22
  animationSrc: _propTypes.default.string.isRequired,
23
23
  loop: _propTypes.default.bool,
@@ -1 +1 @@
1
- {"version":3,"file":"prop-types.js","names":["ANIMATION_CONTROL","play","pause","stop","loading","propTypes","PropTypes","string","isRequired","animationSrc","loop","bool","rendererSettings","shape","hideOnTransparent","className","height","number","width","ie11ImageBackup","backupImageClassName","autoplay","animationControl","oneOf","keys"],"sources":["../../../src/atom/lottie-wrapper/prop-types.ts"],"sourcesContent":["import keys from 'lodash/fp/keys';\nimport PropTypes from 'prop-types';\n\nexport type LottieAnimationProps = {\n 'aria-label': string;\n 'data-name'?: string;\n animationSrc: string;\n loop?: boolean;\n rendererSettings?: {\n hideOnTransparent?: boolean;\n className?: string;\n };\n height?: number;\n width?: number;\n className?: string;\n ie11ImageBackup: string;\n backupImageClassName?: string;\n autoplay?: boolean;\n animationControl?: 'play' | 'pause' | 'stop' | 'loading';\n};\n\nexport const ANIMATION_CONTROL = {\n play: 'play',\n pause: 'pause',\n stop: 'stop',\n loading: 'loading'\n};\n\nconst propTypes = {\n 'aria-label': PropTypes.string.isRequired,\n 'data-name': PropTypes.string,\n animationSrc: PropTypes.string.isRequired,\n loop: PropTypes.bool,\n rendererSettings: PropTypes.shape({\n hideOnTransparent: PropTypes.bool,\n className: PropTypes.string\n }),\n height: PropTypes.number,\n width: PropTypes.number,\n className: PropTypes.string,\n ie11ImageBackup: PropTypes.string.isRequired,\n backupImageClassName: PropTypes.string,\n autoplay: PropTypes.bool,\n animationControl: PropTypes.oneOf(keys(ANIMATION_CONTROL))\n};\n\nexport default propTypes;\n"],"mappings":";;;;;AAAA;;AACA;;;;AAoBO,MAAMA,iBAAiB,GAAG;EAC/BC,IAAI,EAAE,MADyB;EAE/BC,KAAK,EAAE,OAFwB;EAG/BC,IAAI,EAAE,MAHyB;EAI/BC,OAAO,EAAE;AAJsB,CAA1B;;AAOP,MAAMC,SAAS,GAAG;EAChB,cAAcC,kBAAA,CAAUC,MAAV,CAAiBC,UADf;EAEhB,aAAaF,kBAAA,CAAUC,MAFP;EAGhBE,YAAY,EAAEH,kBAAA,CAAUC,MAAV,CAAiBC,UAHf;EAIhBE,IAAI,EAAEJ,kBAAA,CAAUK,IAJA;EAKhBC,gBAAgB,EAAEN,kBAAA,CAAUO,KAAV,CAAgB;IAChCC,iBAAiB,EAAER,kBAAA,CAAUK,IADG;IAEhCI,SAAS,EAAET,kBAAA,CAAUC;EAFW,CAAhB,CALF;EAShBS,MAAM,EAAEV,kBAAA,CAAUW,MATF;EAUhBC,KAAK,EAAEZ,kBAAA,CAAUW,MAVD;EAWhBF,SAAS,EAAET,kBAAA,CAAUC,MAXL;EAYhBY,eAAe,EAAEb,kBAAA,CAAUC,MAAV,CAAiBC,UAZlB;EAahBY,oBAAoB,EAAEd,kBAAA,CAAUC,MAbhB;EAchBc,QAAQ,EAAEf,kBAAA,CAAUK,IAdJ;EAehBW,gBAAgB,EAAEhB,kBAAA,CAAUiB,KAAV,CAAgB,IAAAC,aAAA,EAAKxB,iBAAL,CAAhB;AAfF,CAAlB;eAkBeK,S"}
1
+ {"version":3,"file":"prop-types.js","names":["ANIMATION_CONTROL","play","pause","stop","loading","propTypes","PropTypes","string","animationSrc","isRequired","loop","bool","rendererSettings","shape","hideOnTransparent","className","height","number","width","ie11ImageBackup","backupImageClassName","autoplay","animationControl","oneOf","keys"],"sources":["../../../src/atom/lottie-wrapper/prop-types.ts"],"sourcesContent":["import keys from 'lodash/fp/keys';\nimport PropTypes from 'prop-types';\n\nexport type LottieAnimationProps = {\n 'aria-label'?: string;\n 'data-name'?: string;\n animationSrc: string;\n loop?: boolean;\n rendererSettings?: {\n hideOnTransparent?: boolean;\n className?: string;\n };\n height?: number;\n width?: number;\n className?: string;\n ie11ImageBackup: string;\n backupImageClassName?: string;\n autoplay?: boolean;\n animationControl?: 'play' | 'pause' | 'stop' | 'loading';\n};\n\nexport const ANIMATION_CONTROL = {\n play: 'play',\n pause: 'pause',\n stop: 'stop',\n loading: 'loading'\n};\n\nconst propTypes = {\n 'aria-label': PropTypes.string,\n 'data-name': PropTypes.string,\n animationSrc: PropTypes.string.isRequired,\n loop: PropTypes.bool,\n rendererSettings: PropTypes.shape({\n hideOnTransparent: PropTypes.bool,\n className: PropTypes.string\n }),\n height: PropTypes.number,\n width: PropTypes.number,\n className: PropTypes.string,\n ie11ImageBackup: PropTypes.string.isRequired,\n backupImageClassName: PropTypes.string,\n autoplay: PropTypes.bool,\n animationControl: PropTypes.oneOf(keys(ANIMATION_CONTROL))\n};\n\nexport default propTypes;\n"],"mappings":";;;;;AAAA;;AACA;;;;AAoBO,MAAMA,iBAAiB,GAAG;EAC/BC,IAAI,EAAE,MADyB;EAE/BC,KAAK,EAAE,OAFwB;EAG/BC,IAAI,EAAE,MAHyB;EAI/BC,OAAO,EAAE;AAJsB,CAA1B;;AAOP,MAAMC,SAAS,GAAG;EAChB,cAAcC,kBAAA,CAAUC,MADR;EAEhB,aAAaD,kBAAA,CAAUC,MAFP;EAGhBC,YAAY,EAAEF,kBAAA,CAAUC,MAAV,CAAiBE,UAHf;EAIhBC,IAAI,EAAEJ,kBAAA,CAAUK,IAJA;EAKhBC,gBAAgB,EAAEN,kBAAA,CAAUO,KAAV,CAAgB;IAChCC,iBAAiB,EAAER,kBAAA,CAAUK,IADG;IAEhCI,SAAS,EAAET,kBAAA,CAAUC;EAFW,CAAhB,CALF;EAShBS,MAAM,EAAEV,kBAAA,CAAUW,MATF;EAUhBC,KAAK,EAAEZ,kBAAA,CAAUW,MAVD;EAWhBF,SAAS,EAAET,kBAAA,CAAUC,MAXL;EAYhBY,eAAe,EAAEb,kBAAA,CAAUC,MAAV,CAAiBE,UAZlB;EAahBW,oBAAoB,EAAEd,kBAAA,CAAUC,MAbhB;EAchBc,QAAQ,EAAEf,kBAAA,CAAUK,IAdJ;EAehBW,gBAAgB,EAAEhB,kBAAA,CAAUiB,KAAV,CAAgB,IAAAC,aAAA,EAAKxB,iBAAL,CAAhB;AAfF,CAAlB;eAkBeK,S"}
@@ -2,7 +2,7 @@ export default PromoCode;
2
2
  declare function PromoCode(props: any, context: any): JSX.Element;
3
3
  declare namespace PromoCode {
4
4
  namespace contextTypes {
5
- const translate: PropTypes.Validator<(...args: any[]) => any>;
5
+ const translate: PropTypes.Requireable<(...args: any[]) => any>;
6
6
  }
7
7
  namespace propTypes {
8
8
  const promoCodeDescription: PropTypes.Requireable<string>;
@@ -61,7 +61,7 @@ declare class Provider extends React.Component<any, any, any> {
61
61
  [x: string]: any;
62
62
  }>;
63
63
  }>>;
64
- translate: PropTypes.Validator<(...args: any[]) => any>;
64
+ translate: PropTypes.Requireable<(...args: any[]) => any>;
65
65
  Vimeo: PropTypes.Requireable<object>;
66
66
  };
67
67
  static getDerivedStateFromProps(props: any): {
@@ -123,7 +123,7 @@ class Provider extends _react.default.Component {
123
123
  Provider.childContextTypes = {
124
124
  history: historyShape,
125
125
  skin: skinShape,
126
- translate: translateShape.isRequired,
126
+ translate: translateShape,
127
127
  Vimeo: _propTypes.default.object
128
128
  };
129
129
  Provider.propTypes = process.env.NODE_ENV !== "production" ? {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["DEFAULT_SKIN","common","good","bad","primary","life","brand","primaryAdd1","primaryAdd2","primaryAdd3","primaryAdd4","xtraLightGrey","light","medium","dark","grey","orangeAdd","orange","positive","lightGreen","negative","battle","white","black","mergeSkin","skin","historyShape","PropTypes","shape","createHref","func","push","skinShape","objectOf","ColorPropType","images","SrcPropType","logo","login","icons","HexPropType","mod","courses","arrayOf","texts","translateShape","Provider","React","Component","getDerivedStateFromProps","props","history","translate","constructor","context","Vimeo","state","getChildContext","render","children","Children","only","childContextTypes","isRequired","object","propTypes","node","GetSkinFromContext","legacyContext","useWebContext","legacySkin"],"sources":["../../../src/atom/provider/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {defaultsDeep, get, getOr} from 'lodash/fp';\nimport {SrcPropType, ColorPropType, HexPropType} from '../../util/proptypes';\nimport WebContext, {useWebContext} from './web-context';\n\nconst DEFAULT_SKIN = {\n common: {\n good: '#24b694',\n bad: '#ed1c24',\n primary: '#00B0FF',\n life: '#ed1c24',\n brand: '#00B0FF',\n primaryAdd1: '#B3E5FC',\n primaryAdd2: '#0091EA',\n primaryAdd3: '#0277BD',\n primaryAdd4: '#015798',\n xtraLightGrey: '#FAFAFA',\n light: '#ECEFF1',\n medium: '#90A4AE',\n dark: '#546E7A',\n grey: '#607D8B',\n orangeAdd: '#FF7043',\n orange: '#FFA000',\n positive: '#3EC483',\n lightGreen: '#66BB6A',\n negative: '#F73F52',\n battle: '#FFE100',\n white: '#FFFFFF',\n black: '#14171A'\n }\n};\n\nconst mergeSkin = (skin = {}) => defaultsDeep(DEFAULT_SKIN, skin);\n\nconst historyShape = PropTypes.shape({\n createHref: PropTypes.func,\n push: PropTypes.func\n});\n\nconst skinShape = PropTypes.shape({\n common: PropTypes.objectOf(ColorPropType),\n images: PropTypes.shape({\n 'logo-mobile': SrcPropType,\n logo: SrcPropType,\n 'logo-email': SrcPropType,\n login: SrcPropType\n }),\n icons: PropTypes.objectOf(HexPropType),\n mod: PropTypes.objectOf(ColorPropType),\n courses: PropTypes.arrayOf(ColorPropType),\n texts: PropTypes.objectOf(ColorPropType)\n});\n\nconst translateShape = PropTypes.func;\n\nclass Provider extends React.Component {\n static propTypes = {\n history: historyShape,\n skin: skinShape,\n translate: translateShape,\n children: PropTypes.node.isRequired,\n Vimeo: PropTypes.shape({\n common: PropTypes.func\n })\n };\n\n static childContextTypes = {\n history: historyShape,\n skin: skinShape,\n translate: translateShape.isRequired,\n Vimeo: PropTypes.object\n };\n\n static getDerivedStateFromProps(props) {\n const {history, skin, translate} = props;\n\n return {\n history,\n skin: mergeSkin(skin),\n translate\n };\n }\n\n constructor(props, context) {\n super(props, context);\n const {history, skin, translate, Vimeo} = props;\n // eslint-disable-next-line react/no-unused-state\n this.state = {history, skin: mergeSkin(skin), translate, Vimeo};\n }\n\n getChildContext() {\n return this.state;\n }\n\n render() {\n const {children} = this.props;\n return React.Children.only(children);\n }\n}\n\nconst GetSkinFromContext = legacyContext => {\n const context = useWebContext();\n const legacySkin = get('skin', legacyContext);\n const skin = getOr(legacySkin, 'skin', context);\n\n return skin;\n};\n\nexport {WebContext, useWebContext, GetSkinFromContext};\nexport default Provider;\n"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;;;;;;;;;;AAEA,MAAMA,YAAY,GAAG;EACnBC,MAAM,EAAE;IACNC,IAAI,EAAE,SADA;IAENC,GAAG,EAAE,SAFC;IAGNC,OAAO,EAAE,SAHH;IAINC,IAAI,EAAE,SAJA;IAKNC,KAAK,EAAE,SALD;IAMNC,WAAW,EAAE,SANP;IAONC,WAAW,EAAE,SAPP;IAQNC,WAAW,EAAE,SARP;IASNC,WAAW,EAAE,SATP;IAUNC,aAAa,EAAE,SAVT;IAWNC,KAAK,EAAE,SAXD;IAYNC,MAAM,EAAE,SAZF;IAaNC,IAAI,EAAE,SAbA;IAcNC,IAAI,EAAE,SAdA;IAeNC,SAAS,EAAE,SAfL;IAgBNC,MAAM,EAAE,SAhBF;IAiBNC,QAAQ,EAAE,SAjBJ;IAkBNC,UAAU,EAAE,SAlBN;IAmBNC,QAAQ,EAAE,SAnBJ;IAoBNC,MAAM,EAAE,SApBF;IAqBNC,KAAK,EAAE,SArBD;IAsBNC,KAAK,EAAE;EAtBD;AADW,CAArB;;AA2BA,MAAMC,SAAS,GAAG,CAACC,IAAI,GAAG,EAAR,KAAe,4BAAazB,YAAb,EAA2ByB,IAA3B,CAAjC;;AAEA,MAAMC,YAAY,GAAGC,kBAAA,CAAUC,KAAV,CAAgB;EACnCC,UAAU,EAAEF,kBAAA,CAAUG,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IAA5C,CAAb;EACD;;EAEDE,eAAe,GAAG;IAChB,OAAO,KAAKD,KAAZ;EACD;;EAEDE,MAAM,GAAG;IACP,MAAM;MAACC;IAAD,IAAa,KAAKT,KAAxB;IACA,OAAOH,cAAA,CAAMa,QAAN,CAAeC,IAAf,CAAoBF,QAApB,CAAP;EACD;;AA1CoC;;AAAjCb,Q,CAWGgB,iB,GAAoB;EACzBX,OAAO,EAAEzB,YADgB;EAEzBD,IAAI,EAAEO,SAFmB;EAGzBoB,SAAS,EAAEP,cAAc,CAACkB,UAHD;EAIzBR,KAAK,EAAE5B,kBAAA,CAAUqC;AAJQ,C;AAXvBlB,Q,CACGmB,S,2CAAY;EACjBd,OAAO,EAAEzB,YADQ;EAEjBD,IAAI,EAAEO,SAFW;EAGjBoB,SAAS,EAAEP,cAHM;EAIjBc,QAAQ,EAAEhC,kBAAA,CAAUuC,IAAV,CAAeH,UAJR;EAKjBR,KAAK,EAAE5B,kBAAA,CAAUC,KAAV,CAAgB;IACrB3B,MAAM,EAAE0B,kBAAA,CAAUG;EADG,CAAhB;AALU,C;;AA4CrB,MAAMqC,kBAAkB,GAAGC,aAAa,IAAI;EAC1C,MAAMd,OAAO,GAAG,IAAAe,yBAAA,GAAhB;EACA,MAAMC,UAAU,GAAG,mBAAI,MAAJ,EAAYF,aAAZ,CAAnB;EACA,MAAM3C,IAAI,GAAG,qBAAM6C,UAAN,EAAkB,MAAlB,EAA0BhB,OAA1B,CAAb;EAEA,OAAO7B,IAAP;AACD,CAND;;;eASeqB,Q"}
1
+ {"version":3,"file":"index.js","names":["DEFAULT_SKIN","common","good","bad","primary","life","brand","primaryAdd1","primaryAdd2","primaryAdd3","primaryAdd4","xtraLightGrey","light","medium","dark","grey","orangeAdd","orange","positive","lightGreen","negative","battle","white","black","mergeSkin","skin","historyShape","PropTypes","shape","createHref","func","push","skinShape","objectOf","ColorPropType","images","SrcPropType","logo","login","icons","HexPropType","mod","courses","arrayOf","texts","translateShape","Provider","React","Component","getDerivedStateFromProps","props","history","translate","constructor","context","Vimeo","state","getChildContext","render","children","Children","only","childContextTypes","object","propTypes","node","isRequired","GetSkinFromContext","legacyContext","useWebContext","legacySkin"],"sources":["../../../src/atom/provider/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {defaultsDeep, get, getOr} from 'lodash/fp';\nimport {SrcPropType, ColorPropType, HexPropType} from '../../util/proptypes';\nimport WebContext, {useWebContext} from './web-context';\n\nconst DEFAULT_SKIN = {\n common: {\n good: '#24b694',\n bad: '#ed1c24',\n primary: '#00B0FF',\n life: '#ed1c24',\n brand: '#00B0FF',\n primaryAdd1: '#B3E5FC',\n primaryAdd2: '#0091EA',\n primaryAdd3: '#0277BD',\n primaryAdd4: '#015798',\n xtraLightGrey: '#FAFAFA',\n light: '#ECEFF1',\n medium: '#90A4AE',\n dark: '#546E7A',\n grey: '#607D8B',\n orangeAdd: '#FF7043',\n orange: '#FFA000',\n positive: '#3EC483',\n lightGreen: '#66BB6A',\n negative: '#F73F52',\n battle: '#FFE100',\n white: '#FFFFFF',\n black: '#14171A'\n }\n};\n\nconst mergeSkin = (skin = {}) => defaultsDeep(DEFAULT_SKIN, skin);\n\nconst historyShape = PropTypes.shape({\n createHref: PropTypes.func,\n push: PropTypes.func\n});\n\nconst skinShape = PropTypes.shape({\n common: PropTypes.objectOf(ColorPropType),\n images: PropTypes.shape({\n 'logo-mobile': SrcPropType,\n logo: SrcPropType,\n 'logo-email': SrcPropType,\n login: SrcPropType\n }),\n icons: PropTypes.objectOf(HexPropType),\n mod: PropTypes.objectOf(ColorPropType),\n courses: PropTypes.arrayOf(ColorPropType),\n texts: PropTypes.objectOf(ColorPropType)\n});\n\nconst translateShape = PropTypes.func;\n\nclass Provider extends React.Component {\n static propTypes = {\n history: historyShape,\n skin: skinShape,\n translate: translateShape,\n children: PropTypes.node.isRequired,\n Vimeo: PropTypes.shape({\n common: PropTypes.func\n })\n };\n\n static childContextTypes = {\n history: historyShape,\n skin: skinShape,\n translate: translateShape,\n Vimeo: PropTypes.object\n };\n\n static getDerivedStateFromProps(props) {\n const {history, skin, translate} = props;\n\n return {\n history,\n skin: mergeSkin(skin),\n translate\n };\n }\n\n constructor(props, context) {\n super(props, context);\n const {history, skin, translate, Vimeo} = props;\n // eslint-disable-next-line react/no-unused-state\n this.state = {history, skin: mergeSkin(skin), translate, Vimeo};\n }\n\n getChildContext() {\n return this.state;\n }\n\n render() {\n const {children} = this.props;\n return React.Children.only(children);\n }\n}\n\nconst GetSkinFromContext = legacyContext => {\n const context = useWebContext();\n const legacySkin = get('skin', legacyContext);\n const skin = getOr(legacySkin, 'skin', context);\n\n return skin;\n};\n\nexport {WebContext, useWebContext, GetSkinFromContext};\nexport default Provider;\n"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;;;;;;;;;;AAEA,MAAMA,YAAY,GAAG;EACnBC,MAAM,EAAE;IACNC,IAAI,EAAE,SADA;IAENC,GAAG,EAAE,SAFC;IAGNC,OAAO,EAAE,SAHH;IAINC,IAAI,EAAE,SAJA;IAKNC,KAAK,EAAE,SALD;IAMNC,WAAW,EAAE,SANP;IAONC,WAAW,EAAE,SAPP;IAQNC,WAAW,EAAE,SARP;IASNC,WAAW,EAAE,SATP;IAUNC,aAAa,EAAE,SAVT;IAWNC,KAAK,EAAE,SAXD;IAYNC,MAAM,EAAE,SAZF;IAaNC,IAAI,EAAE,SAbA;IAcNC,IAAI,EAAE,SAdA;IAeNC,SAAS,EAAE,SAfL;IAgBNC,MAAM,EAAE,SAhBF;IAiBNC,QAAQ,EAAE,SAjBJ;IAkBNC,UAAU,EAAE,SAlBN;IAmBNC,QAAQ,EAAE,SAnBJ;IAoBNC,MAAM,EAAE,SApBF;IAqBNC,KAAK,EAAE,SArBD;IAsBNC,KAAK,EAAE;EAtBD;AADW,CAArB;;AA2BA,MAAMC,SAAS,GAAG,CAACC,IAAI,GAAG,EAAR,KAAe,4BAAazB,YAAb,EAA2ByB,IAA3B,CAAjC;;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GAAa;MAACL,OAAD;MAAU1B,IAAI,EAAED,SAAS,CAACC,IAAD,CAAzB;MAAiC2B,SAAjC;MAA4CG;IAA5C,CAAb;EACD;;EAEDE,eAAe,GAAG;IAChB,OAAO,KAAKD,KAAZ;EACD;;EAEDE,MAAM,GAAG;IACP,MAAM;MAACC;IAAD,IAAa,KAAKT,KAAxB;IACA,OAAOH,cAAA,CAAMa,QAAN,CAAeC,IAAf,CAAoBF,QAApB,CAAP;EACD;;AA1CoC;;AAAjCb,Q,CAWGgB,iB,GAAoB;EACzBX,OAAO,EAAEzB,YADgB;EAEzBD,IAAI,EAAEO,SAFmB;EAGzBoB,SAAS,EAAEP,cAHc;EAIzBU,KAAK,EAAE5B,kBAAA,CAAUoC;AAJQ,C;AAXvBjB,Q,CACGkB,S,2CAAY;EACjBb,OAAO,EAAEzB,YADQ;EAEjBD,IAAI,EAAEO,SAFW;EAGjBoB,SAAS,EAAEP,cAHM;EAIjBc,QAAQ,EAAEhC,kBAAA,CAAUsC,IAAV,CAAeC,UAJR;EAKjBX,KAAK,EAAE5B,kBAAA,CAAUC,KAAV,CAAgB;IACrB3B,MAAM,EAAE0B,kBAAA,CAAUG;EADG,CAAhB;AALU,C;;AA4CrB,MAAMqC,kBAAkB,GAAGC,aAAa,IAAI;EAC1C,MAAMd,OAAO,GAAG,IAAAe,yBAAA,GAAhB;EACA,MAAMC,UAAU,GAAG,mBAAI,MAAJ,EAAYF,aAAZ,CAAnB;EACA,MAAM3C,IAAI,GAAG,qBAAM6C,UAAN,EAAkB,MAAlB,EAA0BhB,OAA1B,CAAb;EAEA,OAAO7B,IAAP;AACD,CAND;;;eASeqB,Q"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/review-presentation/index.js"],"names":[],"mappings":";AA4CA,6DA+BC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/review-presentation/index.js"],"names":[],"mappings":";AAuGA,6DA+BC"}
@@ -3,7 +3,7 @@
3
3
  exports.__esModule = true;
4
4
  exports.default = void 0;
5
5
 
6
- var _react = _interopRequireDefault(require("react"));
6
+ var _react = _interopRequireWildcard(require("react"));
7
7
 
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
 
@@ -19,6 +19,12 @@ var _propTypes2 = _interopRequireDefault(require("./prop-types"));
19
19
 
20
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
21
 
22
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
23
+
24
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
25
+
26
+ 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); }
27
+
22
28
  const ICONS = {
23
29
  skills: _novaIcons.NovaLineSelectionCursorsCursorArrowTarget,
24
30
  questions: _novaIcons.NovaSolidInterfaceFeedbackInterfaceQuestionMark,
@@ -26,7 +32,9 @@ const ICONS = {
26
32
  allright: _novaIcons.NovaSolidStatusCheckCircle2
27
33
  };
28
34
 
29
- const getIcon = icon => {
35
+ const ReviewIcon = ({
36
+ icon
37
+ }) => {
30
38
  const Icon = (0, _getOr.default)(null, icon, ICONS);
31
39
  /* istanbul ignore next */
32
40
 
@@ -42,21 +50,69 @@ const getIcon = icon => {
42
50
  };
43
51
 
44
52
  const ToolTip = ({
45
- tooltipText
53
+ tooltipText,
54
+ 'aria-label': moreDetailsAriaLabel,
55
+ 'data-testid': dataTestId,
56
+ closeToolTipInformationTextAriaLabel
46
57
  }) => {
58
+ const [toolTipIsVisible, setToolTipIsVisible] = (0, _react.useState)(false);
59
+ const handleKeyPress = (0, _react.useCallback)(event => {
60
+ if (event.key === 'Enter') {
61
+ setToolTipIsVisible(!toolTipIsVisible);
62
+ } else if (event.key === 'Tab' || event.key === 'Escape') {
63
+ setToolTipIsVisible(false);
64
+ }
65
+ }, [setToolTipIsVisible, toolTipIsVisible]);
66
+ const handleMouseOver = (0, _react.useCallback)(() => setToolTipIsVisible(true), [setToolTipIsVisible]);
67
+ const handleMouseLeave = (0, _react.useCallback)(() => setToolTipIsVisible(false), [setToolTipIsVisible]);
68
+ const customStyle = {
69
+ visibility: toolTipIsVisible ? 'visible' : 'hidden',
70
+ opacity: toolTipIsVisible ? 1 : 0
71
+ };
47
72
  return /*#__PURE__*/_react.default.createElement("div", {
48
73
  className: _style.default.tooltipContainer
49
- }, /*#__PURE__*/_react.default.createElement("div", {
50
- className: _style.default.tooltipIconContainer
74
+ }, /*#__PURE__*/_react.default.createElement("button", {
75
+ type: "button",
76
+ className: _style.default.tooltipIconContainer,
77
+ "data-testid": dataTestId,
78
+ onMouseOver: handleMouseOver,
79
+ onMouseLeave: handleMouseLeave,
80
+ onKeyDown: handleKeyPress,
81
+ tabIndex: 0
51
82
  }, /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionCoorpacademyInformationIcon, {
52
83
  className: _style.default.informationIcon,
53
84
  width: 12,
54
- height: 12
55
- })), /*#__PURE__*/_react.default.createElement("div", {
56
- className: _style.default.toolTip
57
- }, /*#__PURE__*/_react.default.createElement("div", {
85
+ height: 12,
86
+ "aria-label": moreDetailsAriaLabel
87
+ })), toolTipIsVisible ? /*#__PURE__*/_react.default.createElement("div", {
88
+ className: _style.default.toolTip,
89
+ style: customStyle,
90
+ "data-testid": "review-presentation-tooltip",
91
+ "aria-label": closeToolTipInformationTextAriaLabel
92
+ }, /*#__PURE__*/_react.default.createElement("p", {
58
93
  className: _style.default.tooltipText
59
- }, tooltipText)));
94
+ }, tooltipText)) : null);
95
+ };
96
+
97
+ const ReviewListItemWrapper = ({
98
+ iconKey,
99
+ label
100
+ }) => {
101
+ return /*#__PURE__*/_react.default.createElement("div", {
102
+ className: _style.default.reviewListItemWrapper,
103
+ "data-tip": true,
104
+ "data-for": "reviewListItem",
105
+ tabIndex: 0
106
+ }, /*#__PURE__*/_react.default.createElement("div", {
107
+ className: _style.default.reviewListText
108
+ }, /*#__PURE__*/_react.default.createElement(ReviewIcon, {
109
+ icon: iconKey
110
+ }), " ", label.text), /*#__PURE__*/_react.default.createElement(ToolTip, {
111
+ tooltipText: label.tooltipText,
112
+ "aria-label": label.moreDetailsAriaLabel,
113
+ closeToolTipInformationTextAriaLabel: label.closeToolTipInformationTextAriaLabel,
114
+ "data-testid": `review-list-item-tooltip-button-${iconKey}`
115
+ }));
60
116
  };
61
117
 
62
118
  const ReviewPresentation = props => {
@@ -89,21 +145,31 @@ const ReviewPresentation = props => {
89
145
  return /*#__PURE__*/_react.default.createElement("li", {
90
146
  key: `step-${key}`,
91
147
  className: _style.default.reviewList
92
- }, /*#__PURE__*/_react.default.createElement("div", {
93
- className: _style.default.reviewListItemWrapper,
94
- "data-tip": true,
95
- "data-for": "reviewListItem"
96
- }, /*#__PURE__*/_react.default.createElement("div", {
97
- className: _style.default.reviewListText
98
- }, getIcon(key), " ", label.text), /*#__PURE__*/_react.default.createElement(ToolTip, {
99
- tooltipText: label.tooltipText
100
- })));
148
+ }, /*#__PURE__*/_react.default.createElement(ReviewListItemWrapper, {
149
+ iconKey: key,
150
+ label: label,
151
+ tooltipText: label.tooltipText,
152
+ "aria-label": label.moreDetailsAriaLabel
153
+ }));
101
154
  }, labelsList)));
102
155
  };
103
156
 
104
157
  ToolTip.propTypes = process.env.NODE_ENV !== "production" ? {
105
- tooltipText: _propTypes.default.string
158
+ tooltipText: _propTypes.default.string,
159
+ 'aria-label': _propTypes.default.string,
160
+ 'data-testid': _propTypes.default.string,
161
+ closeToolTipInformationTextAriaLabel: _propTypes.default.string
162
+ } : {};
163
+ ReviewIcon.propTypes = process.env.NODE_ENV !== "production" ? {
164
+ icon: _propTypes.default.string
106
165
  } : {};
166
+ ReviewListItemWrapper.propTypes = process.env.NODE_ENV !== "production" ? _extends({}, ToolTip.propTypes, {
167
+ iconKey: _propTypes.default.string,
168
+ label: _propTypes.default.shape({
169
+ tooltipText: _propTypes.default.string,
170
+ moreDetailsAriaLabel: _propTypes.default.string
171
+ })
172
+ }) : {};
107
173
  ReviewPresentation.propTypes = process.env.NODE_ENV !== "production" ? _propTypes2.default : {};
108
174
  var _default = ReviewPresentation;
109
175
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ICONS","skills","TargetIcon","questions","QuestionIcon","lifes","HeartIcon","allright","CheckIcon","getIcon","icon","Icon","getOr","style","labelIcon","ToolTip","tooltipText","tooltipContainer","tooltipIconContainer","informationIcon","toolTip","ReviewPresentation","props","ariaLabel","reviewTitle","reviewText","labelsList","reviewWrapper","__html","reviewListWrapper","map","convert","cap","label","key","reviewList","reviewListItemWrapper","reviewListText","text","propTypes","PropTypes","string"],"sources":["../../../src/atom/review-presentation/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport getOr from 'lodash/fp/getOr';\nimport map from 'lodash/fp/map';\nimport {\n NovaSolidStatusCheckCircle2 as CheckIcon,\n NovaSolidVoteRewardsVoteHeart as HeartIcon,\n NovaCompositionCoorpacademyInformationIcon as InformationIcon,\n NovaSolidInterfaceFeedbackInterfaceQuestionMark as QuestionIcon,\n NovaLineSelectionCursorsCursorArrowTarget as TargetIcon\n} from '@coorpacademy/nova-icons';\nimport style from './style.css';\nimport propTypes from './prop-types';\n\nconst ICONS = {\n skills: TargetIcon,\n questions: QuestionIcon,\n lifes: HeartIcon,\n allright: CheckIcon\n};\n\nconst getIcon = icon => {\n const Icon = getOr(null, icon, ICONS);\n\n /* istanbul ignore next */\n if (!Icon) {\n return <div className={style.labelIcon} />;\n }\n return <Icon className={style.labelIcon} />;\n};\n\nconst ToolTip = ({tooltipText}) => {\n return (\n <div className={style.tooltipContainer}>\n <div className={style.tooltipIconContainer}>\n <InformationIcon className={style.informationIcon} width={12} height={12} />\n </div>\n <div className={style.toolTip}>\n <div className={style.tooltipText}>{tooltipText}</div>\n </div>\n </div>\n );\n};\n\nconst ReviewPresentation = props => {\n const {'aria-label': ariaLabel, reviewTitle, reviewText, labelsList} = props;\n\n return (\n <div className={style.reviewWrapper} aria-label={ariaLabel}>\n <div\n className={style.reviewTitle}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: reviewTitle}}\n />\n <div\n className={style.reviewText}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: reviewText}}\n />\n <ul className={style.reviewListWrapper}>\n {map.convert({cap: false})((label, key) => {\n return (\n <li key={`step-${key}`} className={style.reviewList}>\n <div className={style.reviewListItemWrapper} data-tip data-for=\"reviewListItem\">\n <div className={style.reviewListText}>\n {getIcon(key)} {label.text}\n </div>\n <ToolTip tooltipText={label.tooltipText} />\n </div>\n </li>\n );\n }, labelsList)}\n </ul>\n </div>\n );\n};\n\nToolTip.propTypes = {\n tooltipText: PropTypes.string\n};\n\nReviewPresentation.propTypes = propTypes;\n\nexport default ReviewPresentation;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AAOA;;AACA;;;;AAEA,MAAMA,KAAK,GAAG;EACZC,MAAM,E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EAAEH;IAAT;EAH3B,EANF,eAWE;IAAI,SAAS,EAAEZ,cAAA,CAAMgB;EAArB,GACGC,YAAA,CAAIC,OAAJ,CAAY;IAACC,GAAG,EAAE;EAAN,CAAZ,EAA0B,CAACC,KAAD,EAAQC,GAAR,KAAgB;IACzC,oBACE;MAAI,GAAG,EAAG,QAAOA,GAAI,EAArB;MAAwB,SAAS,EAAErB,cAAA,CAAMsB;IAAzC,gBACE;MAAK,SAAS,EAAEtB,cAAA,CAAMuB,qBAAtB;MAA6C,gBAA7C;MAAsD,YAAS;IAA/D,gBACE;MAAK,SAAS,EAAEvB,cAAA,CAAMwB;IAAtB,GACG5B,OAAO,CAACyB,GAAD,CADV,OACkBD,KAAK,CAACK,IADxB,CADF,eAIE,6BAAC,OAAD;MAAS,WAAW,EAAEL,KAAK,CAACjB;IAA5B,EAJF,CADF,CADF;EAUD,CAXA,EAWEU,UAXF,CADH,CAXF,CADF;AA4BD,CA/BD;;AAiCAX,OAAO,CAACwB,SAAR,2CAAoB;EAClBvB,WAAW,EAAEwB,kBAAA,CAAUC;AADL,CAApB;AAIApB,kBAAkB,CAACkB,SAAnB,2CAA+BA,mBAA/B;eAEelB,kB"}
1
+ {"version":3,"file":"index.js","names":["ICONS","skills","TargetIcon","questions","QuestionIcon","lifes","HeartIcon","allright","CheckIcon","ReviewIcon","icon","Icon","getOr","style","labelIcon","ToolTip","tooltipText","moreDetailsAriaLabel","dataTestId","closeToolTipInformationTextAriaLabel","toolTipIsVisible","setToolTipIsVisible","useState","handleKeyPress","useCallback","event","key","handleMouseOver","handleMouseLeave","customStyle","visibility","opacity","tooltipContainer","tooltipIconContainer","informationIcon","toolTip","ReviewListItemWrapper","iconKey","label","reviewListItemWrapper","reviewListText","text","ReviewPresentation","props","ariaLabel","reviewTitle","reviewText","labelsList","reviewWrapper","__html","reviewListWrapper","map","convert","cap","reviewList","propTypes","PropTypes","string","shape"],"sources":["../../../src/atom/review-presentation/index.js"],"sourcesContent":["import React, {useState, useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport getOr from 'lodash/fp/getOr';\nimport map from 'lodash/fp/map';\nimport {\n NovaSolidStatusCheckCircle2 as CheckIcon,\n NovaSolidVoteRewardsVoteHeart as HeartIcon,\n NovaCompositionCoorpacademyInformationIcon as InformationIcon,\n NovaSolidInterfaceFeedbackInterfaceQuestionMark as QuestionIcon,\n NovaLineSelectionCursorsCursorArrowTarget as TargetIcon\n} from '@coorpacademy/nova-icons';\nimport style from './style.css';\nimport propTypes from './prop-types';\n\nconst ICONS = {\n skills: TargetIcon,\n questions: QuestionIcon,\n lifes: HeartIcon,\n allright: CheckIcon\n};\n\nconst ReviewIcon = ({icon}) => {\n const Icon = getOr(null, icon, ICONS);\n\n /* istanbul ignore next */\n if (!Icon) {\n return <div className={style.labelIcon} />;\n }\n return <Icon className={style.labelIcon} />;\n};\n\nconst ToolTip = ({\n tooltipText,\n 'aria-label': moreDetailsAriaLabel,\n 'data-testid': dataTestId,\n closeToolTipInformationTextAriaLabel\n}) => {\n const [toolTipIsVisible, setToolTipIsVisible] = useState(false);\n const handleKeyPress = useCallback(\n event => {\n if (event.key === 'Enter') {\n setToolTipIsVisible(!toolTipIsVisible);\n } else if (event.key === 'Tab' || event.key === 'Escape') {\n setToolTipIsVisible(false);\n }\n },\n [setToolTipIsVisible, toolTipIsVisible]\n );\n const handleMouseOver = useCallback(() => setToolTipIsVisible(true), [setToolTipIsVisible]);\n\n const handleMouseLeave = useCallback(() => setToolTipIsVisible(false), [setToolTipIsVisible]);\n const customStyle = {\n visibility: toolTipIsVisible ? 'visible' : 'hidden',\n opacity: toolTipIsVisible ? 1 : 0\n };\n return (\n <div className={style.tooltipContainer}>\n <button\n type=\"button\"\n className={style.tooltipIconContainer}\n data-testid={dataTestId}\n onMouseOver={handleMouseOver}\n onMouseLeave={handleMouseLeave}\n onKeyDown={handleKeyPress}\n tabIndex={0}\n >\n <InformationIcon\n className={style.informationIcon}\n width={12}\n height={12}\n aria-label={moreDetailsAriaLabel}\n />\n </button>\n {toolTipIsVisible ? (\n <div\n className={style.toolTip}\n style={customStyle}\n data-testid=\"review-presentation-tooltip\"\n aria-label={closeToolTipInformationTextAriaLabel}\n >\n <p className={style.tooltipText}>{tooltipText}</p>\n </div>\n ) : null}\n </div>\n );\n};\n\nconst ReviewListItemWrapper = ({iconKey, label}) => {\n return (\n <div className={style.reviewListItemWrapper} data-tip data-for=\"reviewListItem\" tabIndex={0}>\n <div className={style.reviewListText}>\n <ReviewIcon icon={iconKey} /> {label.text}\n </div>\n <ToolTip\n tooltipText={label.tooltipText}\n aria-label={label.moreDetailsAriaLabel}\n closeToolTipInformationTextAriaLabel={label.closeToolTipInformationTextAriaLabel}\n data-testid={`review-list-item-tooltip-button-${iconKey}`}\n />\n </div>\n );\n};\n\nconst ReviewPresentation = props => {\n const {'aria-label': ariaLabel, reviewTitle, reviewText, labelsList} = props;\n\n return (\n <div className={style.reviewWrapper} aria-label={ariaLabel}>\n <div\n className={style.reviewTitle}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: reviewTitle}}\n />\n <div\n className={style.reviewText}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: reviewText}}\n />\n <ul className={style.reviewListWrapper}>\n {map.convert({cap: false})((label, key) => {\n return (\n <li key={`step-${key}`} className={style.reviewList}>\n <ReviewListItemWrapper\n iconKey={key}\n label={label}\n tooltipText={label.tooltipText}\n aria-label={label.moreDetailsAriaLabel}\n />\n </li>\n );\n }, labelsList)}\n </ul>\n </div>\n );\n};\n\nToolTip.propTypes = {\n tooltipText: PropTypes.string,\n 'aria-label': PropTypes.string,\n 'data-testid': PropTypes.string,\n closeToolTipInformationTextAriaLabel: PropTypes.string\n};\n\nReviewIcon.propTypes = {\n icon: PropTypes.string\n};\n\nReviewListItemWrapper.propTypes = {\n ...ToolTip.propTypes,\n iconKey: PropTypes.string,\n label: PropTypes.shape({\n tooltipText: PropTypes.string,\n moreDetailsAriaLabel: PropTypes.string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,EAAEqC,kBAAA,CAAUC;AAJ9B,CAApB;AAOAhD,UAAU,CAAC8C,SAAX,2CAAuB;EACrB7C,IAAI,EAAE8C,kBAAA,CAAUC;AADK,CAAvB;AAIArB,qBAAqB,CAACmB,SAAtB,wDACKxC,OAAO,CAACwC,SADb;EAEElB,OAAO,EAAEmB,kBAAA,CAAUC,MAFrB;EAGEnB,KAAK,EAAEkB,kBAAA,CAAUE,KAAV,CAAgB;IACrB1C,WAAW,EAAEwC,kBAAA,CAAUC,MADF;IAErBxC,oBAAoB,EAAEuC,kBAAA,CAAUC;EAFX,CAAhB;AAHT;AASAf,kBAAkB,CAACa,SAAnB,2CAA+BA,mBAA/B;eAEeb,kB"}
@@ -9,18 +9,26 @@ declare const propTypes: {
9
9
  skills: PropTypes.Requireable<PropTypes.InferProps<{
10
10
  text: PropTypes.Requireable<string>;
11
11
  tooltipText: PropTypes.Requireable<string>;
12
+ moreDetailsAreaLabel: PropTypes.Requireable<string>;
13
+ closeToolTipInformationTextAriaLabel: PropTypes.Requireable<string>;
12
14
  }>>;
13
15
  questions: PropTypes.Requireable<PropTypes.InferProps<{
14
16
  text: PropTypes.Requireable<string>;
15
17
  tooltipText: PropTypes.Requireable<string>;
18
+ moreDetailsAreaLabel: PropTypes.Requireable<string>;
19
+ closeToolTipInformationTextAriaLabel: PropTypes.Requireable<string>;
16
20
  }>>;
17
21
  lifes: PropTypes.Requireable<PropTypes.InferProps<{
18
22
  text: PropTypes.Requireable<string>;
19
23
  tooltipText: PropTypes.Requireable<string>;
24
+ moreDetailsAreaLabel: PropTypes.Requireable<string>;
25
+ closeToolTipInformationTextAriaLabel: PropTypes.Requireable<string>;
20
26
  }>>;
21
27
  allright: PropTypes.Requireable<PropTypes.InferProps<{
22
28
  text: PropTypes.Requireable<string>;
23
29
  tooltipText: PropTypes.Requireable<string>;
30
+ moreDetailsAreaLabel: PropTypes.Requireable<string>;
31
+ closeToolTipInformationTextAriaLabel: PropTypes.Requireable<string>;
24
32
  }>>;
25
33
  }>>;
26
34
  };
@@ -40,18 +48,22 @@ export declare type OnboardingProps = {
40
48
  skills?: {
41
49
  text?: string | undefined;
42
50
  tooltipText?: string | undefined;
51
+ 'aria-label'?: string | undefined;
43
52
  } | undefined;
44
53
  questions?: {
45
54
  text?: string | undefined;
46
55
  tooltipText?: string | undefined;
56
+ 'aria-label'?: string | undefined;
47
57
  };
48
58
  lifes?: {
49
59
  text?: string | undefined;
50
60
  tooltipText?: string | undefined;
61
+ 'aria-label'?: string | undefined;
51
62
  } | undefined;
52
63
  allright?: {
53
64
  text?: string | undefined;
54
65
  tooltipText?: string | undefined;
66
+ 'aria-label'?: string | undefined;
55
67
  } | undefined;
56
68
  };
57
69
  onPress: (event: GestureResponderEvent) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/atom/review-presentation/prop-types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAC,UAAU,EAAE,qBAAqB,EAAE,SAAS,EAAC,MAAM,cAAc,CAAC;AAO1E,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;CAUd,CAAC;AAEF,eAAe,SAAS,CAAC;AAEzB,eAAO,MAAM,oBAAoB;;CAEhC,CAAC;AAEF,eAAO,MAAM,aAAa;;;CAGzB,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC5B,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,UAAU,CAAC,EAAE;QACX,MAAM,CAAC,EACH;YACE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;SAClC,GACD,SAAS,CAAC;QACd,SAAS,CAAC,EAAE;YACV,IAAI,CAAC,EAAE,MAAM,GAA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,GAAG,SAAS,CAAC;IAChC,UAAU,CAAC,EAAE;QACX,MAAM,CAAC,EACH;YACE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YACjC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;SACnC,GACD,SAAS,CAAC;QACd,SAAS,CAAC,EAAE;YACV,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YACjC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;SACnC,CAAC;QACF,KAAK,CAAC,EACF;YACE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YACjC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;SACnC,GACD,SAAS,CAAC;QACd,QAAQ,CAAC,EACL;YACE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YACjC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;SACnC,GACD,SAAS,CAAC;KACf,CAAC;IACF,OAAO,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAC;CACjD,CAAC;AAEF,oBAAY,QAAQ,GAAG;IACrB,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,SAAS,CAAC;QAAC,KAAK,EAAE,UAAU,CAAA;KAAC,CAAC,CAAC;CACtF,CAAC"}
@@ -9,7 +9,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
9
9
 
10
10
  const levelItem = _propTypes.default.shape({
11
11
  text: _propTypes.default.string,
12
- tooltipText: _propTypes.default.string
12
+ tooltipText: _propTypes.default.string,
13
+ moreDetailsAreaLabel: _propTypes.default.string,
14
+ closeToolTipInformationTextAriaLabel: _propTypes.default.string
13
15
  });
14
16
 
15
17
  const propTypes = {
@@ -1 +1 @@
1
- {"version":3,"file":"prop-types.js","names":["levelItem","PropTypes","shape","text","string","tooltipText","propTypes","reviewTitle","reviewText","labelsList","skills","questions","lifes","allright","OnboardingPropsTypes","onPress","func","TipPropsTypes","Icon","any"],"sources":["../../../src/atom/review-presentation/prop-types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport {ColorValue, GestureResponderEvent, ViewStyle} from 'react-native';\n\nconst levelItem = PropTypes.shape({\n text: PropTypes.string,\n tooltipText: PropTypes.string\n});\n\nconst propTypes = {\n 'aria-label': PropTypes.string,\n reviewTitle: PropTypes.string,\n reviewText: PropTypes.string,\n labelsList: PropTypes.shape({\n skills: levelItem,\n questions: levelItem,\n lifes: levelItem,\n allright: levelItem\n })\n};\n\nexport default propTypes;\n\nexport const OnboardingPropsTypes = {\n onPress: PropTypes.func\n};\n\nexport const TipPropsTypes = {\n text: PropTypes.string,\n Icon: PropTypes.any\n};\n\nexport type OnboardingProps = {\n 'aria-label'?: string | undefined;\n reviewTitle?: string | undefined;\n reviewText?: string | undefined;\n labelsList?: {\n skills?:\n | {\n text?: string | undefined;\n tooltipText?: string | undefined;\n }\n | undefined;\n questions?: {\n text?: string | undefined;\n tooltipText?: string | undefined;\n };\n lifes?:\n | {\n text?: string | undefined;\n tooltipText?: string | undefined;\n }\n | undefined;\n allright?:\n | {\n text?: string | undefined;\n tooltipText?: string | undefined;\n }\n | undefined;\n };\n onPress: (event: GestureResponderEvent) => void;\n};\n\nexport type TipProps = {\n text: string | undefined;\n Icon: React.FC<{height: number; width: number; style: ViewStyle; color: ColorValue}>;\n};\n"],"mappings":";;;;;AAAA;;;;AAGA,MAAMA,SAAS,GAAGC,kBAAA,CAAUC,KAAV,CAAgB;EAChCC,IAAI,EAAEF,kBAAA,CAAUG,MADgB;EAEhCC,WAAW,EAAEJ,kBAAA,CAAUG;AAFS,CAAhB,CAAlB;;AAKA,MAAME,SAAS,GAAG;EAChB,cAAcL,kBAAA,CAAUG,MADR;EAEhBG,WAAW,EAAEN,kBAAA,CAAUG,MAFP;EAGhBI,UAAU,EAAEP,kBAAA,CAAUG,MAHN;EAIhBK,UAAU,EAAER,kBAAA,CAAUC,KAAV,CAAgB;IAC1BQ,MAAM,EAAEV,SADkB;IAE1BW,SAAS,EAAEX,SAFe;IAG1BY,KAAK,EAAEZ,SAHmB;IAI1Ba,QAAQ,EAAEb;EAJgB,CAAhB;AAJI,CAAlB;eAYeM,S;;AAER,MAAMQ,oBAAoB,GAAG;EAClCC,OAAO,EAAEd,kBAAA,CAAUe;AADe,CAA7B;;AAIA,MAAMC,aAAa,GAAG;EAC3Bd,IAAI,EAAEF,kBAAA,CAAUG,MADW;EAE3Bc,IAAI,EAAEjB,kBAAA,CAAUkB;AAFW,CAAtB"}
1
+ {"version":3,"file":"prop-types.js","names":["levelItem","PropTypes","shape","text","string","tooltipText","moreDetailsAreaLabel","closeToolTipInformationTextAriaLabel","propTypes","reviewTitle","reviewText","labelsList","skills","questions","lifes","allright","OnboardingPropsTypes","onPress","func","TipPropsTypes","Icon","any"],"sources":["../../../src/atom/review-presentation/prop-types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport {ColorValue, GestureResponderEvent, ViewStyle} from 'react-native';\n\nconst levelItem = PropTypes.shape({\n text: PropTypes.string,\n tooltipText: PropTypes.string,\n moreDetailsAreaLabel: PropTypes.string,\n closeToolTipInformationTextAriaLabel: PropTypes.string\n});\n\nconst propTypes = {\n 'aria-label': PropTypes.string,\n reviewTitle: PropTypes.string,\n reviewText: PropTypes.string,\n labelsList: PropTypes.shape({\n skills: levelItem,\n questions: levelItem,\n lifes: levelItem,\n allright: levelItem\n })\n};\n\nexport default propTypes;\n\nexport const OnboardingPropsTypes = {\n onPress: PropTypes.func\n};\n\nexport const TipPropsTypes = {\n text: PropTypes.string,\n Icon: PropTypes.any\n};\n\nexport type OnboardingProps = {\n 'aria-label'?: string | undefined;\n reviewTitle?: string | undefined;\n reviewText?: string | undefined;\n labelsList?: {\n skills?:\n | {\n text?: string | undefined;\n tooltipText?: string | undefined;\n 'aria-label'?: string | undefined;\n }\n | undefined;\n questions?: {\n text?: string | undefined;\n tooltipText?: string | undefined;\n 'aria-label'?: string | undefined;\n };\n lifes?:\n | {\n text?: string | undefined;\n tooltipText?: string | undefined;\n 'aria-label'?: string | undefined;\n }\n | undefined;\n allright?:\n | {\n text?: string | undefined;\n tooltipText?: string | undefined;\n 'aria-label'?: string | undefined;\n }\n | undefined;\n };\n onPress: (event: GestureResponderEvent) => void;\n};\n\nexport type TipProps = {\n text: string | undefined;\n Icon: React.FC<{height: number; width: number; style: ViewStyle; color: ColorValue}>;\n};\n"],"mappings":";;;;;AAAA;;;;AAGA,MAAMA,SAAS,GAAGC,kBAAA,CAAUC,KAAV,CAAgB;EAChCC,IAAI,EAAEF,kBAAA,CAAUG,MADgB;EAEhCC,WAAW,EAAEJ,kBAAA,CAAUG,MAFS;EAGhCE,oBAAoB,EAAEL,kBAAA,CAAUG,MAHA;EAIhCG,oCAAoC,EAAEN,kBAAA,CAAUG;AAJhB,CAAhB,CAAlB;;AAOA,MAAMI,SAAS,GAAG;EAChB,cAAcP,kBAAA,CAAUG,MADR;EAEhBK,WAAW,EAAER,kBAAA,CAAUG,MAFP;EAGhBM,UAAU,EAAET,kBAAA,CAAUG,MAHN;EAIhBO,UAAU,EAAEV,kBAAA,CAAUC,KAAV,CAAgB;IAC1BU,MAAM,EAAEZ,SADkB;IAE1Ba,SAAS,EAAEb,SAFe;IAG1Bc,KAAK,EAAEd,SAHmB;IAI1Be,QAAQ,EAAEf;EAJgB,CAAhB;AAJI,CAAlB;eAYeQ,S;;AAER,MAAMQ,oBAAoB,GAAG;EAClCC,OAAO,EAAEhB,kBAAA,CAAUiB;AADe,CAA7B;;AAIA,MAAMC,aAAa,GAAG;EAC3BhB,IAAI,EAAEF,kBAAA,CAAUG,MADW;EAE3BgB,IAAI,EAAEnB,kBAAA,CAAUoB;AAFW,CAAtB"}
@@ -82,8 +82,6 @@
82
82
  }
83
83
 
84
84
  .toolTip {
85
- visibility: hidden;
86
- opacity: 0;
87
85
  transition: opacity 0.8s;
88
86
  position: absolute;
89
87
  height: auto;
@@ -97,8 +95,8 @@
97
95
  .toolTip::before {
98
96
  content: '';
99
97
  display: inline-block;
100
- visibility: hidden;
101
- opacity: 0;
98
+ visibility: inherit;
99
+ opacity: inherit;
102
100
  width: 15px;
103
101
  height: 15px;
104
102
  transform: rotate(-45deg);
@@ -126,19 +124,10 @@
126
124
  position: relative;
127
125
  }
128
126
 
129
- .reviewListItemWrapper:hover .tooltipContainer .toolTip {
130
- visibility: visible;
131
- opacity: 1;
132
- }
133
-
134
- .reviewListItemWrapper:hover .tooltipContainer .toolTip::before {
135
- visibility: visible;
136
- opacity: 1;
137
- }
138
-
139
127
  .tooltipIconContainer {
140
128
  display: flex;
141
129
  justify-content: flex-end;
130
+ border: none;
142
131
  }
143
132
 
144
133
  @media tablet {
@@ -31,27 +31,26 @@ declare namespace Select {
31
31
  }>;
32
32
  }>>;
33
33
  }
34
- namespace propTypes {
35
- export const title: PropTypes.Requireable<string>;
36
- export const moreAriaLabel: PropTypes.Requireable<string>;
37
- const name_1: PropTypes.Requireable<string>;
38
- export { name_1 as name };
39
- export const className: PropTypes.Requireable<string>;
40
- export const borderClassName: PropTypes.Requireable<string>;
41
- export const disabled: PropTypes.Requireable<boolean>;
42
- export const multiple: PropTypes.Requireable<boolean>;
43
- export const description: PropTypes.Requireable<string>;
44
- export const required: PropTypes.Requireable<boolean>;
45
- export const onChange: PropTypes.Requireable<(...args: any[]) => any>;
46
- export const theme: PropTypes.Requireable<string>;
47
- export const options: PropTypes.Requireable<(PropTypes.InferProps<{
34
+ const propTypes: {
35
+ title: PropTypes.Requireable<string>;
36
+ name: PropTypes.Requireable<string>;
37
+ className: PropTypes.Requireable<string>;
38
+ borderClassName: PropTypes.Requireable<string>;
39
+ disabled: PropTypes.Requireable<boolean>;
40
+ multiple: PropTypes.Requireable<boolean>;
41
+ description: PropTypes.Requireable<string>;
42
+ required: PropTypes.Requireable<boolean>;
43
+ onChange: PropTypes.Requireable<(...args: any[]) => any>;
44
+ theme: PropTypes.Requireable<string>;
45
+ options: PropTypes.Requireable<(PropTypes.InferProps<{
48
46
  name: PropTypes.Validator<string>;
49
47
  value: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
50
48
  selected: PropTypes.Requireable<boolean>;
51
49
  validOption: PropTypes.Requireable<boolean>;
52
50
  }> | null | undefined)[]>;
53
- export const modified: PropTypes.Requireable<boolean>;
54
- export const error: PropTypes.Requireable<boolean>;
55
- }
51
+ modified: PropTypes.Requireable<boolean>;
52
+ error: PropTypes.Requireable<boolean>;
53
+ 'aria-label': PropTypes.Requireable<string>;
54
+ };
56
55
  }
57
56
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/select/index.js"],"names":[],"mappings":";;;;;;;;AA6BA,qEA4JC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/select/index.js"],"names":[],"mappings":";;;;;;;;AA6BA,qEA6JC"}