@coorpacademy/components 11.32.26 → 11.32.28

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 (88) hide show
  1. package/es/atom/{button-link-icon-only → button-link-icon}/index.d.ts +5 -3
  2. package/es/atom/button-link-icon/index.d.ts.map +1 -0
  3. package/es/atom/button-link-icon/index.js +131 -0
  4. package/es/atom/button-link-icon/index.js.map +1 -0
  5. package/es/atom/{button-link-icon-only → button-link-icon}/style.css +9 -0
  6. package/es/atom/tooltip/index.d.ts +3 -1
  7. package/es/atom/tooltip/index.d.ts.map +1 -1
  8. package/es/atom/tooltip/index.js +9 -5
  9. package/es/atom/tooltip/index.js.map +1 -1
  10. package/es/atom/tooltip/style.css +2 -2
  11. package/es/molecule/bullet-point-menu-button/index.js +2 -2
  12. package/es/molecule/bullet-point-menu-button/index.js.map +1 -1
  13. package/es/molecule/cm-popin/index.js +2 -2
  14. package/es/molecule/cm-popin/index.js.map +1 -1
  15. package/es/molecule/expandible-actionable-table/index.js +2 -2
  16. package/es/molecule/expandible-actionable-table/index.js.map +1 -1
  17. package/es/molecule/playlist-detail-cover/index.js +1 -1
  18. package/es/molecule/playlist-detail-cover/index.js.map +1 -1
  19. package/es/organism/review-header/index.js +2 -2
  20. package/es/organism/review-header/index.js.map +1 -1
  21. package/es/organism/setup-header/index.js +1 -1
  22. package/es/organism/setup-header/index.js.map +1 -1
  23. package/es/organism/wizard-contents/index.js +2 -2
  24. package/es/organism/wizard-contents/index.js.map +1 -1
  25. package/es/template/back-office/brand-update/index.js +2 -2
  26. package/es/template/back-office/brand-update/index.js.map +1 -1
  27. package/es/template/common/faq-article-page/index.js +3 -3
  28. package/es/template/common/faq-article-page/index.js.map +1 -1
  29. package/es/template/external-course/index.d.ts +4 -0
  30. package/es/template/external-course/index.d.ts.map +1 -1
  31. package/es/template/external-course/index.js +6 -1
  32. package/es/template/external-course/index.js.map +1 -1
  33. package/es/template/external-course/style.css +11 -1
  34. package/es/template/playlist-detail/index.d.ts.map +1 -1
  35. package/es/template/playlist-detail/index.js +9 -10
  36. package/es/template/playlist-detail/index.js.map +1 -1
  37. package/es/template/playlist-detail/style.css +1 -6
  38. package/es/template/skill-detail/index.d.ts.map +1 -1
  39. package/es/template/skill-detail/index.js +9 -10
  40. package/es/template/skill-detail/index.js.map +1 -1
  41. package/es/template/skill-detail/style.css +1 -6
  42. package/lib/atom/{button-link-icon-only → button-link-icon}/index.d.ts +5 -3
  43. package/lib/atom/button-link-icon/index.d.ts.map +1 -0
  44. package/lib/atom/{button-link-icon-only → button-link-icon}/index.js +61 -22
  45. package/lib/atom/button-link-icon/index.js.map +1 -0
  46. package/lib/atom/{button-link-icon-only → button-link-icon}/style.css +9 -0
  47. package/lib/atom/tooltip/index.d.ts +3 -1
  48. package/lib/atom/tooltip/index.d.ts.map +1 -1
  49. package/lib/atom/tooltip/index.js +9 -5
  50. package/lib/atom/tooltip/index.js.map +1 -1
  51. package/lib/atom/tooltip/style.css +2 -2
  52. package/lib/molecule/bullet-point-menu-button/index.js +2 -2
  53. package/lib/molecule/bullet-point-menu-button/index.js.map +1 -1
  54. package/lib/molecule/cm-popin/index.js +2 -2
  55. package/lib/molecule/cm-popin/index.js.map +1 -1
  56. package/lib/molecule/expandible-actionable-table/index.js +2 -2
  57. package/lib/molecule/expandible-actionable-table/index.js.map +1 -1
  58. package/lib/molecule/playlist-detail-cover/index.js +1 -1
  59. package/lib/molecule/playlist-detail-cover/index.js.map +1 -1
  60. package/lib/organism/review-header/index.js +2 -2
  61. package/lib/organism/review-header/index.js.map +1 -1
  62. package/lib/organism/setup-header/index.js +2 -2
  63. package/lib/organism/setup-header/index.js.map +1 -1
  64. package/lib/organism/wizard-contents/index.js +2 -2
  65. package/lib/organism/wizard-contents/index.js.map +1 -1
  66. package/lib/template/back-office/brand-update/index.js +2 -2
  67. package/lib/template/back-office/brand-update/index.js.map +1 -1
  68. package/lib/template/common/faq-article-page/index.js +3 -3
  69. package/lib/template/common/faq-article-page/index.js.map +1 -1
  70. package/lib/template/external-course/index.d.ts +4 -0
  71. package/lib/template/external-course/index.d.ts.map +1 -1
  72. package/lib/template/external-course/index.js +6 -1
  73. package/lib/template/external-course/index.js.map +1 -1
  74. package/lib/template/external-course/style.css +11 -1
  75. package/lib/template/playlist-detail/index.d.ts.map +1 -1
  76. package/lib/template/playlist-detail/index.js +10 -10
  77. package/lib/template/playlist-detail/index.js.map +1 -1
  78. package/lib/template/playlist-detail/style.css +1 -6
  79. package/lib/template/skill-detail/index.d.ts.map +1 -1
  80. package/lib/template/skill-detail/index.js +10 -10
  81. package/lib/template/skill-detail/index.js.map +1 -1
  82. package/lib/template/skill-detail/style.css +1 -6
  83. package/package.json +2 -2
  84. package/es/atom/button-link-icon-only/index.d.ts.map +0 -1
  85. package/es/atom/button-link-icon-only/index.js +0 -94
  86. package/es/atom/button-link-icon-only/index.js.map +0 -1
  87. package/lib/atom/button-link-icon-only/index.d.ts.map +0 -1
  88. package/lib/atom/button-link-icon-only/index.js.map +0 -1
@@ -4,6 +4,7 @@ import classnames from 'classnames';
4
4
  import Provider from '../../atom/provider';
5
5
  import Tag from '../../atom/tag';
6
6
  import Select, { SelectOptionPropTypes } from '../../atom/select';
7
+ import ButtonLinkIcon from '../../atom/button-link-icon';
7
8
  import Icon from '../../atom/icon';
8
9
  import CardsGrid from '../../organism/cards-grid';
9
10
  import AllCourses from '../skill-detail/all-courses';
@@ -42,16 +43,14 @@ const PlaylistDetail = (props, context) => {
42
43
  }, /*#__PURE__*/React.createElement("div", {
43
44
  className: style.container,
44
45
  "data-name": playlistRef
45
- }, /*#__PURE__*/React.createElement("div", {
46
- className: style.backButtonWrapper,
47
- onClick: onBackClick
48
- }, /*#__PURE__*/React.createElement(Icon, {
49
- iconName: "arrow-left",
50
- size: {
51
- faSize: 14,
52
- wrapperSize: 14
53
- }
54
- })), /*#__PURE__*/React.createElement("div", {
46
+ }, /*#__PURE__*/React.createElement(ButtonLinkIcon, {
47
+ faIcon: "arrow-left",
48
+ "data-name": "back-button",
49
+ "aria-label": "Back",
50
+ onClick: onBackClick,
51
+ className: style.backButton,
52
+ tooltipPlacement: "right"
53
+ }), /*#__PURE__*/React.createElement("div", {
55
54
  className: style.ctaContainer
56
55
  }, /*#__PURE__*/React.createElement("div", {
57
56
  className: style.coverWrapper
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","useCallback","useState","PropTypes","classnames","Provider","Tag","Select","SelectOptionPropTypes","Icon","CardsGrid","AllCourses","ContinueLearning","PlaylistDetailCover","ContinueLearningButton","style","DESCRIPTION_BREAKPOINT","PlaylistDetail","props","context","title","coverImages","playlistRef","description","ongoingCourses","playlistCourses","totalCourses","filters","sorting","onBackClick","onContinueLearningClick","translate","showMore","setShowMore","handleShowMore","Description","truncate","backgroundContainer","container","backButtonWrapper","faSize","wrapperSize","ctaContainer","coverWrapper","length","showMoreWrapper","continueLearningButton","list","contextTypes","skin","childContextTypes","propTypes","string","isRequired","images","shape","number","onChange","func","options","arrayOf"],"sources":["../../../src/template/playlist-detail/index.js"],"sourcesContent":["import React, {useCallback, useState} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport Provider from '../../atom/provider';\nimport Tag from '../../atom/tag';\nimport Select, {SelectOptionPropTypes} from '../../atom/select';\nimport Icon from '../../atom/icon';\nimport CardsGrid from '../../organism/cards-grid';\nimport AllCourses from '../skill-detail/all-courses';\nimport ContinueLearning from '../skill-detail/continue-learning';\nimport PlaylistDetailCover from '../../molecule/playlist-detail-cover';\nimport {ContinueLearningButton} from '../skill-detail';\nimport style from './style.css';\n\nconst DESCRIPTION_BREAKPOINT = 382;\n\nconst PlaylistDetail = (props, context) => {\n const {\n title,\n coverImages,\n playlistRef,\n description,\n ongoingCourses,\n playlistCourses,\n totalCourses,\n filters,\n sorting,\n onBackClick,\n onContinueLearningClick\n } = props;\n const {translate} = context;\n\n const [showMore, setShowMore] = useState(false);\n\n const handleShowMore = useCallback(() => setShowMore(!showMore), [setShowMore, showMore]);\n\n const Description = useCallback(() => {\n return (\n <div className={classnames(style.description, !showMore && style.truncate)}>\n {description}\n </div>\n );\n }, [showMore, description]);\n\n return (\n <div className={style.backgroundContainer}>\n <div className={style.container} data-name={playlistRef}>\n <div className={style.backButtonWrapper} onClick={onBackClick}>\n <Icon iconName=\"arrow-left\" size={{faSize: 14, wrapperSize: 14}} />\n </div>\n <div className={style.ctaContainer}>\n <div className={style.coverWrapper}>\n <PlaylistDetailCover images={coverImages} />\n </div>\n <div>\n <Tag label={translate('playlist')} />\n <div className={style.title}>{title}</div>\n {description ? (\n <>\n <Description />\n {description.length >= DESCRIPTION_BREAKPOINT ? (\n <div className={style.showMoreWrapper} onClick={handleShowMore}>\n {translate(showMore ? 'Show less' : 'Show more')}\n <Icon\n iconName={showMore ? 'chevron-up' : 'chevron-down'}\n size={{faSize: 14, wrapperSize: 16}}\n />\n </div>\n ) : null}\n </>\n ) : null}\n <div className={style.continueLearningButton}>\n <ContinueLearningButton\n ongoingCoursesAvailable={!!ongoingCourses.list.length}\n onClick={onContinueLearningClick}\n />\n </div>\n </div>\n </div>\n <ContinueLearning ongoingCourses={ongoingCourses} />\n <AllCourses\n courses={playlistCourses}\n totalCourses={totalCourses}\n filters={filters}\n sorting={sorting}\n />\n </div>\n </div>\n );\n};\n\nPlaylistDetail.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nPlaylistDetail.propTypes = {\n title: PropTypes.string.isRequired,\n coverImages: PlaylistDetailCover.propTypes.images,\n playlistRef: PropTypes.string.isRequired,\n description: PropTypes.string,\n ongoingCourses: PropTypes.shape(CardsGrid.propTypes),\n playlistCourses: PropTypes.shape(CardsGrid.propTypes),\n totalCourses: PropTypes.number,\n filters: PropTypes.shape({\n onChange: PropTypes.func,\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes))\n }),\n sorting: PropTypes.shape(Select.propTypes),\n onBackClick: PropTypes.func,\n onContinueLearningCl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cAAf"}
1
+ {"version":3,"file":"index.js","names":["React","useCallback","useState","PropTypes","classnames","Provider","Tag","Select","SelectOptionPropTypes","ButtonLinkIcon","Icon","CardsGrid","AllCourses","ContinueLearning","PlaylistDetailCover","ContinueLearningButton","style","DESCRIPTION_BREAKPOINT","PlaylistDetail","props","context","title","coverImages","playlistRef","description","ongoingCourses","playlistCourses","totalCourses","filters","sorting","onBackClick","onContinueLearningClick","translate","showMore","setShowMore","handleShowMore","Description","truncate","backgroundContainer","container","backButton","ctaContainer","coverWrapper","length","showMoreWrapper","faSize","wrapperSize","continueLearningButton","list","contextTypes","skin","childContextTypes","propTypes","string","isRequired","images","shape","number","onChange","func","options","arrayOf"],"sources":["../../../src/template/playlist-detail/index.js"],"sourcesContent":["import React, {useCallback, useState} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport Provider from '../../atom/provider';\nimport Tag from '../../atom/tag';\nimport Select, {SelectOptionPropTypes} from '../../atom/select';\nimport ButtonLinkIcon from '../../atom/button-link-icon';\nimport Icon from '../../atom/icon';\nimport CardsGrid from '../../organism/cards-grid';\nimport AllCourses from '../skill-detail/all-courses';\nimport ContinueLearning from '../skill-detail/continue-learning';\nimport PlaylistDetailCover from '../../molecule/playlist-detail-cover';\nimport {ContinueLearningButton} from '../skill-detail';\nimport style from './style.css';\n\nconst DESCRIPTION_BREAKPOINT = 382;\n\nconst PlaylistDetail = (props, context) => {\n const {\n title,\n coverImages,\n playlistRef,\n description,\n ongoingCourses,\n playlistCourses,\n totalCourses,\n filters,\n sorting,\n onBackClick,\n onContinueLearningClick\n } = props;\n const {translate} = context;\n\n const [showMore, setShowMore] = useState(false);\n\n const handleShowMore = useCallback(() => setShowMore(!showMore), [setShowMore, showMore]);\n\n const Description = useCallback(() => {\n return (\n <div className={classnames(style.description, !showMore && style.truncate)}>\n {description}\n </div>\n );\n }, [showMore, description]);\n\n return (\n <div className={style.backgroundContainer}>\n <div className={style.container} data-name={playlistRef}>\n <ButtonLinkIcon\n faIcon=\"arrow-left\"\n data-name=\"back-button\"\n aria-label=\"Back\"\n onClick={onBackClick}\n className={style.backButton}\n tooltipPlacement=\"right\"\n />\n <div className={style.ctaContainer}>\n <div className={style.coverWrapper}>\n <PlaylistDetailCover images={coverImages} />\n </div>\n <div>\n <Tag label={translate('playlist')} />\n <div className={style.title}>{title}</div>\n {description ? (\n <>\n <Description />\n {description.length >= DESCRIPTION_BREAKPOINT ? (\n <div className={style.showMoreWrapper} onClick={handleShowMore}>\n {translate(showMore ? 'Show less' : 'Show more')}\n <Icon\n iconName={showMore ? 'chevron-up' : 'chevron-down'}\n size={{faSize: 14, wrapperSize: 16}}\n />\n </div>\n ) : null}\n </>\n ) : null}\n <div className={style.continueLearningButton}>\n <ContinueLearningButton\n ongoingCoursesAvailable={!!ongoingCourses.list.length}\n onClick={onContinueLearningClick}\n />\n </div>\n </div>\n </div>\n <ContinueLearning ongoingCourses={ongoingCourses} />\n <AllCourses\n courses={playlistCourses}\n totalCourses={totalCourses}\n filters={filters}\n sorting={sorting}\n />\n </div>\n </div>\n );\n};\n\nPlaylistDetail.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nPlaylistDetail.propTypes = {\n title: PropTypes.string.isRequired,\n coverImages: PlaylistDetailCover.propTypes.images,\n playlistRef: PropTypes.string.isRequired,\n description: PropTypes.string,\n ongoingCourses: PropTypes.shape(CardsGrid.propTypes),\n playlistCourses: PropTypes.shape(CardsGrid.propTypes),\n totalCourses: PropTypes.number,\n filters: PropTypes.shape({\n onChange: PropTypes.func,\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes))\n }),\n sorting: PropTypes.shape(Select.propTypes),\n onBackClick: PropTypes.func,\n onContinueLearningClick: PropTypes.func\n};\n\nexport default PlaylistDetail;\n"],"mappings":"AAAA,OAAOA,KAAP,IAAeC,WAAf,EAA4BC,QAA5B,QAA2C,OAA3C;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAC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AO,EAAEC,OAHX;IAIE,OAAO,EAAEC;EAJX,EAvCF,CADF,CADF;AAkDD,CA9ED;;AAgFAX,cAAc,CAAC+B,YAAf,GAA8B;EAC5BC,IAAI,EAAE7C,QAAQ,CAAC8C,iBAAT,CAA2BD,IADL;EAE5BlB,SAAS,EAAE3B,QAAQ,CAAC8C,iBAAT,CAA2BnB;AAFV,CAA9B;AAKAd,cAAc,CAACkC,SAAf,2CAA2B;EACzB/B,KAAK,EAAElB,SAAS,CAACkD,MAAV,CAAiBC,UADC;EAEzBhC,WAAW,EAAER,mBAAmB,CAACsC,SAApB,CAA8BG,MAFlB;EAGzBhC,WAAW,EAAEpB,SAAS,CAACkD,MAAV,CAAiBC,UAHL;EAIzB9B,WAAW,EAAErB,SAAS,CAACkD,MAJE;EAKzB5B,cAAc,EAAEtB,SAAS,CAACqD,KAAV,CAAgB7C,SAAS,CAACyC,SAA1B,CALS;EAMzB1B,eAAe,EAAEvB,SAAS,CAACqD,KAAV,CAAgB7C,SAAS,CAACyC,SAA1B,CANQ;EAOzBzB,YAAY,EAAExB,SAAS,CAACsD,MAPC;EAQzB7B,OAAO,EAAEzB,SAAS,CAACqD,KAAV,CAAgB;IACvBE,QAAQ,EAAEvD,SAAS,CAACwD,IADG;IAEvBC,OAAO,EAAEzD,SAAS,CAAC0D,OAAV,CAAkB1D,SAAS,CAACqD,KAAV,CAAgBhD,qBAAhB,CAAlB;EAFc,CAAhB,CARgB;EAYzBqB,OAAO,EAAE1B,SAAS,CAACqD,KAAV,CAAgBjD,MAAM,CAAC6C,SAAvB,CAZgB;EAazBtB,WAAW,EAAE3B,SAAS,CAACwD,IAbE;EAczB5B,uBAAuB,EAAE5B,SAAS,CAACwD;AAdV,CAA3B;AAiBA,eAAezC,cAAf"}
@@ -35,13 +35,8 @@
35
35
  max-width: calc(1080px + 40px);
36
36
  }
37
37
 
38
- .backButtonWrapper {
38
+ .backButton {
39
39
  margin-bottom: 16px;
40
- background-color: cm_grey_100;
41
- border-radius: 8px;
42
- width: fit-content;
43
- padding: 8px;
44
- cursor: pointer;
45
40
  }
46
41
 
47
42
  .ctaContainer {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/skill-detail/index.js"],"names":[],"mappings":"AAcO,8EA+BN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYD,oEA+JC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/skill-detail/index.js"],"names":[],"mappings":"AAeO,8EA+BN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYD,oEA8JC"}
@@ -6,6 +6,7 @@ import classnames from 'classnames';
6
6
  import Provider from '../../atom/provider';
7
7
  import Select, { SelectOptionPropTypes } from '../../atom/select';
8
8
  import ButtonLink from '../../atom/button-link';
9
+ import ButtonLinkIcon from '../../atom/button-link-icon';
9
10
  import Icon from '../../atom/icon';
10
11
  import CardsGrid from '../../organism/cards-grid';
11
12
  import style from './style.css';
@@ -107,16 +108,14 @@ const SkillDetail = (props, context) => {
107
108
  }, /*#__PURE__*/React.createElement("div", {
108
109
  className: style.container,
109
110
  "data-name": skillRef
110
- }, /*#__PURE__*/React.createElement("div", {
111
- className: style.backButtonWrapper,
112
- onClick: onBackClick
113
- }, /*#__PURE__*/React.createElement(Icon, {
114
- iconName: "arrow-left",
115
- size: {
116
- faSize: 14,
117
- wrapperSize: 14
118
- }
119
- })), /*#__PURE__*/React.createElement("div", {
111
+ }, /*#__PURE__*/React.createElement(ButtonLinkIcon, {
112
+ faIcon: "arrow-left",
113
+ "data-name": "back-button",
114
+ "aria-label": "Back",
115
+ onClick: onBackClick,
116
+ className: style.backButton,
117
+ tooltipPlacement: "right"
118
+ }), /*#__PURE__*/React.createElement("div", {
120
119
  className: style.ctaContainer
121
120
  }, /*#__PURE__*/React.createElement("div", null, focused ? /*#__PURE__*/React.createElement("div", {
122
121
  className: style.skillFocusBadge
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","useCallback","useState","PropTypes","convert","classnames","Provider","Select","SelectOptionPropTypes","ButtonLink","Icon","CardsGrid","style","AllCourses","ContinueLearning","ContinueLearningButton","props","context","ongoingCoursesAvailable","onClick","skin","translate","primarySkinColor","width","borderRadius","backgroundColor","position","faIcon","name","color","size","contextTypes","childContextTypes","propTypes","bool","func","SkillDetail","title","skillRef","description","metrics","focused","availableForReview","ongoingCourses","skillIncludedCourses","totalCourses","filters","sorting","onBackClick","onReviewClick","onContinueLearningClick","score","content","questionsToReview","contentCompleted","showMore","setShowMore","handleShowMore","Description","truncate","ProgressBar","undefined","progressBarColor","inlineProgressValueStyle","progressBarWrapper","progress","backgroundContainer","container","backButtonWrapper","faSize","wrapperSize","ctaContainer","skillFocusBadge","length","showMoreWrapper","ctaWrapper","list","progressInformationsWrapper","progressTitle","skillCoursesAndQuestionsWrapper","skillInformation","skillInformationNumber","progressInformations","progressInformation","progressInformationNumber","toFixed","string","isRequired","shape","number","onChange","options","arrayOf"],"sources":["../../../src/template/skill-detail/index.js"],"sourcesContent":["import React, {useCallback, useState} from 'react';\nimport PropTypes from 'prop-types';\nimport {convert} from 'css-color-function';\nimport classnames from 'classnames';\nimport {get} from 'lodash/fp';\nimport Provider from '../../atom/provider';\nimport Select, {SelectOptionPropTypes} from '../../atom/select';\nimport ButtonLink from '../../atom/button-link';\nimport Icon from '../../atom/icon';\nimport CardsGrid from '../../organism/cards-grid';\nimport style from './style.css';\nimport AllCourses from './all-courses';\nimport ContinueLearning from './continue-learning';\n\nexport const ContinueLearningButton = (props, context) => {\n const {ongoingCoursesAvailable, onClick} = props;\n const {skin, translate} = context;\n const primarySkinColor = get('common.primary', skin);\n\n return (\n <div>\n <ButtonLink\n label={\n ongoingCoursesAvailable ? translate('continue_learning') : translate('start_learning')\n }\n type=\"primary\"\n customStyle={{\n width: 'fit-content',\n borderRadius: '12px',\n backgroundColor: primarySkinColor\n }}\n hoverBackgroundColor={convert(`hsl(from ${primarySkinColor} h s calc(l*(1 - 0.08)))`)}\n hoverColor=\"#FFFFFF\"\n icon={{\n position: 'left',\n faIcon: {\n name: 'play',\n color: '#FFFFFF',\n size: 16\n }\n }}\n onClick={onClick}\n />\n </div>\n );\n};\n\nContinueLearningButton.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nContinueLearningButton.propTypes = {\n ongoingCoursesAvailable: PropTypes.bool,\n onClick: PropTypes.func\n};\n\nconst SkillDetail = (props, context) => {\n const {\n title,\n skillRef,\n description,\n metrics = {},\n focused,\n availableForReview,\n ongoingCourses,\n skillIncludedCourses,\n totalCourses,\n filters,\n sorting,\n onBackClick,\n onReviewClick,\n onContinueLearningClick\n } = props;\n const {score, content, questionsToReview, contentCompleted = 0} = metrics;\n const {translate} = context;\n\n const [showMore, setShowMore] = useState(false);\n\n const handleShowMore = useCallback(() => setShowMore(!showMore), [setShowMore, showMore]);\n\n const Description = useCallback(() => {\n return (\n <div className={classnames(style.description, !showMore && style.truncate)}>\n {description}\n </div>\n );\n }, [showMore, description]);\n\n const ProgressBar = useCallback(() => {\n if (score === undefined) return null;\n const progressBarColor = '#3EC483';\n const inlineProgressValueStyle = {\n backgroundColor: progressBarColor,\n width: `${score}%`\n };\n\n return (\n <div className={style.progressBarWrapper}>\n <div\n data-name=\"progress\"\n className={style.progress}\n style={inlineProgressValueStyle}\n role=\"progressbar\"\n />\n </div>\n );\n }, [score]);\n\n return (\n <div className={style.backgroundContainer}>\n <div className={style.container} data-name={skillRef}>\n <div className={style.backButtonWrapper} onClick={onBackClick}>\n <Icon\n iconName=\"arrow-left\"\n size={{\n faSize: 14,\n wrapperSize: 14\n }}\n />\n </div>\n <div className={style.ctaContainer}>\n <div>\n {focused ? (\n <div className={style.skillFocusBadge}>\n <Icon\n iconName=\"bullseye-arrow\"\n backgroundColor=\"#DDD1FF\"\n size={{\n faSize: 10,\n wrapperSize: 16\n }}\n />\n {translate('skill_focus')}\n </div>\n ) : null}\n <div className={style.title}>{title}</div>\n {description ? (\n <>\n <Description />\n {description.length >= 226 ? (\n <div className={style.showMoreWrapper} onClick={handleShowMore}>\n {showMore ? translate('Show less') : translate('Show more')}\n <Icon\n iconName={showMore ? 'chevron-up' : 'chevron-down'}\n size={{\n faSize: 14,\n wrapperSize: 16\n }}\n />\n </div>\n ) : null}\n </>\n ) : null}\n </div>\n\n <div className={style.ctaWrapper}>\n <ButtonLink\n type=\"secondary\"\n onClick={onReviewClick}\n label={translate('review_this_skill')}\n disabled={!availableForReview}\n customStyle={{\n width: 'fit-content',\n borderRadius: '12px'\n }}\n />\n <ContinueLearningButton\n ongoingCoursesAvailable={!!ongoingCourses.list.length}\n onClick={onContinueLearningClick}\n />\n </div>\n </div>\n {score !== undefined ? (\n <div className={style.progressInformationsWrapper}>\n <div className={style.progressTitle}>{translate('your_progress')}</div>\n <div className={style.skillCoursesAndQuestionsWrapper}>\n {content ? (\n <div className={style.skillInformation} data-name=\"skill-courses\">\n <span className={style.skillInformationNumber}>{content}</span>{' '}\n {translate('courses')}\n </div>\n ) : null}\n {questionsToReview ? (\n <div className={style.skillInformation} data-name=\"skill-questions\">\n <span className={style.skillInformationNumber}>{questionsToReview}</span>\n &nbsp;{translate('questions')}\n </div>\n ) : null}\n </div>\n <ProgressBar />\n <div className={style.progressInformations}>\n {content && (\n <>\n <div className={style.progressInformation} data-name=\"skill-completed-courses\">\n <span className={style.progressInformationNumber}>{contentCompleted}</span>\n {` ${translate('courses_completed')}`}\n </div>\n <div className={style.progressInformation} data-name=\"completed-percentage\">\n <span className={style.progressInformationNumber}>{score.toFixed(1)}%</span>\n </div>\n </>\n )}\n </div>\n </div>\n ) : null}\n <ContinueLearning ongoingCourses={ongoingCourses} />\n <AllCourses\n courses={skillIncludedCourses}\n totalCourses={totalCourses}\n filters={filters}\n sorting={sorting}\n />\n </div>\n </div>\n );\n};\n\nSkillDetail.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nSkillDetail.propTypes = {\n title: PropTypes.string.isRequired,\n skillRef: PropTypes.string.isRequired,\n description: PropTypes.string,\n metrics: PropTypes.shape({\n score: PropTypes.number,\n content: PropTypes.number,\n questionsToReview: PropTypes.number,\n contentCompleted: PropTypes.number\n }),\n focused: PropTypes.bool,\n availableForReview: PropTypes.bool,\n ongoingCourses: PropTypes.shape(CardsGrid.propTypes),\n skillIncludedCourses: PropTypes.shape(CardsGrid.propTypes),\n totalCourses: PropTypes.number,\n filters: PropTypes.shape({\n onChange: PropTypes.func,\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes))\n }),\n sorting: PropTypes.shape(Select.propTypes),\n onBackClick: PropTypes.func,\n onReviewClick: PropTypes.func,\n onContinueLearningClick: PropTypes.func\n};\n\nexport default SkillDetail;\n"],"mappings":";AAAA,OAAOA,KAAP,IAAeC,WAAf,EAA4BC,QAA5B,QAA2C,OAA3C;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SAAQC,OAAR,QAAsB,oBAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,MAAP,IAAgBC,qBAAhB,QAA4C,mBAA5C;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,IAAP,MAAiB,iBAAjB;AACA,OAAOC,SAAP,MAAsB,2BAAtB;AACA,OAAOC,KAAP,MAAkB,aAAlB;AACA,OAAOC,UAAP,MAAuB,eAAvB;AACA,OAAOC,gBAAP,MAA6B,qBAA7B;AAEA,OAAO,MAAMC,sBAAsB,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACxD,MAAM;IAACC,uBAAD;IAA0BC;EAA1B,IAAqCH,KAA3C;EACA,MAAM;IAACI,IAAD;IAAOC;EAAP,IAAoBJ,OAA1B;;EACA,MAAMK,gBAAgB,GAAG,KAAI,gBAAJ,EAAsBF,IAAtB,CAAzB;;EAEA,oBACE,8CACE,oBAAC,UAAD;IACE,KAAK,EACHF,uBAAuB,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W,EAAE7C,SAAS,CAACgC,IApBD;EAqBtBc,aAAa,EAAE9C,SAAS,CAACgC,IArBH;EAsBtBe,uBAAuB,EAAE/C,SAAS,CAACgC;AAtBb,CAAxB;AAyBA,eAAeC,WAAf"}
1
+ {"version":3,"file":"index.js","names":["React","useCallback","useState","PropTypes","convert","classnames","Provider","Select","SelectOptionPropTypes","ButtonLink","ButtonLinkIcon","Icon","CardsGrid","style","AllCourses","ContinueLearning","ContinueLearningButton","props","context","ongoingCoursesAvailable","onClick","skin","translate","primarySkinColor","width","borderRadius","backgroundColor","position","faIcon","name","color","size","contextTypes","childContextTypes","propTypes","bool","func","SkillDetail","title","skillRef","description","metrics","focused","availableForReview","ongoingCourses","skillIncludedCourses","totalCourses","filters","sorting","onBackClick","onReviewClick","onContinueLearningClick","score","content","questionsToReview","contentCompleted","showMore","setShowMore","handleShowMore","Description","truncate","ProgressBar","undefined","progressBarColor","inlineProgressValueStyle","progressBarWrapper","progress","backgroundContainer","container","backButton","ctaContainer","skillFocusBadge","faSize","wrapperSize","length","showMoreWrapper","ctaWrapper","list","progressInformationsWrapper","progressTitle","skillCoursesAndQuestionsWrapper","skillInformation","skillInformationNumber","progressInformations","progressInformation","progressInformationNumber","toFixed","string","isRequired","shape","number","onChange","options","arrayOf"],"sources":["../../../src/template/skill-detail/index.js"],"sourcesContent":["import React, {useCallback, useState} from 'react';\nimport PropTypes from 'prop-types';\nimport {convert} from 'css-color-function';\nimport classnames from 'classnames';\nimport {get} from 'lodash/fp';\nimport Provider from '../../atom/provider';\nimport Select, {SelectOptionPropTypes} from '../../atom/select';\nimport ButtonLink from '../../atom/button-link';\nimport ButtonLinkIcon from '../../atom/button-link-icon';\nimport Icon from '../../atom/icon';\nimport CardsGrid from '../../organism/cards-grid';\nimport style from './style.css';\nimport AllCourses from './all-courses';\nimport ContinueLearning from './continue-learning';\n\nexport const ContinueLearningButton = (props, context) => {\n const {ongoingCoursesAvailable, onClick} = props;\n const {skin, translate} = context;\n const primarySkinColor = get('common.primary', skin);\n\n return (\n <div>\n <ButtonLink\n label={\n ongoingCoursesAvailable ? translate('continue_learning') : translate('start_learning')\n }\n type=\"primary\"\n customStyle={{\n width: 'fit-content',\n borderRadius: '12px',\n backgroundColor: primarySkinColor\n }}\n hoverBackgroundColor={convert(`hsl(from ${primarySkinColor} h s calc(l*(1 - 0.08)))`)}\n hoverColor=\"#FFFFFF\"\n icon={{\n position: 'left',\n faIcon: {\n name: 'play',\n color: '#FFFFFF',\n size: 16\n }\n }}\n onClick={onClick}\n />\n </div>\n );\n};\n\nContinueLearningButton.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nContinueLearningButton.propTypes = {\n ongoingCoursesAvailable: PropTypes.bool,\n onClick: PropTypes.func\n};\n\nconst SkillDetail = (props, context) => {\n const {\n title,\n skillRef,\n description,\n metrics = {},\n focused,\n availableForReview,\n ongoingCourses,\n skillIncludedCourses,\n totalCourses,\n filters,\n sorting,\n onBackClick,\n onReviewClick,\n onContinueLearningClick\n } = props;\n const {score, content, questionsToReview, contentCompleted = 0} = metrics;\n const {translate} = context;\n\n const [showMore, setShowMore] = useState(false);\n\n const handleShowMore = useCallback(() => setShowMore(!showMore), [setShowMore, showMore]);\n\n const Description = useCallback(() => {\n return (\n <div className={classnames(style.description, !showMore && style.truncate)}>\n {description}\n </div>\n );\n }, [showMore, description]);\n\n const ProgressBar = useCallback(() => {\n if (score === undefined) return null;\n const progressBarColor = '#3EC483';\n const inlineProgressValueStyle = {\n backgroundColor: progressBarColor,\n width: `${score}%`\n };\n\n return (\n <div className={style.progressBarWrapper}>\n <div\n data-name=\"progress\"\n className={style.progress}\n style={inlineProgressValueStyle}\n role=\"progressbar\"\n />\n </div>\n );\n }, [score]);\n\n return (\n <div className={style.backgroundContainer}>\n <div className={style.container} data-name={skillRef}>\n <ButtonLinkIcon\n faIcon=\"arrow-left\"\n data-name=\"back-button\"\n aria-label=\"Back\"\n onClick={onBackClick}\n className={style.backButton}\n tooltipPlacement=\"right\"\n />\n <div className={style.ctaContainer}>\n <div>\n {focused ? (\n <div className={style.skillFocusBadge}>\n <Icon\n iconName=\"bullseye-arrow\"\n backgroundColor=\"#DDD1FF\"\n size={{\n faSize: 10,\n wrapperSize: 16\n }}\n />\n {translate('skill_focus')}\n </div>\n ) : null}\n <div className={style.title}>{title}</div>\n {description ? (\n <>\n <Description />\n {description.length >= 226 ? (\n <div className={style.showMoreWrapper} onClick={handleShowMore}>\n {showMore ? translate('Show less') : translate('Show more')}\n <Icon\n iconName={showMore ? 'chevron-up' : 'chevron-down'}\n size={{\n faSize: 14,\n wrapperSize: 16\n }}\n />\n </div>\n ) : null}\n </>\n ) : null}\n </div>\n\n <div className={style.ctaWrapper}>\n <ButtonLink\n type=\"secondary\"\n onClick={onReviewClick}\n label={translate('review_this_skill')}\n disabled={!availableForReview}\n customStyle={{\n width: 'fit-content',\n borderRadius: '12px'\n }}\n />\n <ContinueLearningButton\n ongoingCoursesAvailable={!!ongoingCourses.list.length}\n onClick={onContinueLearningClick}\n />\n </div>\n </div>\n {score !== undefined ? (\n <div className={style.progressInformationsWrapper}>\n <div className={style.progressTitle}>{translate('your_progress')}</div>\n <div className={style.skillCoursesAndQuestionsWrapper}>\n {content ? (\n <div className={style.skillInformation} data-name=\"skill-courses\">\n <span className={style.skillInformationNumber}>{content}</span>{' '}\n {translate('courses')}\n </div>\n ) : null}\n {questionsToReview ? (\n <div className={style.skillInformation} data-name=\"skill-questions\">\n <span className={style.skillInformationNumber}>{questionsToReview}</span>\n &nbsp;{translate('questions')}\n </div>\n ) : null}\n </div>\n <ProgressBar />\n <div className={style.progressInformations}>\n {content && (\n <>\n <div className={style.progressInformation} data-name=\"skill-completed-courses\">\n <span className={style.progressInformationNumber}>{contentCompleted}</span>\n {` ${translate('courses_completed')}`}\n </div>\n <div className={style.progressInformation} data-name=\"completed-percentage\">\n <span className={style.progressInformationNumber}>{score.toFixed(1)}%</span>\n </div>\n </>\n )}\n </div>\n </div>\n ) : null}\n <ContinueLearning ongoingCourses={ongoingCourses} />\n <AllCourses\n courses={skillIncludedCourses}\n totalCourses={totalCourses}\n filters={filters}\n sorting={sorting}\n />\n </div>\n </div>\n );\n};\n\nSkillDetail.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nSkillDetail.propTypes = {\n title: PropTypes.string.isRequired,\n skillRef: PropTypes.string.isRequired,\n description: PropTypes.string,\n metrics: PropTypes.shape({\n score: PropTypes.number,\n content: PropTypes.number,\n questionsToReview: PropTypes.number,\n contentCompleted: PropTypes.number\n }),\n focused: PropTypes.bool,\n availableForReview: PropTypes.bool,\n ongoingCourses: PropTypes.shape(CardsGrid.propTypes),\n skillIncludedCourses: PropTypes.shape(CardsGrid.propTypes),\n totalCourses: PropTypes.number,\n filters: PropTypes.shape({\n onChange: PropTypes.func,\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes))\n }),\n sorting: PropTypes.shape(Select.propTypes),\n onBackClick: PropTypes.func,\n onReviewClick: PropTypes.func,\n onContinueLearningClick: PropTypes.func\n};\n\nexport default SkillDetail;\n"],"mappings":";AAAA,OAAOA,KAAP,IAAeC,WAAf,EAA4BC,QAA5B,QAA2C,OAA3C;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SAAQC,OAAR,QAAsB,oBAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,MAAP,IAAgBC,qBAAhB,QAA4C,mBAA5C;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,cAAP,MAA2B,6BAA3B;AACA,OAAOC,IAAP,MAAiB,iBAAjB;AACA,OAAOC,SAAP,MAAsB,2BAAtB;AACA,OAAOC,KAAP,MAAkB,aAAlB;AACA,OAAOC,UAAP,MAAuB,eAAvB;AACA,OAAOC,gBAAP,MAA6B,qBAA7B;AAEA,OAAO,MAAMC,sBAAsB,GAAG,CAACC,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S,CAACiC,IADG;IAEvBwD,OAAO,EAAEzF,SAAS,CAAC0F,OAAV,CAAkB1F,SAAS,CAACsF,KAAV,CAAgBjF,qBAAhB,CAAlB;EAFc,CAAhB,CAfa;EAmBtBwC,OAAO,EAAE7C,SAAS,CAACsF,KAAV,CAAgBlF,MAAM,CAAC2B,SAAvB,CAnBa;EAoBtBe,WAAW,EAAE9C,SAAS,CAACiC,IApBD;EAqBtBc,aAAa,EAAE/C,SAAS,CAACiC,IArBH;EAsBtBe,uBAAuB,EAAEhD,SAAS,CAACiC;AAtBb,CAAxB;AAyBA,eAAeC,WAAf"}
@@ -35,13 +35,8 @@
35
35
  max-width: calc(1080px + 40px);
36
36
  }
37
37
 
38
- .backButtonWrapper {
38
+ .backButton {
39
39
  margin-bottom: 16px;
40
- background-color: cm_grey_100;
41
- border-radius: 8px;
42
- width: fit-content;
43
- padding: 8px;
44
- cursor: pointer;
45
40
  }
46
41
 
47
42
  .ctaContainer {
@@ -1,11 +1,12 @@
1
- export default ButtonLinkIconOnly;
2
- declare function ButtonLinkIconOnly(props: any): JSX.Element;
3
- declare namespace ButtonLinkIconOnly {
1
+ export default ButtonLinkIcon;
2
+ declare function ButtonLinkIcon(props: any): JSX.Element;
3
+ declare namespace ButtonLinkIcon {
4
4
  const propTypes: {
5
5
  size: PropTypes.Requireable<string>;
6
6
  'aria-label': PropTypes.Requireable<string>;
7
7
  'data-name': PropTypes.Requireable<string>;
8
8
  icon: PropTypes.Requireable<string>;
9
+ faIcon: PropTypes.Requireable<string>;
9
10
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
10
11
  link: PropTypes.Requireable<PropTypes.InferProps<{
11
12
  href: PropTypes.Requireable<string>;
@@ -14,6 +15,7 @@ declare namespace ButtonLinkIconOnly {
14
15
  }>>;
15
16
  disabled: PropTypes.Requireable<boolean>;
16
17
  className: PropTypes.Requireable<string>;
18
+ tooltipPlacement: PropTypes.Requireable<string>;
17
19
  };
18
20
  }
19
21
  import PropTypes from "prop-types";
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button-link-icon/index.js"],"names":[],"mappings":";AAoCA,yDAoHC"}
@@ -15,8 +15,12 @@ var _classnames = _interopRequireDefault(require("classnames"));
15
15
 
16
16
  var _buttonIcons = require("../../util/button-icons");
17
17
 
18
+ var _icon = _interopRequireDefault(require("../icon"));
19
+
18
20
  var _link = _interopRequireDefault(require("../link"));
19
21
 
22
+ var _tooltip = _interopRequireDefault(require("../tooltip"));
23
+
20
24
  var _style = _interopRequireDefault(require("./style.css"));
21
25
 
22
26
  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); }
@@ -27,10 +31,10 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
27
31
 
28
32
  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); }
29
33
 
30
- const getButtonContent = icon => {
34
+ const getButtonContent = (icon, faIcon) => {
31
35
  const Icon = (0, _getOr2.default)(null, icon, _buttonIcons.ICONS);
32
36
 
33
- if (!Icon) {
37
+ if (!Icon && !faIcon) {
34
38
  return /*#__PURE__*/_react.default.createElement("div", {
35
39
  className: _style.default.buttonContent
36
40
  });
@@ -38,7 +42,9 @@ const getButtonContent = icon => {
38
42
 
39
43
  return /*#__PURE__*/_react.default.createElement("div", {
40
44
  className: _style.default.buttonContent
41
- }, /*#__PURE__*/_react.default.createElement(Icon, {
45
+ }, faIcon ? /*#__PURE__*/_react.default.createElement(_icon.default, {
46
+ iconName: faIcon
47
+ }) : /*#__PURE__*/_react.default.createElement(Icon, {
42
48
  className: _style.default.icon
43
49
  }));
44
50
  };
@@ -56,31 +62,52 @@ const getSizeStyle = size => {
56
62
  }
57
63
  };
58
64
 
59
- const ButtonLinkIconOnly = props => {
65
+ const ButtonLinkIcon = props => {
60
66
  const {
61
67
  size = 'default',
62
68
  disabled,
63
69
  icon,
70
+ faIcon,
64
71
  'data-name': dataName,
65
72
  'aria-label': ariaLabel,
66
73
  link,
67
74
  onClick,
68
- className
75
+ className,
76
+ tooltipPlacement = 'left'
69
77
  } = props;
70
- const contentView = getButtonContent(icon);
71
- const styleButton = (0, _classnames.default)(getSizeStyle(size), link && _style.default.link, disabled && _style.default.disabled, _style.default[className]);
78
+ const [toolTipIsVisible, setToolTipIsVisible] = (0, _react.useState)(false);
79
+ const timer = (0, _react.useRef)();
80
+ const contentView = getButtonContent(icon, faIcon);
81
+ const styleButton = (0, _classnames.default)(getSizeStyle(size), link && _style.default.link, disabled && _style.default.disabled, className);
72
82
  const handleOnClick = (0, _react.useMemo)(() => () => onClick(), [onClick]);
73
-
74
- if (link) {
75
- return /*#__PURE__*/_react.default.createElement(_link.default, _extends({}, link, {
76
- className: styleButton,
77
- "data-name": dataName,
78
- "aria-label": ariaLabel,
79
- title: ariaLabel
80
- }), contentView);
81
- }
82
-
83
- return /*#__PURE__*/_react.default.createElement("button", {
83
+ const handleMouseOver = (0, _react.useCallback)(() => {
84
+ timer.current && clearTimeout(timer.current);
85
+ timer.current = setTimeout(() => {
86
+ setToolTipIsVisible(true);
87
+ timer.current = undefined;
88
+ }, 300);
89
+ }, [timer, setToolTipIsVisible]);
90
+ const handleMouseLeave = (0, _react.useCallback)(() => {
91
+ timer.current && clearTimeout(timer.current);
92
+ setToolTipIsVisible(false);
93
+ }, [timer, setToolTipIsVisible]);
94
+ const TooltipContent = (0, _react.useCallback)(() => /*#__PURE__*/_react.default.createElement("span", {
95
+ className: _style.default.tooltipContentWrapper
96
+ }, ariaLabel), [ariaLabel]);
97
+ const Button = (0, _react.useCallback)(() => link ? /*#__PURE__*/_react.default.createElement(_link.default, _extends({}, link, ariaLabel ? {
98
+ 'data-for': 'button-icon',
99
+ 'data-tip': toolTipIsVisible
100
+ } : {}, {
101
+ className: styleButton,
102
+ "data-name": dataName,
103
+ "aria-label": ariaLabel,
104
+ title: ariaLabel,
105
+ onMouseLeave: handleMouseLeave,
106
+ onMouseOver: handleMouseOver
107
+ }), contentView) : /*#__PURE__*/_react.default.createElement("button", _extends({}, ariaLabel ? {
108
+ 'data-for': 'button-icon',
109
+ 'data-tip': toolTipIsVisible
110
+ } : {}, {
84
111
  type: "button",
85
112
  "aria-label": ariaLabel,
86
113
  "data-name": dataName,
@@ -88,15 +115,26 @@ const ButtonLinkIconOnly = props => {
88
115
  title: ariaLabel,
89
116
  className: styleButton,
90
117
  onClick: handleOnClick,
118
+ onMouseLeave: handleMouseLeave,
119
+ onMouseOver: handleMouseOver,
91
120
  disabled: disabled
92
- }, contentView);
121
+ }), contentView), [link, ariaLabel, className, contentView, dataName, disabled, handleMouseLeave, handleMouseOver, handleOnClick, styleButton, toolTipIsVisible]);
122
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(Button, null), ariaLabel ? /*#__PURE__*/_react.default.createElement(_tooltip.default, {
123
+ fontSize: 12,
124
+ anchorId: "button-icon",
125
+ toolTipIsVisible: toolTipIsVisible,
126
+ placement: tooltipPlacement,
127
+ TooltipContent: TooltipContent,
128
+ closeToolTipInformationTextAriaLabel: ariaLabel
129
+ }) : null);
93
130
  };
94
131
 
95
- ButtonLinkIconOnly.propTypes = process.env.NODE_ENV !== "production" ? {
132
+ ButtonLinkIcon.propTypes = process.env.NODE_ENV !== "production" ? {
96
133
  size: _propTypes.default.oneOf(['default', 'small', 'responsive']),
97
134
  'aria-label': _propTypes.default.string,
98
135
  'data-name': _propTypes.default.string,
99
136
  icon: _propTypes.default.oneOf((0, _keys2.default)(_buttonIcons.ICONS)),
137
+ faIcon: _propTypes.default.string,
100
138
  onClick: _propTypes.default.func,
101
139
  link: _propTypes.default.shape({
102
140
  href: _propTypes.default.string,
@@ -104,8 +142,9 @@ ButtonLinkIconOnly.propTypes = process.env.NODE_ENV !== "production" ? {
104
142
  target: _propTypes.default.oneOf(['_self', '_blank', '_parent', '_top'])
105
143
  }),
106
144
  disabled: _propTypes.default.bool,
107
- className: _propTypes.default.string
145
+ className: _propTypes.default.string,
146
+ tooltipPlacement: _propTypes.default.oneOf(['left', 'right', 'top', 'bottom'])
108
147
  } : {};
109
- var _default = ButtonLinkIconOnly;
148
+ var _default = ButtonLinkIcon;
110
149
  exports.default = _default;
111
150
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["getButtonContent","icon","faIcon","Icon","ICONS","style","buttonContent","getSizeStyle","size","small","responsive","default","ButtonLinkIcon","props","disabled","dataName","ariaLabel","link","onClick","className","tooltipPlacement","toolTipIsVisible","setToolTipIsVisible","useState","timer","useRef","contentView","styleButton","classnames","handleOnClick","useMemo","handleMouseOver","useCallback","current","clearTimeout","setTimeout","undefined","handleMouseLeave","TooltipContent","tooltipContentWrapper","Button","propTypes","PropTypes","oneOf","string","func","shape","href","download","bool","target"],"sources":["../../../src/atom/button-link-icon/index.js"],"sourcesContent":["import React, {useMemo, useState, useCallback, useRef} from 'react';\nimport PropTypes from 'prop-types';\nimport {getOr, keys} from 'lodash/fp';\nimport classnames from 'classnames';\nimport {ICONS} from '../../util/button-icons';\nimport FaIcon from '../icon';\nimport Link from '../link';\nimport ToolTip from '../tooltip';\n// eslint-disable-next-line css-modules/no-unused-class\nimport style from './style.css';\n\nconst getButtonContent = (icon, faIcon) => {\n const Icon = getOr(null, icon, ICONS);\n\n if (!Icon && !faIcon) {\n return <div className={style.buttonContent} />;\n }\n\n return (\n <div className={style.buttonContent}>\n {faIcon ? <FaIcon iconName={faIcon} /> : <Icon className={style.icon} />}\n </div>\n );\n};\n\nconst getSizeStyle = size => {\n switch (size) {\n case 'small':\n return style.small;\n case 'responsive':\n return style.responsive;\n default:\n return style.default;\n }\n};\n\nconst ButtonLinkIcon = props => {\n const {\n size = 'default',\n disabled,\n icon,\n faIcon,\n 'data-name': dataName,\n 'aria-label': ariaLabel,\n link,\n onClick,\n className,\n tooltipPlacement = 'left'\n } = props;\n const [toolTipIsVisible, setToolTipIsVisible] = useState(false);\n const timer = useRef();\n\n const contentView = getButtonContent(icon, faIcon);\n const styleButton = classnames(\n getSizeStyle(size),\n link && style.link,\n disabled && style.disabled,\n className\n );\n\n const handleOnClick = useMemo(() => () => onClick(), [onClick]);\n\n const handleMouseOver = useCallback(() => {\n timer.current && clearTimeout(timer.current);\n timer.current = setTimeout(() => {\n setToolTipIsVisible(true);\n timer.current = undefined;\n }, 300);\n }, [timer, setToolTipIsVisible]);\n\n const handleMouseLeave = useCallback(() => {\n timer.current && clearTimeout(timer.current);\n setToolTipIsVisible(false);\n }, [timer, setToolTipIsVisible]);\n\n const TooltipContent = useCallback(\n () => <span className={style.tooltipContentWrapper}>{ariaLabel}</span>,\n [ariaLabel]\n );\n\n const Button = useCallback(\n () =>\n link ? (\n <Link\n {...link}\n {...(ariaLabel\n ? {\n 'data-for': 'button-icon',\n 'data-tip': toolTipIsVisible\n }\n : {})}\n className={styleButton}\n data-name={dataName}\n aria-label={ariaLabel}\n title={ariaLabel}\n onMouseLeave={handleMouseLeave}\n onMouseOver={handleMouseOver}\n >\n {contentView}\n </Link>\n ) : (\n <button\n {...(ariaLabel\n ? {\n 'data-for': 'button-icon',\n 'data-tip': toolTipIsVisible\n }\n : {})}\n type=\"button\"\n aria-label={ariaLabel}\n data-name={dataName}\n data-testid={`button-${dataName}-${className}`}\n title={ariaLabel}\n className={styleButton}\n onClick={handleOnClick}\n onMouseLeave={handleMouseLeave}\n onMouseOver={handleMouseOver}\n disabled={disabled}\n >\n {contentView}\n </button>\n ),\n [\n link,\n ariaLabel,\n className,\n contentView,\n dataName,\n disabled,\n handleMouseLeave,\n handleMouseOver,\n handleOnClick,\n styleButton,\n toolTipIsVisible\n ]\n );\n\n return (\n <>\n <Button />\n {ariaLabel ? (\n <ToolTip\n fontSize={12}\n anchorId=\"button-icon\"\n toolTipIsVisible={toolTipIsVisible}\n placement={tooltipPlacement}\n TooltipContent={TooltipContent}\n closeToolTipInformationTextAriaLabel={ariaLabel}\n />\n ) : null}\n </>\n );\n};\n\nButtonLinkIcon.propTypes = {\n size: PropTypes.oneOf(['default', 'small', 'responsive']),\n 'aria-label': PropTypes.string,\n 'data-name': PropTypes.string,\n icon: PropTypes.oneOf(keys(ICONS)),\n faIcon: PropTypes.string,\n onClick: PropTypes.func,\n link: PropTypes.shape({\n href: PropTypes.string,\n download: PropTypes.bool,\n target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top'])\n }),\n disabled: PropTypes.bool,\n className: PropTypes.string,\n tooltipPlacement: PropTypes.oneOf(['left', 'right', 'top', 'bottom'])\n};\n\nexport default ButtonLinkIcon;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AAEA;;;;;;;;;;AAEA,MAAMA,gBAAgB,GAAG,CAACC,IAAD,EAAOC,MAAP,KAAkB;EACzC,MAAMC,IAAI,GAAG,qBAAM,IAAN,EAAYF,IAAZ,EAAkBG,kBAAlB,CAAb;;EAEA,IAAI,CAACD,IAAD,IAAS,CAACD,MAAd,EAAsB;IACpB,oBAAO;MAAK,SAAS,EAAEG,cAAA,CAAMC;IAAtB,EAAP;EACD;;EAED,oBACE;IAAK,SAAS,EAAED,cAAA,CAAMC;EAAtB,GACGJ,MAAM,gBAAG,6BAAC,aAAD;IAAQ,QAAQ,EAAEA;EAAlB,EAAH,gBAAkC,6BAAC,IAAD;IAAM,SAAS,EAAEG,cAAA,CAAMJ;EAAvB,EAD3C,CADF;AAKD,CAZD;;AAcA,MAAMM,YAAY,GAAGC,IAAI,IAAI;EAC3B,QAAQA,IAAR;IACE,KAAK,OAAL;MACE,OAAOH,cAAA,CAAMI,KAAb;;IACF,KAAK,YAAL;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X;IAGE,gBAAgB,EAAEK,gBAHpB;IAIE,SAAS,EAAED,gBAJb;IAKE,cAAc,EAAEkB,cALlB;IAME,oCAAoC,EAAEtB;EANxC,EADQ,GASN,IAXN,CADF;AAeD,CApHD;;AAsHAJ,cAAc,CAAC6B,SAAf,2CAA2B;EACzBjC,IAAI,EAAEkC,kBAAA,CAAUC,KAAV,CAAgB,CAAC,SAAD,EAAY,OAAZ,EAAqB,YAArB,CAAhB,CADmB;EAEzB,cAAcD,kBAAA,CAAUE,MAFC;EAGzB,aAAaF,kBAAA,CAAUE,MAHE;EAIzB3C,IAAI,EAAEyC,kBAAA,CAAUC,KAAV,CAAgB,oBAAKvC,kBAAL,CAAhB,CAJmB;EAKzBF,MAAM,EAAEwC,kBAAA,CAAUE,MALO;EAMzB1B,OAAO,EAAEwB,kBAAA,CAAUG,IANM;EAOzB5B,IAAI,EAAEyB,kBAAA,CAAUI,KAAV,CAAgB;IACpBC,IAAI,EAAEL,kBAAA,CAAUE,MADI;IAEpBI,QAAQ,EAAEN,kBAAA,CAAUO,IAFA;IAGpBC,MAAM,EAAER,kBAAA,CAAUC,KAAV,CAAgB,CAAC,OAAD,EAAU,QAAV,EAAoB,SAApB,EAA+B,MAA/B,CAAhB;EAHY,CAAhB,CAPmB;EAYzB7B,QAAQ,EAAE4B,kBAAA,CAAUO,IAZK;EAazB9B,SAAS,EAAEuB,kBAAA,CAAUE,MAbI;EAczBxB,gBAAgB,EAAEsB,kBAAA,CAAUC,KAAV,CAAgB,CAAC,MAAD,EAAS,OAAT,EAAkB,KAAlB,EAAyB,QAAzB,CAAhB;AAdO,CAA3B;eAiBe/B,c"}
@@ -68,6 +68,15 @@
68
68
  border-radius: 5px;
69
69
  }
70
70
 
71
+ .tooltipContentWrapper {
72
+ text-align: left;
73
+ width: max-content;
74
+ font-family: Gilroy;
75
+ font-size: 12px;
76
+ font-weight: 500;
77
+ line-height: 16px;
78
+ }
79
+
71
80
  @media tablet {
72
81
  .responsive {
73
82
  composes: button;
@@ -1,6 +1,6 @@
1
1
  export function toggleStateOnKeyPress(state: any, setState: any, ref: any): (event: any) => void;
2
2
  export default ToolTip;
3
- declare function ToolTip({ anchorId, TooltipContent, "aria-label": ariaLabel, "data-testid": dataTestId, closeToolTipInformationTextAriaLabel, toolTipIsVisible: _toolTipIsVisible, iconContainerClassName, delayHide, fontSize, iconSize, AnchorElement, tooltipClassName }: {
3
+ declare function ToolTip({ anchorId, TooltipContent, "aria-label": ariaLabel, "data-testid": dataTestId, closeToolTipInformationTextAriaLabel, toolTipIsVisible: _toolTipIsVisible, iconContainerClassName, delayHide, fontSize, iconSize, AnchorElement, tooltipClassName, placement }: {
4
4
  anchorId: any;
5
5
  TooltipContent: any;
6
6
  "aria-label": any;
@@ -13,6 +13,7 @@ declare function ToolTip({ anchorId, TooltipContent, "aria-label": ariaLabel, "d
13
13
  iconSize?: string | undefined;
14
14
  AnchorElement: any;
15
15
  tooltipClassName: any;
16
+ placement?: string | undefined;
16
17
  }): JSX.Element;
17
18
  declare namespace ToolTip {
18
19
  const propTypes: {
@@ -28,6 +29,7 @@ declare namespace ToolTip {
28
29
  iconSize: PropTypes.Requireable<string>;
29
30
  anchorId: PropTypes.Requireable<string>;
30
31
  toolTipIsVisible: PropTypes.Requireable<boolean>;
32
+ placement: PropTypes.Requireable<string>;
31
33
  };
32
34
  }
33
35
  import PropTypes from "prop-types";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/tooltip/index.js"],"names":[],"mappings":"AA4EO,iGAUN;;AAED;;;;;;;;;;;;;gBAwGC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/tooltip/index.js"],"names":[],"mappings":"AA6EO,iGAUN;;AAED;;;;;;;;;;;;;;gBA0GC"}
@@ -46,7 +46,8 @@ const ToolTipWrapper = ({
46
46
  handleContentMouseOver,
47
47
  iconSize,
48
48
  tooltipClassName,
49
- usesAnchorElement
49
+ usesAnchorElement,
50
+ placement
50
51
  }) => {
51
52
  const coorpToolTipClasses = (0, _classnames.default)(_style.default.toolTip, tooltipClassName, // eslint-disable-next-line no-nested-ternary
52
53
  usesAnchorElement ? null : iconSize === 'big' ? _style.default.bigIconToolTip : _style.default.smallIconToolTip);
@@ -57,7 +58,7 @@ const ToolTipWrapper = ({
57
58
  id: anchorId,
58
59
  className: _style.default.toolTipReact,
59
60
  "data-event-off": "click",
60
- place: "left",
61
+ place: placement,
61
62
  effect: "solid",
62
63
  "aria-label": closeToolTipInformationTextAriaLabel
63
64
  }, content);
@@ -107,7 +108,8 @@ const ToolTip = ({
107
108
  fontSize = 14,
108
109
  iconSize = 'small',
109
110
  AnchorElement,
110
- tooltipClassName
111
+ tooltipClassName,
112
+ placement = 'left'
111
113
  }) => {
112
114
  const isComponent = (0, _react.useMemo)(() => !(0, _isString.default)(TooltipContent) && /*#__PURE__*/(0, _react.isValidElement)(TooltipContent()), [TooltipContent]);
113
115
  const [toolTipIsVisible, setToolTipIsVisible] = (0, _react.useState)(false);
@@ -153,7 +155,8 @@ const ToolTip = ({
153
155
  content: content,
154
156
  onMouseLeave: handleMouseLeave,
155
157
  onMouseOver: handleMouseOver,
156
- fontSize: fontSize
158
+ fontSize: fontSize,
159
+ placement: placement
157
160
  }) : /*#__PURE__*/_react.default.createElement("div", {
158
161
  className: _style.default.tooltipContainer,
159
162
  onMouseLeave: handleMouseLeave,
@@ -190,7 +193,8 @@ ToolTip.propTypes = process.env.NODE_ENV !== "production" ? {
190
193
  // parents overflow hidden controls
191
194
  // data-for={anchorId} && data-tooltip-place="left" are needed on the anchored component
192
195
  anchorId: _propTypes.default.string,
193
- toolTipIsVisible: _propTypes.default.bool
196
+ toolTipIsVisible: _propTypes.default.bool,
197
+ placement: _propTypes.default.oneOf(['left', 'right', 'top', 'bottom'])
194
198
  } : {};
195
199
  var _default = ToolTip;
196
200
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["FontSizes","style","tooltipContentFontSize12","tooltipContentFontSize14","IconSizes","small","big","ToolTipWrapper","toolTipIsVisible","anchorId","closeToolTipInformationTextAriaLabel","content","handleContentMouseOver","iconSize","tooltipClassName","usesAnchorElement","coorpToolTipClasses","classnames","toolTip","bigIconToolTip","smallIconToolTip","toolTipReact","propTypes","PropTypes","bool","string","isRequired","node","func","oneOf","keys","toggleStateOnKeyPress","state","setState","ref","event","has","key","current","focus","stopPropagation","preventDefault","ToolTip","TooltipContent","ariaLabel","dataTestId","_toolTipIsVisible","iconContainerClassName","delayHide","fontSize","AnchorElement","isComponent","useMemo","isString","isValidElement","setToolTipIsVisible","useState","mouseLeaveTimer","setMouseLeaveTimer","undefined","handleKeyPress","useCallback","clearTimeout","handleMouseOver","handleMouseLeave","setTimeout","tooltipContent","anchorElement","tooltipIconContainer","informationIcon","tooltipContainer","isNil","oneOfType","number"],"sources":["../../../src/atom/tooltip/index.js"],"sourcesContent":["import React, {isValidElement, useState, useCallback, useMemo} from 'react';\nimport classnames from 'classnames';\nimport PropTypes from 'prop-types';\nimport ReactTooltip from 'react-tooltip';\nimport isString from 'lodash/fp/isString';\nimport has from 'lodash/fp/has';\nimport isNil from 'lodash/fp/isNil';\nimport keys from 'lodash/fp/keys';\nimport {NovaCompositionCoorpacademyInformationIcon as InformationIcon} from '@coorpacademy/nova-icons';\nimport style from './style.css';\n\nconst FontSizes = {\n 12: style.tooltipContentFontSize12,\n 14: style.tooltipContentFontSize14\n};\n\nconst IconSizes = {\n small: 12,\n big: 20\n};\n\nconst ToolTipWrapper = ({\n toolTipIsVisible,\n anchorId,\n closeToolTipInformationTextAriaLabel,\n content,\n handleContentMouseOver,\n iconSize,\n tooltipClassName,\n usesAnchorElement\n}) => {\n const coorpToolTipClasses = classnames(\n style.toolTip,\n tooltipClassName,\n // eslint-disable-next-line no-nested-ternary\n usesAnchorElement ? null : iconSize === 'big' ? style.bigIconToolTip : style.smallIconToolTip\n );\n if (!toolTipIsVisible) return null;\n if (anchorId) {\n return (\n <ReactTooltip\n id={anchorId}\n className={style.toolTipReact}\n data-event-off=\"click\"\n place=\"left\"\n effect=\"solid\"\n aria-label={closeToolTipInformationTextAriaLabel}\n >\n {content}\n </ReactTooltip>\n );\n } else {\n return (\n <div\n className={coorpToolTipClasses}\n data-testid=\"tooltip\"\n aria-label={closeToolTipInformationTextAriaLabel}\n onMouseOver={handleContentMouseOver}\n >\n {content}\n </div>\n );\n }\n};\n\nToolTipWrapper.propTypes = {\n toolTipIsVisible: PropTypes.bool,\n anchorId: PropTypes.string,\n closeToolTipInformationTextAriaLabel: PropTypes.string.isRequired,\n content: PropTypes.node,\n handleContentMouseOver: PropTypes.func,\n iconSize: PropTypes.oneOf(keys(IconSizes)),\n tooltipClassName: PropTypes.string,\n usesAnchorElement: PropTypes.bool\n};\n\nexport const toggleStateOnKeyPress = (state, setState, ref) => event => {\n if (!has('key', event)) return;\n else if (event.key === 'Enter') {\n if (ref) ref.current.focus();\n event.stopPropagation();\n event.preventDefault();\n setState(!state);\n } else if (event.key === 'Tab' || event.key === 'Escape') {\n setState(false);\n }\n};\n\nconst ToolTip = ({\n anchorId,\n TooltipContent,\n 'aria-label': ariaLabel,\n 'data-testid': dataTestId,\n closeToolTipInformationTextAriaLabel,\n toolTipIsVisible: _toolTipIsVisible,\n iconContainerClassName,\n delayHide = 250,\n fontSize = 14,\n iconSize = 'small',\n AnchorElement,\n tooltipClassName\n}) => {\n const isComponent = useMemo(\n () => !isString(TooltipContent) && isValidElement(TooltipContent()),\n [TooltipContent]\n );\n\n const [toolTipIsVisible, setToolTipIsVisible] = useState(false);\n\n const [mouseLeaveTimer, setMouseLeaveTimer] = useState(undefined);\n\n const handleKeyPress = useCallback(\n event => {\n toggleStateOnKeyPress(toolTipIsVisible, setToolTipIsVisible)(event);\n },\n [toolTipIsVisible]\n );\n\n const handleContentMouseOver = useCallback(() => {\n mouseLeaveTimer && /* istanbul ignore next */ clearTimeout(mouseLeaveTimer);\n }, [mouseLeaveTimer]);\n\n const handleMouseOver = useCallback(() => {\n mouseLeaveTimer && clearTimeout(mouseLeaveTimer);\n setToolTipIsVisible(true);\n }, [mouseLeaveTimer]);\n\n const handleMouseLeave = useCallback(() => {\n setMouseLeaveTimer(setTimeout(() => setToolTipIsVisible(false), delayHide));\n }, [delayHide]);\n\n const content = useMemo(() => {\n return isComponent ? (\n <TooltipContent />\n ) : (\n <p className={classnames([style.tooltipContent, FontSizes[fontSize]])}>{TooltipContent}</p>\n );\n }, [TooltipContent, fontSize, isComponent]);\n\n const anchorElement = useMemo(\n () =>\n AnchorElement ? (\n <AnchorElement onKeyDown={handleKeyPress} />\n ) : (\n <button\n type=\"button\"\n className={classnames([style.tooltipIconContainer, iconContainerClassName])}\n data-testid={dataTestId}\n onKeyDown={handleKeyPress}\n tabIndex={0}\n >\n <InformationIcon\n className={style.informationIcon}\n width={IconSizes[iconSize]}\n height={IconSizes[iconSize]}\n aria-label={ariaLabel}\n />\n </button>\n ),\n [AnchorElement, ariaLabel, dataTestId, handleKeyPress, iconContainerClassName, iconSize]\n );\n\n return anchorId ? (\n <ToolTipWrapper\n toolTipIsVisible={_toolTipIsVisible}\n anchorId={anchorId}\n closeToolTipInformationTextAriaLabel={closeToolTipInformationTextAriaLabel}\n content={content}\n onMouseLeave={handleMouseLeave}\n onMouseOver={handleMouseOver}\n fontSize={fontSize}\n />\n ) : (\n <div\n className={style.tooltipContainer}\n onMouseLeave={handleMouseLeave}\n onMouseOver={handleMouseOver}\n >\n {anchorElement}\n <ToolTipWrapper\n toolTipIsVisible={toolTipIsVisible}\n anchorId={anchorId}\n closeToolTipInformationTextAriaLabel={closeToolTipInformationTextAriaLabel}\n content={content}\n handleContentMouseOver={handleContentMouseOver}\n fontSize={fontSize}\n iconSize={iconSize}\n tooltipClassName={tooltipClassName}\n usesAnchorElement={!isNil(AnchorElement)}\n />\n </div>\n );\n};\n\nToolTip.propTypes = {\n TooltipContent: PropTypes.oneOfType([PropTypes.func, PropTypes.node, PropTypes.string]),\n 'data-testid': PropTypes.string,\n 'aria-label': PropTypes.string,\n closeToolTipInformationTextAriaLabel: PropTypes.string.isRequired,\n // ---------- Regular Tooltip exclusive --------------\n // If using an Anchor element w/ the regular Tooltip\n AnchorElement: PropTypes.func,\n tooltipClassName: PropTypes.string,\n //\n iconContainerClassName: PropTypes.string,\n delayHide: PropTypes.number,\n fontSize: PropTypes.oneOf([12, 14]),\n iconSize: PropTypes.oneOf(keys(IconSizes)),\n // ---------- React Tooltip exclusive --------------\n // externalHandling: if passed down, React Tooltip is used instead, due to limitations on\n // parents overflow hidden controls\n // data-for={anchorId} && data-tooltip-place=\"left\" are needed on the anchored component\n anchorId: PropTypes.string,\n toolTipIsVisible: PropTypes.bool\n};\n\nexport default ToolTip;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA,MAAMA,SAAS,GAAG;EAChB,IAAIC,cAAA,CAAMC,wBADM;EAEhB,IAAID,cAAA,CAAME;AAFM,CAAlB;AAKA,MAAMC,SAAS,GAAG;EAChBC,KAAK,EAAE,EADS;EAEhBC,GAAG,EAAE;AAFW,CAAlB;;AAKA,MAAMC,cAAc,GAAG,CAAC;EACtBC,gBADsB;EAEtBC,QAFsB;EAGtBC,oCAHsB;EAItBC,OAJsB;EAKtBC,sBALsB;EAMtBC,QANsB;EAOtBC,gBAPsB;EAQtBC;AARsB,CAAD,KASjB;EACJ,MAAMC,mBAAmB,GAAG,IAAAC,mBAAA,EAC1BhB,cAAA,CAAMiB,OADoB,EAE1BJ,gBAF0B,EAG1B;EACAC,iBAAiB,GAAG,IAAH,GAAUF,QAAQ,KAAK,KAAb,GAAqBZ,cAAA,CAAMkB,cAA3B,GAA4ClB,cAAA,CAAMmB,gBAJnD,CAA5B;EAMA,IAAI,CAACZ,gBAAL,EAAuB,OAAO,IAAP;;EACvB,IAAIC,QAAJ,EAAc;IACZ,oBACE,6BAAC,qBAAD;MACE,EAAE,EAAEA,QADN;MAEE,SAAS,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BF;EAmBlBjB,gBAAgB,EAAEe,kBAAA,CAAUC;AAnBV,CAApB;eAsBekB,O"}
1
+ {"version":3,"file":"index.js","names":["FontSizes","style","tooltipContentFontSize12","tooltipContentFontSize14","IconSizes","small","big","ToolTipWrapper","toolTipIsVisible","anchorId","closeToolTipInformationTextAriaLabel","content","handleContentMouseOver","iconSize","tooltipClassName","usesAnchorElement","placement","coorpToolTipClasses","classnames","toolTip","bigIconToolTip","smallIconToolTip","toolTipReact","propTypes","PropTypes","bool","string","isRequired","node","func","oneOf","keys","toggleStateOnKeyPress","state","setState","ref","event","has","key","current","focus","stopPropagation","preventDefault","ToolTip","TooltipContent","ariaLabel","dataTestId","_toolTipIsVisible","iconContainerClassName","delayHide","fontSize","AnchorElement","isComponent","useMemo","isString","isValidElement","setToolTipIsVisible","useState","mouseLeaveTimer","setMouseLeaveTimer","undefined","handleKeyPress","useCallback","clearTimeout","handleMouseOver","handleMouseLeave","setTimeout","tooltipContent","anchorElement","tooltipIconContainer","informationIcon","tooltipContainer","isNil","oneOfType","number"],"sources":["../../../src/atom/tooltip/index.js"],"sourcesContent":["import React, {isValidElement, useState, useCallback, useMemo} from 'react';\nimport classnames from 'classnames';\nimport PropTypes from 'prop-types';\nimport ReactTooltip from 'react-tooltip';\nimport isString from 'lodash/fp/isString';\nimport has from 'lodash/fp/has';\nimport isNil from 'lodash/fp/isNil';\nimport keys from 'lodash/fp/keys';\nimport {NovaCompositionCoorpacademyInformationIcon as InformationIcon} from '@coorpacademy/nova-icons';\nimport style from './style.css';\n\nconst FontSizes = {\n 12: style.tooltipContentFontSize12,\n 14: style.tooltipContentFontSize14\n};\n\nconst IconSizes = {\n small: 12,\n big: 20\n};\n\nconst ToolTipWrapper = ({\n toolTipIsVisible,\n anchorId,\n closeToolTipInformationTextAriaLabel,\n content,\n handleContentMouseOver,\n iconSize,\n tooltipClassName,\n usesAnchorElement,\n placement\n}) => {\n const coorpToolTipClasses = classnames(\n style.toolTip,\n tooltipClassName,\n // eslint-disable-next-line no-nested-ternary\n usesAnchorElement ? null : iconSize === 'big' ? style.bigIconToolTip : style.smallIconToolTip\n );\n if (!toolTipIsVisible) return null;\n if (anchorId) {\n return (\n <ReactTooltip\n id={anchorId}\n className={style.toolTipReact}\n data-event-off=\"click\"\n place={placement}\n effect=\"solid\"\n aria-label={closeToolTipInformationTextAriaLabel}\n >\n {content}\n </ReactTooltip>\n );\n } else {\n return (\n <div\n className={coorpToolTipClasses}\n data-testid=\"tooltip\"\n aria-label={closeToolTipInformationTextAriaLabel}\n onMouseOver={handleContentMouseOver}\n >\n {content}\n </div>\n );\n }\n};\n\nToolTipWrapper.propTypes = {\n toolTipIsVisible: PropTypes.bool,\n anchorId: PropTypes.string,\n closeToolTipInformationTextAriaLabel: PropTypes.string.isRequired,\n content: PropTypes.node,\n handleContentMouseOver: PropTypes.func,\n iconSize: PropTypes.oneOf(keys(IconSizes)),\n tooltipClassName: PropTypes.string,\n usesAnchorElement: PropTypes.bool\n};\n\nexport const toggleStateOnKeyPress = (state, setState, ref) => event => {\n if (!has('key', event)) return;\n else if (event.key === 'Enter') {\n if (ref) ref.current.focus();\n event.stopPropagation();\n event.preventDefault();\n setState(!state);\n } else if (event.key === 'Tab' || event.key === 'Escape') {\n setState(false);\n }\n};\n\nconst ToolTip = ({\n anchorId,\n TooltipContent,\n 'aria-label': ariaLabel,\n 'data-testid': dataTestId,\n closeToolTipInformationTextAriaLabel,\n toolTipIsVisible: _toolTipIsVisible,\n iconContainerClassName,\n delayHide = 250,\n fontSize = 14,\n iconSize = 'small',\n AnchorElement,\n tooltipClassName,\n placement = 'left'\n}) => {\n const isComponent = useMemo(\n () => !isString(TooltipContent) && isValidElement(TooltipContent()),\n [TooltipContent]\n );\n\n const [toolTipIsVisible, setToolTipIsVisible] = useState(false);\n\n const [mouseLeaveTimer, setMouseLeaveTimer] = useState(undefined);\n\n const handleKeyPress = useCallback(\n event => {\n toggleStateOnKeyPress(toolTipIsVisible, setToolTipIsVisible)(event);\n },\n [toolTipIsVisible]\n );\n\n const handleContentMouseOver = useCallback(() => {\n mouseLeaveTimer && /* istanbul ignore next */ clearTimeout(mouseLeaveTimer);\n }, [mouseLeaveTimer]);\n\n const handleMouseOver = useCallback(() => {\n mouseLeaveTimer && clearTimeout(mouseLeaveTimer);\n setToolTipIsVisible(true);\n }, [mouseLeaveTimer]);\n\n const handleMouseLeave = useCallback(() => {\n setMouseLeaveTimer(setTimeout(() => setToolTipIsVisible(false), delayHide));\n }, [delayHide]);\n\n const content = useMemo(() => {\n return isComponent ? (\n <TooltipContent />\n ) : (\n <p className={classnames([style.tooltipContent, FontSizes[fontSize]])}>{TooltipContent}</p>\n );\n }, [TooltipContent, fontSize, isComponent]);\n\n const anchorElement = useMemo(\n () =>\n AnchorElement ? (\n <AnchorElement onKeyDown={handleKeyPress} />\n ) : (\n <button\n type=\"button\"\n className={classnames([style.tooltipIconContainer, iconContainerClassName])}\n data-testid={dataTestId}\n onKeyDown={handleKeyPress}\n tabIndex={0}\n >\n <InformationIcon\n className={style.informationIcon}\n width={IconSizes[iconSize]}\n height={IconSizes[iconSize]}\n aria-label={ariaLabel}\n />\n </button>\n ),\n [AnchorElement, ariaLabel, dataTestId, handleKeyPress, iconContainerClassName, iconSize]\n );\n\n return anchorId ? (\n <ToolTipWrapper\n toolTipIsVisible={_toolTipIsVisible}\n anchorId={anchorId}\n closeToolTipInformationTextAriaLabel={closeToolTipInformationTextAriaLabel}\n content={content}\n onMouseLeave={handleMouseLeave}\n onMouseOver={handleMouseOver}\n fontSize={fontSize}\n placement={placement}\n />\n ) : (\n <div\n className={style.tooltipContainer}\n onMouseLeave={handleMouseLeave}\n onMouseOver={handleMouseOver}\n >\n {anchorElement}\n <ToolTipWrapper\n toolTipIsVisible={toolTipIsVisible}\n anchorId={anchorId}\n closeToolTipInformationTextAriaLabel={closeToolTipInformationTextAriaLabel}\n content={content}\n handleContentMouseOver={handleContentMouseOver}\n fontSize={fontSize}\n iconSize={iconSize}\n tooltipClassName={tooltipClassName}\n usesAnchorElement={!isNil(AnchorElement)}\n />\n </div>\n );\n};\n\nToolTip.propTypes = {\n TooltipContent: PropTypes.oneOfType([PropTypes.func, PropTypes.node, PropTypes.string]),\n 'data-testid': PropTypes.string,\n 'aria-label': PropTypes.string,\n closeToolTipInformationTextAriaLabel: PropTypes.string.isRequired,\n // ---------- Regular Tooltip exclusive --------------\n // If using an Anchor element w/ the regular Tooltip\n AnchorElement: PropTypes.func,\n tooltipClassName: PropTypes.string,\n //\n iconContainerClassName: PropTypes.string,\n delayHide: PropTypes.number,\n fontSize: PropTypes.oneOf([12, 14]),\n iconSize: PropTypes.oneOf(keys(IconSizes)),\n // ---------- React Tooltip exclusive --------------\n // externalHandling: if passed down, React Tooltip is used instead, due to limitations on\n // parents overflow hidden controls\n // data-for={anchorId} && data-tooltip-place=\"left\" are needed on the anchored component\n anchorId: PropTypes.string,\n toolTipIsVisible: PropTypes.bool,\n placement: PropTypes.oneOf(['left', 'right', 'top', 'bottom'])\n};\n\nexport default ToolTip;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA,MAAMA,SAAS,GAAG;EAChB,IAAIC,cAAA,CAAMC,wBADM;EAEhB,IAAID,cAAA,CAAME;AAFM,CAAlB;AAKA,MAAMC,SAAS,GAAG;EAChBC,KAAK,EAAE,EADS;EAEhBC,GAAG,EAAE;AAFW,CAAlB;;AAKA,MAAMC,cAAc,GAAG,CAAC;EACtBC,gBADsB;EAEtBC,QAFsB;EAGtBC,oCAHsB;EAItBC,OAJsB;EAKtBC,sBALsB;EAMtBC,QANsB;EAOtBC,gBAPsB;EAQtBC,iBARsB;EAStBC;AATsB,CAAD,KAUjB;EACJ,MAAMC,mBAAmB,GAAG,IAAAC,mBAAA,EAC1BjB,cAAA,CAAMkB,OADoB,EAE1BL,gBAF0B,EAG1B;EACAC,iBAAiB,GAAG,IAAH,GAAUF,QAAQ,KAAK,KAAb,GA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,CAAUkD,MAXH;EAYlBxB,QAAQ,EAAE1B,kBAAA,CAAUM,KAAV,CAAgB,CAAC,EAAD,EAAK,EAAL,CAAhB,CAZQ;EAalBjB,QAAQ,EAAEW,kBAAA,CAAUM,KAAV,CAAgB,IAAAC,aAAA,EAAK3B,SAAL,CAAhB,CAbQ;EAclB;EACA;EACA;EACA;EACAK,QAAQ,EAAEe,kBAAA,CAAUE,MAlBF;EAmBlBlB,gBAAgB,EAAEgB,kBAAA,CAAUC,IAnBV;EAoBlBT,SAAS,EAAEQ,kBAAA,CAAUM,KAAV,CAAgB,CAAC,MAAD,EAAS,OAAT,EAAkB,KAAlB,EAAyB,QAAzB,CAAhB;AApBO,CAApB;eAuBea,O"}
@@ -97,13 +97,13 @@
97
97
  opacity: 1 !important;
98
98
  left: 5px;
99
99
  max-width: 400px;
100
+ padding: 8px 12px !important;
100
101
  }
101
102
 
102
103
  /* for keyboard navigation, the position can't be obtained from the mouse */
103
104
  [class*="__react_component_tooltip"]:not(.toolTipReact) {
104
105
  border-radius: 7px !important;
105
- top: 97px!important;
106
- left: 628px!important;
106
+ left: -999em !important;
107
107
  visibility: visible !important;
108
108
  opacity: 1!important;
109
109
  }