@coorpacademy/components 11.32.15-alpha.9 → 11.32.16

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 (142) hide show
  1. package/es/atom/button-link/index.d.ts.map +1 -1
  2. package/es/atom/button-link/index.js +3 -2
  3. package/es/atom/button-link/index.js.map +1 -1
  4. package/es/atom/button-link-icon-only/index.d.ts.map +1 -1
  5. package/es/atom/button-link-icon-only/index.js +2 -1
  6. package/es/atom/button-link-icon-only/index.js.map +1 -1
  7. package/es/atom/button-menu/index.d.ts.map +1 -1
  8. package/es/atom/button-menu/index.js +2 -1
  9. package/es/atom/button-menu/index.js.map +1 -1
  10. package/es/atom/link/index.d.ts +1 -0
  11. package/es/atom/link/index.d.ts.map +1 -1
  12. package/es/atom/link/index.js +6 -4
  13. package/es/atom/link/index.js.map +1 -1
  14. package/es/molecule/cm-popin/types.d.ts +1 -0
  15. package/es/molecule/cm-popin/types.d.ts.map +1 -1
  16. package/es/molecule/discipline-associated-skills/index.d.ts +1 -0
  17. package/es/molecule/discipline-associated-skills/index.d.ts.map +1 -1
  18. package/es/molecule/discipline-associated-skills/index.js +8 -4
  19. package/es/molecule/discipline-associated-skills/index.js.map +1 -1
  20. package/es/molecule/discipline-associated-skills/style.css +23 -3
  21. package/es/template/app-player/loading/index.d.ts +1 -0
  22. package/es/template/app-player/player/index.d.ts +2 -0
  23. package/es/template/app-player/player/slides/index.d.ts +1 -0
  24. package/es/template/app-player/player/slides/index.d.ts.map +1 -1
  25. package/es/template/app-player/popin-correction/index.d.ts +3 -0
  26. package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
  27. package/es/template/app-player/popin-end/index.d.ts +2 -0
  28. package/es/template/app-player/popin-end/summary.d.ts +1 -0
  29. package/es/template/app-player/popin-header/index.d.ts +1 -0
  30. package/es/template/app-player/popin-header/index.d.ts.map +1 -1
  31. package/es/template/app-review/index.d.ts +1 -0
  32. package/es/template/app-review/index.d.ts.map +1 -1
  33. package/es/template/app-review/player/prop-types.d.ts +1 -0
  34. package/es/template/app-review/player/prop-types.d.ts.map +1 -1
  35. package/es/template/app-review/prop-types.d.ts +1 -0
  36. package/es/template/app-review/prop-types.d.ts.map +1 -1
  37. package/es/template/back-office/brand-update/index.d.ts +1 -0
  38. package/es/template/common/dashboard/index.d.ts +2 -0
  39. package/es/template/common/discipline/index.d.ts +1 -0
  40. package/es/template/common/discipline/index.d.ts.map +1 -1
  41. package/es/template/common/discipline/index.js +6 -2
  42. package/es/template/common/discipline/index.js.map +1 -1
  43. package/es/template/common/search-page/index.d.ts +1 -0
  44. package/es/template/external-course/index.d.ts +1 -0
  45. package/es/template/my-learning/index.d.ts +0 -3
  46. package/es/template/my-learning/index.d.ts.map +1 -1
  47. package/es/template/my-learning/index.js +3 -8
  48. package/es/template/my-learning/index.js.map +1 -1
  49. package/es/template/skill-detail/all-courses.d.ts.map +1 -1
  50. package/es/template/skill-detail/all-courses.js +8 -14
  51. package/es/template/skill-detail/all-courses.js.map +1 -1
  52. package/es/template/skill-detail/continue-learning.d.ts.map +1 -1
  53. package/es/template/skill-detail/continue-learning.js +1 -1
  54. package/es/template/skill-detail/continue-learning.js.map +1 -1
  55. package/es/template/skill-detail/index.d.ts +1 -1
  56. package/es/template/skill-detail/index.js +4 -4
  57. package/es/template/skill-detail/index.js.map +1 -1
  58. package/lib/atom/button-link/index.d.ts.map +1 -1
  59. package/lib/atom/button-link/index.js +3 -2
  60. package/lib/atom/button-link/index.js.map +1 -1
  61. package/lib/atom/button-link-icon-only/index.d.ts.map +1 -1
  62. package/lib/atom/button-link-icon-only/index.js +2 -1
  63. package/lib/atom/button-link-icon-only/index.js.map +1 -1
  64. package/lib/atom/button-menu/index.d.ts.map +1 -1
  65. package/lib/atom/button-menu/index.js +2 -1
  66. package/lib/atom/button-menu/index.js.map +1 -1
  67. package/lib/atom/link/index.d.ts +1 -0
  68. package/lib/atom/link/index.d.ts.map +1 -1
  69. package/lib/atom/link/index.js +6 -4
  70. package/lib/atom/link/index.js.map +1 -1
  71. package/lib/molecule/cm-popin/types.d.ts +1 -0
  72. package/lib/molecule/cm-popin/types.d.ts.map +1 -1
  73. package/lib/molecule/discipline-associated-skills/index.d.ts +1 -0
  74. package/lib/molecule/discipline-associated-skills/index.d.ts.map +1 -1
  75. package/lib/molecule/discipline-associated-skills/index.js +8 -4
  76. package/lib/molecule/discipline-associated-skills/index.js.map +1 -1
  77. package/lib/molecule/discipline-associated-skills/style.css +23 -3
  78. package/lib/template/app-player/loading/index.d.ts +1 -0
  79. package/lib/template/app-player/player/index.d.ts +2 -0
  80. package/lib/template/app-player/player/slides/index.d.ts +1 -0
  81. package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
  82. package/lib/template/app-player/popin-correction/index.d.ts +3 -0
  83. package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
  84. package/lib/template/app-player/popin-end/index.d.ts +2 -0
  85. package/lib/template/app-player/popin-end/summary.d.ts +1 -0
  86. package/lib/template/app-player/popin-header/index.d.ts +1 -0
  87. package/lib/template/app-player/popin-header/index.d.ts.map +1 -1
  88. package/lib/template/app-review/index.d.ts +1 -0
  89. package/lib/template/app-review/index.d.ts.map +1 -1
  90. package/lib/template/app-review/player/prop-types.d.ts +1 -0
  91. package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
  92. package/lib/template/app-review/prop-types.d.ts +1 -0
  93. package/lib/template/app-review/prop-types.d.ts.map +1 -1
  94. package/lib/template/back-office/brand-update/index.d.ts +1 -0
  95. package/lib/template/common/dashboard/index.d.ts +2 -0
  96. package/lib/template/common/discipline/index.d.ts +1 -0
  97. package/lib/template/common/discipline/index.d.ts.map +1 -1
  98. package/lib/template/common/discipline/index.js +6 -2
  99. package/lib/template/common/discipline/index.js.map +1 -1
  100. package/lib/template/common/search-page/index.d.ts +1 -0
  101. package/lib/template/external-course/index.d.ts +1 -0
  102. package/lib/template/my-learning/index.d.ts +0 -3
  103. package/lib/template/my-learning/index.d.ts.map +1 -1
  104. package/lib/template/my-learning/index.js +3 -8
  105. package/lib/template/my-learning/index.js.map +1 -1
  106. package/lib/template/skill-detail/all-courses.d.ts.map +1 -1
  107. package/lib/template/skill-detail/all-courses.js +10 -14
  108. package/lib/template/skill-detail/all-courses.js.map +1 -1
  109. package/lib/template/skill-detail/continue-learning.d.ts.map +1 -1
  110. package/lib/template/skill-detail/continue-learning.js +1 -1
  111. package/lib/template/skill-detail/continue-learning.js.map +1 -1
  112. package/lib/template/skill-detail/index.d.ts +1 -1
  113. package/lib/template/skill-detail/index.js +4 -4
  114. package/lib/template/skill-detail/index.js.map +1 -1
  115. package/locales/bs/global.json +8 -0
  116. package/locales/cs/global.json +8 -0
  117. package/locales/de/global.json +8 -0
  118. package/locales/es/global.json +8 -0
  119. package/locales/et/global.json +8 -0
  120. package/locales/fi/global.json +8 -0
  121. package/locales/fr/global.json +8 -0
  122. package/locales/hr/global.json +8 -0
  123. package/locales/hu/global.json +8 -0
  124. package/locales/hy/global.json +8 -0
  125. package/locales/it/global.json +8 -0
  126. package/locales/ja/global.json +8 -0
  127. package/locales/ko/global.json +8 -0
  128. package/locales/nl/global.json +8 -0
  129. package/locales/pl/global.json +8 -0
  130. package/locales/pt/global.json +8 -0
  131. package/locales/ro/global.json +8 -0
  132. package/locales/ru/global.json +8 -0
  133. package/locales/sk/global.json +8 -0
  134. package/locales/sl/global.json +8 -0
  135. package/locales/sv/global.json +8 -0
  136. package/locales/tl/global.json +8 -0
  137. package/locales/tr/global.json +8 -0
  138. package/locales/uk/global.json +8 -0
  139. package/locales/vi/global.json +8 -0
  140. package/locales/zh/global.json +8 -0
  141. package/locales/zh_TW/global.json +8 -0
  142. package/package.json +2 -2
@@ -62,7 +62,7 @@ ContinueLearningButton.propTypes = process.env.NODE_ENV !== "production" ? {
62
62
  const SkillDetail = (props, context) => {
63
63
  const {
64
64
  title,
65
- ref,
65
+ skillRef,
66
66
  description,
67
67
  metrics = {},
68
68
  focused,
@@ -91,7 +91,7 @@ const SkillDetail = (props, context) => {
91
91
  return /*#__PURE__*/React.createElement("div", {
92
92
  className: classnames(style.description, !showMore && style.truncate)
93
93
  }, description);
94
- });
94
+ }, [showMore, description]);
95
95
  const ProgressBar = useCallback(() => {
96
96
  if (score === undefined) return null;
97
97
  const progressBarColor = '#3EC483';
@@ -112,7 +112,7 @@ const SkillDetail = (props, context) => {
112
112
  className: style.backgroundContainer
113
113
  }, /*#__PURE__*/React.createElement("div", {
114
114
  className: style.container,
115
- "data-name": ref
115
+ "data-name": skillRef
116
116
  }, /*#__PURE__*/React.createElement("div", {
117
117
  className: style.backButtonWrapper,
118
118
  onClick: onBackClick
@@ -202,7 +202,7 @@ SkillDetail.contextTypes = {
202
202
  };
203
203
  SkillDetail.propTypes = process.env.NODE_ENV !== "production" ? {
204
204
  title: PropTypes.string.isRequired,
205
- ref: PropTypes.string.isRequired,
205
+ skillRef: PropTypes.string.isRequired,
206
206
  description: PropTypes.string,
207
207
  metrics: PropTypes.shape({
208
208
  score: PropTypes.number,
@@ -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","hovered","setHovered","ongoingCoursesAvailable","onClick","skin","translate","primarySkinColor","handleMouseOver","handleMouseLeave","width","borderRadius","backgroundColor","position","faIcon","name","color","size","contextTypes","childContextTypes","propTypes","bool","func","SkillDetail","title","ref","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","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\nconst ContinueLearningButton = (props, context) => {\n const [hovered, setHovered] = useState(false);\n const {ongoingCoursesAvailable, onClick} = props;\n const {skin, translate} = context;\n const primarySkinColor = get('common.primary', skin);\n\n const handleMouseOver = useCallback(() => setHovered(true), [setHovered]);\n\n const handleMouseLeave = useCallback(() => setHovered(false), [setHovered]);\n\n return (\n <div onMouseOver={handleMouseOver} onMouseLeave={handleMouseLeave}>\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: hovered\n ? convert(`hsl(from ${primarySkinColor} h s calc(l*(1 - 0.08)))`)\n : primarySkinColor\n }}\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 ref,\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 });\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={ref}>\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}%</span>\n </div>\n </>\n )}\n </div>\n </div>\n ) : null}\n <ContinueLearning ongoingCourses={ongoingCourses} />\n <AllCourses\n skillIncludedCourses={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 ref: 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\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ames","Provider","Select","SelectOptionPropTypes","ButtonLink","Icon","CardsGrid","style","AllCourses","ContinueLearning","ContinueLearningButton","props","context","hovered","setHovered","ongoingCoursesAvailable","onClick","skin","translate","primarySkinColor","handleMouseOver","handleMouseLeave","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","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\nconst ContinueLearningButton = (props, context) => {\n const [hovered, setHovered] = useState(false);\n const {ongoingCoursesAvailable, onClick} = props;\n const {skin, translate} = context;\n const primarySkinColor = get('common.primary', skin);\n\n const handleMouseOver = useCallback(() => setHovered(true), [setHovered]);\n\n const handleMouseLeave = useCallback(() => setHovered(false), [setHovered]);\n\n return (\n <div onMouseOver={handleMouseOver} onMouseLeave={handleMouseLeave}>\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: hovered\n ? convert(`hsl(from ${primarySkinColor} h s calc(l*(1 - 0.08)))`)\n : primarySkinColor\n }}\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}%</span>\n </div>\n </>\n )}\n </div>\n </div>\n ) : null}\n <ContinueLearning ongoingCourses={ongoingCourses} />\n <AllCourses\n skillIncludedCourses={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,MAAMC,sBAAsB,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACjD,MAAM,CAACC,OAAD,EAAUC,UAAV,IAAwBjB,QAAQ,CAAC,KAAD,CAAtC;EACA,MAAM;IAACkB,uBAAD;IAA0BC;EAA1B,IAAqCL,KAA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,EAAE7C,SAAS,CAACwF,KAAV,CAAgBhF,SAAS,CAAC0B,SAA1B,CAbA;EActBY,YAAY,EAAE9C,SAAS,CAACyF,MAdF;EAetB1C,OAAO,EAAE/C,SAAS,CAACwF,KAAV,CAAgB;IACvBE,QAAQ,EAAE1F,SAAS,CAACoC,IADG;IAEvBuD,OAAO,EAAE3F,SAAS,CAAC4F,OAAV,CAAkB5F,SAAS,CAACwF,KAAV,CAAgBnF,qBAAhB,CAAlB;EAFc,CAAhB,CAfa;EAmBtB2C,OAAO,EAAEhD,SAAS,CAACwF,KAAV,CAAgBpF,MAAM,CAAC8B,SAAvB,CAnBa;EAoBtBe,WAAW,EAAEjD,SAAS,CAACoC,IApBD;EAqBtBc,aAAa,EAAElD,SAAS,CAACoC,IArBH;EAsBtBe,uBAAuB,EAAEnD,SAAS,CAACoC;AAtBb,CAAxB;AAyBA,eAAeC,WAAf"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button-link/index.tsx"],"names":[],"mappings":";AAMA,OAAkB,EAAC,eAAe,EAAW,MAAM,SAAS,CAAC;AAwC7D,QAAA,MAAM,UAAU;YAAW,eAAe;;;;;;;;;;;;;;;;;;;;;;CAsEzC,CAAC;AAIF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button-link/index.tsx"],"names":[],"mappings":";AAMA,OAAkB,EAAC,eAAe,EAAW,MAAM,SAAS,CAAC;AAwC7D,QAAA,MAAM,UAAU;YAAW,eAAe;;;;;;;;;;;;;;;;;;;;;;CAuEzC,CAAC;AAIF,eAAe,UAAU,CAAC"}
@@ -70,7 +70,7 @@ const ButtonLink = props => {
70
70
  type,
71
71
  label,
72
72
  content,
73
- disabled,
73
+ disabled = false,
74
74
  icon,
75
75
  'data-name': dataName,
76
76
  'data-testid': dataTestId = 'button-link',
@@ -110,7 +110,8 @@ const ButtonLink = props => {
110
110
  className: styleButton,
111
111
  onClick: handleOnClick,
112
112
  onKeyDown: handleOnKeyDown,
113
- tabIndex: 0
113
+ tabIndex: 0,
114
+ disabled: disabled
114
115
  }), contentView);
115
116
  };
116
117
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["getButtonContent","icon","content","type","faIcon","position","Icon","ICONS","style","buttonContent","label","iconComponent","iconName","name","iconColor","color","backgroundColor","size","faSize","wrapperSize","ButtonLink","props","disabled","dataName","dataTestId","ariaLabel","link","onClick","onKeyDown","className","customStyle","useTitle","contentView","styleButton","classnames","button","primary","secondary","tertiary","text","dangerous","handleOnClick","useCallback","handleOnKeyDown","event","title","propTypes"],"sources":["../../../src/atom/button-link/index.tsx"],"sourcesContent":["import React, {useCallback} from 'react';\nimport {noop} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Link from '../link';\nimport FaIcon from '../icon';\nimport {ICONS} from '../../util/button-icons';\nimport propTypes, {ButtonLinkProps, IconType} from './types';\nimport style from './style.css';\n\nconst getButtonContent = (icon?: IconType, content?: string | React.ReactNode) => {\n const {type, faIcon, position} = icon || {type: '', position: ''};\n const Icon = type && ICONS[type];\n\n if (!Icon && !faIcon) {\n return (\n <div className={style.buttonContent}>\n <span className={style.label}>{content}</span>\n </div>\n );\n }\n\n const iconComponent = faIcon ? (\n <FaIcon\n {...{\n iconName: faIcon.name,\n iconColor: faIcon.color,\n backgroundColor: faIcon.backgroundColor,\n size: {\n faSize: faIcon.size,\n wrapperSize: faIcon.size\n }\n }}\n />\n ) : (\n <Icon className={style.icon} theme=\"coorpmanager\" />\n );\n\n return (\n <div className={style.buttonContent}>\n {position === 'left' ? iconComponent : null}\n {content ? <span className={style.label}>{content}</span> : null}\n {position === 'right' ? iconComponent : null}\n </div>\n );\n};\n\nconst ButtonLink = (props: ButtonLinkProps) => {\n const {\n type,\n label,\n content,\n disabled,\n icon,\n 'data-name': dataName,\n 'data-testid': dataTestId = 'button-link',\n 'aria-label': ariaLabel,\n link,\n onClick = noop,\n onKeyDown = noop,\n className,\n customStyle,\n useTitle = true\n } = props;\n const contentView = getButtonContent(icon, content ?? label);\n const styleButton = classnames(\n className,\n style.button,\n type === 'primary' && style.primary,\n type === 'secondary' && style.secondary,\n type === 'tertiary' && style.tertiary,\n type === 'text' && style.text,\n type === 'dangerous' && style.dangerous,\n link && style.link,\n disabled && style.disabled\n );\n\n const handleOnClick = useCallback(() => onClick(), [onClick]);\n\n const handleOnKeyDown = useCallback(event => onKeyDown(event), [onKeyDown]);\n\n if (link) {\n return (\n <Link\n {...link}\n {...(useTitle && {\n title: ariaLabel || label\n })}\n style={customStyle}\n className={styleButton}\n data-name={dataName}\n data-testid={dataTestId}\n aria-label={ariaLabel || label}\n >\n {contentView}\n </Link>\n );\n }\n\n return (\n <button\n {...(useTitle && {\n title: ariaLabel || label\n })}\n type=\"button\"\n aria-label={ariaLabel || label}\n data-name={dataName}\n data-testid={dataTestId}\n style={customStyle}\n className={styleButton}\n onClick={handleOnClick}\n onKeyDown={handleOnKeyDown}\n tabIndex={0}\n >\n {contentView}\n </button>\n );\n};\n\nButtonLink.propTypes = propTypes;\n\nexport default ButtonLink;\n"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,gBAAgB,GAAG,CAACC,IAAD,EAAkBC,OAAlB,KAAyD;EAChF,MAAM;IAACC,IAAD;IAAOC,MAAP;IAAeC;EAAf,IAA2BJ,IAAI,IAAI;IAACE,IAAI,EAAE,EAAP;IAAWE,QAAQ,EAAE;EAArB,CAAzC;EACA,MAAMC,IAAI,GAAGH,IAAI,IAAII,kBAAA,CAAMJ,IAAN,CAArB;;EAEA,IAAI,CAACG,IAAD,IAAS,CAACF,MAAd,EAAsB;IACpB,oBACE;MAAK,SAAS,EAAEI,cAAA,CAAMC;IAAtB,gBACE;MAAM,SAAS,EAAED,cAAA,CAAME;IAAvB,GAA+BR,OAA/B,CADF,CADF;EAKD;;EAED,MAAMS,aAAa,GAAGP,MAAM,gB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K,UAAT,IAAuBK,cAAA,CAAM8B,QALX,EAMlBnC,IAAI,KAAK,MAAT,IAAmBK,cAAA,CAAM+B,IANP,EAOlBpC,IAAI,KAAK,WAAT,IAAwBK,cAAA,CAAMgC,SAPZ,EAQlBd,IAAI,IAAIlB,cAAA,CAAMkB,IARI,EASlBJ,QAAQ,IAAId,cAAA,CAAMc,QATA,CAApB;EAYA,MAAMmB,aAAa,GAAG,IAAAC,kBAAA,EAAY,MAAMf,OAAO,EAAzB,EAA6B,CAACA,OAAD,CAA7B,CAAtB;EAEA,MAAMgB,eAAe,GAAG,IAAAD,kBAAA,EAAYE,KAAK,IAAIhB,SAAS,CAACgB,KAAD,CAA9B,EAAuC,CAAChB,SAAD,CAAvC,CAAxB;;EAEA,IAAIF,IAAJ,EAAU;IACR,oBACE,6BAAC,aAAD,eACMA,IADN,EAEOK,QAAQ,IAAI;MACfc,KAAK,EAAEpB,SAAS,IAAIf;IADL,CAFnB;MAKE,KAAK,EAAEoB,WALT;MAME,SAAS,EAAEG,WANb;MAOE,aAAWV,QAPb;MAQE,eAAaC,UARf;MASE,cAAYC,SAAS,IAAIf;IAT3B,IAWGsB,WAXH,CADF;EAeD;;EAED,oBACE,oDACOD,QAAQ,IAAI;IACfc,KAAK,EAAEpB,SAAS,IAAIf;EADL,CADnB;IAIE,IAAI,EAAC,QAJP;IAKE,cAAYe,SAAS,IAAIf,KAL3B;IAME,aAAWa,QANb;IAOE,eAAaC,UAPf;IAQE,KAAK,EAAEM,WART;IASE,SAAS,EAAEG,WATb;IAUE,OAAO,EAAEQ,aAVX;IAWE,SAAS,EAAEE,eAXb;IAYE,QAAQ,EAAE;EAZZ,IAcGX,WAdH,CADF;AAkBD,CAtED;;AAwEAZ,UAAU,CAAC0B,SAAX,2CAAuBA,cAAvB;eAEe1B,U"}
1
+ {"version":3,"file":"index.js","names":["getButtonContent","icon","content","type","faIcon","position","Icon","ICONS","style","buttonContent","label","iconComponent","iconName","name","iconColor","color","backgroundColor","size","faSize","wrapperSize","ButtonLink","props","disabled","dataName","dataTestId","ariaLabel","link","onClick","onKeyDown","className","customStyle","useTitle","contentView","styleButton","classnames","button","primary","secondary","tertiary","text","dangerous","handleOnClick","useCallback","handleOnKeyDown","event","title","propTypes"],"sources":["../../../src/atom/button-link/index.tsx"],"sourcesContent":["import React, {useCallback} from 'react';\nimport {noop} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Link from '../link';\nimport FaIcon from '../icon';\nimport {ICONS} from '../../util/button-icons';\nimport propTypes, {ButtonLinkProps, IconType} from './types';\nimport style from './style.css';\n\nconst getButtonContent = (icon?: IconType, content?: string | React.ReactNode) => {\n const {type, faIcon, position} = icon || {type: '', position: ''};\n const Icon = type && ICONS[type];\n\n if (!Icon && !faIcon) {\n return (\n <div className={style.buttonContent}>\n <span className={style.label}>{content}</span>\n </div>\n );\n }\n\n const iconComponent = faIcon ? (\n <FaIcon\n {...{\n iconName: faIcon.name,\n iconColor: faIcon.color,\n backgroundColor: faIcon.backgroundColor,\n size: {\n faSize: faIcon.size,\n wrapperSize: faIcon.size\n }\n }}\n />\n ) : (\n <Icon className={style.icon} theme=\"coorpmanager\" />\n );\n\n return (\n <div className={style.buttonContent}>\n {position === 'left' ? iconComponent : null}\n {content ? <span className={style.label}>{content}</span> : null}\n {position === 'right' ? iconComponent : null}\n </div>\n );\n};\n\nconst ButtonLink = (props: ButtonLinkProps) => {\n const {\n type,\n label,\n content,\n disabled = false,\n icon,\n 'data-name': dataName,\n 'data-testid': dataTestId = 'button-link',\n 'aria-label': ariaLabel,\n link,\n onClick = noop,\n onKeyDown = noop,\n className,\n customStyle,\n useTitle = true\n } = props;\n const contentView = getButtonContent(icon, content ?? label);\n const styleButton = classnames(\n className,\n style.button,\n type === 'primary' && style.primary,\n type === 'secondary' && style.secondary,\n type === 'tertiary' && style.tertiary,\n type === 'text' && style.text,\n type === 'dangerous' && style.dangerous,\n link && style.link,\n disabled && style.disabled\n );\n\n const handleOnClick = useCallback(() => onClick(), [onClick]);\n\n const handleOnKeyDown = useCallback(event => onKeyDown(event), [onKeyDown]);\n\n if (link) {\n return (\n <Link\n {...link}\n {...(useTitle && {\n title: ariaLabel || label\n })}\n style={customStyle}\n className={styleButton}\n data-name={dataName}\n data-testid={dataTestId}\n aria-label={ariaLabel || label}\n >\n {contentView}\n </Link>\n );\n }\n\n return (\n <button\n {...(useTitle && {\n title: ariaLabel || label\n })}\n type=\"button\"\n aria-label={ariaLabel || label}\n data-name={dataName}\n data-testid={dataTestId}\n style={customStyle}\n className={styleButton}\n onClick={handleOnClick}\n onKeyDown={handleOnKeyDown}\n tabIndex={0}\n disabled={disabled}\n >\n {contentView}\n </button>\n );\n};\n\nButtonLink.propTypes = propTypes;\n\nexport default ButtonLink;\n"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,gBAAgB,GAAG,CAACC,IAAD,EAAkBC,OAAlB,KAAyD;EAChF,MAAM;IAACC,IAAD;IAAOC,MAAP;IAAeC;EAAf,IAA2BJ,IAAI,IAAI;IAACE,IAAI,EAAE,EAAP;IAAWE,QAAQ,EAAE;EAArB,CAAzC;EACA,MAAMC,IAAI,GAAGH,IAAI,IAAII,kBAAA,CAAMJ,IAAN,CAArB;;EAEA,IAAI,CAACG,IAAD,IAAS,CAACF,MAAd,EAAsB;IACpB,oBACE;MAAK,SAAS,EAAEI,cAAA,CAAMC;IAAtB,gBACE;MAAM,SAAS,EAAED,cAAA,CAAME;IAAvB,GAA+BR,OAA/B,CADF,CADF;EAKD;;EAED,MAAMS,aAAa,GAAGP,MAAM,gBAC1B,6BAAC,aAAD;IAEIQ,QAAQ,EAAER,MAAM,CAACS,IAFrB;IAGIC,SAAS,EAAEV,MAAM,CAACW,KAHtB;IAIIC,eAAe,EAAEZ,MAAM,CAACY,eAJ5B;IAKIC,IAAI,EAAE;MACJC,MAAM,EAAEd,MAAM,CAACa,IADX;MAEJE,WAAW,EAAEf,MAAM,CAACa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AA,CAAMc,QATA,CAApB;EAYA,MAAMmB,aAAa,GAAG,IAAAC,kBAAA,EAAY,MAAMf,OAAO,EAAzB,EAA6B,CAACA,OAAD,CAA7B,CAAtB;EAEA,MAAMgB,eAAe,GAAG,IAAAD,kBAAA,EAAYE,KAAK,IAAIhB,SAAS,CAACgB,KAAD,CAA9B,EAAuC,CAAChB,SAAD,CAAvC,CAAxB;;EAEA,IAAIF,IAAJ,EAAU;IACR,oBACE,6BAAC,aAAD,eACMA,IADN,EAEOK,QAAQ,IAAI;MACfc,KAAK,EAAEpB,SAAS,IAAIf;IADL,CAFnB;MAKE,KAAK,EAAEoB,WALT;MAME,SAAS,EAAEG,WANb;MAOE,aAAWV,QAPb;MAQE,eAAaC,UARf;MASE,cAAYC,SAAS,IAAIf;IAT3B,IAWGsB,WAXH,CADF;EAeD;;EAED,oBACE,oDACOD,QAAQ,IAAI;IACfc,KAAK,EAAEpB,SAAS,IAAIf;EADL,CADnB;IAIE,IAAI,EAAC,QAJP;IAKE,cAAYe,SAAS,IAAIf,KAL3B;IAME,aAAWa,QANb;IAOE,eAAaC,UAPf;IAQE,KAAK,EAAEM,WART;IASE,SAAS,EAAEG,WATb;IAUE,OAAO,EAAEQ,aAVX;IAWE,SAAS,EAAEE,eAXb;IAYE,QAAQ,EAAE,CAZZ;IAaE,QAAQ,EAAErB;EAbZ,IAeGU,WAfH,CADF;AAmBD,CAvED;;AAyEAZ,UAAU,CAAC0B,SAAX,2CAAuBA,cAAvB;eAEe1B,U"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button-link-icon-only/index.js"],"names":[],"mappings":";AAkCA,6DAgDC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button-link-icon-only/index.js"],"names":[],"mappings":";AAkCA,6DAiDC"}
@@ -87,7 +87,8 @@ const ButtonLinkIconOnly = props => {
87
87
  "data-testid": `button-${dataName}-${className}`,
88
88
  title: ariaLabel,
89
89
  className: styleButton,
90
- onClick: handleOnClick
90
+ onClick: handleOnClick,
91
+ disabled: disabled
91
92
  }, contentView);
92
93
  };
93
94
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["getButtonContent","icon","Icon","ICONS","style","buttonContent","getSizeStyle","size","small","responsive","default","ButtonLinkIconOnly","props","disabled","dataName","ariaLabel","link","onClick","className","contentView","styleButton","classnames","handleOnClick","useMemo","propTypes","PropTypes","oneOf","string","func","shape","href","download","bool","target"],"sources":["../../../src/atom/button-link-icon-only/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {getOr, keys} from 'lodash/fp';\nimport classnames from 'classnames';\nimport {ICONS} from '../../util/button-icons';\nimport Link from '../link';\n// eslint-disable-next-line css-modules/no-unused-class\nimport style from './style.css';\n\nconst getButtonContent = icon => {\n const Icon = getOr(null, icon, ICONS);\n\n if (!Icon) {\n return <div className={style.buttonContent} />;\n }\n\n return (\n <div className={style.buttonContent}>\n <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 ButtonLinkIconOnly = props => {\n const {\n size = 'default',\n disabled,\n icon,\n 'data-name': dataName,\n 'aria-label': ariaLabel,\n link,\n onClick,\n className\n } = props;\n const contentView = getButtonContent(icon);\n const styleButton = classnames(\n getSizeStyle(size),\n link && style.link,\n disabled && style.disabled,\n style[className]\n );\n\n const handleOnClick = useMemo(() => () => onClick(), [onClick]);\n\n if (link) {\n return (\n <Link\n {...link}\n className={styleButton}\n data-name={dataName}\n aria-label={ariaLabel}\n title={ariaLabel}\n >\n {contentView}\n </Link>\n );\n }\n\n return (\n <button\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 >\n {contentView}\n </button>\n );\n};\n\nButtonLinkIconOnly.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 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};\n\nexport default ButtonLinkIconOnly;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AAEA;;;;;;;;;;AAEA,MAAMA,gBAAgB,GAAGC,IAAI,IAAI;EAC/B,MAAMC,IAAI,GAAG,qBAAM,IAAN,EAAYD,IAAZ,EAAkBE,kBAAlB,CAAb;;EAEA,IAAI,CAACD,IAAL,EAAW;IACT,oBAAO;MAAK,SAAS,EAAEE,cAAA,CAAMC;IAAtB,EAAP;EACD;;EAED,oBACE;IAAK,SAAS,EAAED,cAAA,CAAMC;EAAtB,gBACE,6BAAC,IAAD;IAAM,SAAS,EAAED,cAAA,CAAMH;EAAvB,EADF,CADF;AAKD,CAZD;;AAcA,MAAMK,YAAY,GAAGC,IAAI,IAAI;EAC3B,QAAQA,IAAR;IACE,KAAK,OAAL;MACE,OAAOH,cAAA,CAAMI,KAAb;;IACF,KAAK,YAAL;MACE,OAAOJ,cAAA,CAAMK,UAAb;;IACF;MACE,OAAOL,cAAA,CAAMM,OAAb;EANJ;AAQD,CATD;;AAWA,MAAMC,kBAAkB,GAAGC,KAAK,IAAI;EAClC,MAAM;IACJL,IAAI,GAAG,SADH;IAEJM,QAFI;IAGJZ,IAHI;IAIJ,aAAaa,QAJT;IAKJ,cAAcC,SALV;IAMJC,IANI;IAOJC,OAPI;IAQJC;EARI,IASFN,KATJ;EAUA,MAAMO,WAAW,GAAGnB,gBAAgB,CAACC,IAAD,CAApC;EACA,MAAMmB,WAAW,GAAG,IAAAC,mBAAA,EAClBf,YAAY,CAACC,IAAD,CADM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QAAQ,EAAEY,kBAAA,CAAUO,IAXS;EAY7Bd,SAAS,EAAEO,kBAAA,CAAUE;AAZQ,CAA/B;eAeehB,kB"}
1
+ {"version":3,"file":"index.js","names":["getButtonContent","icon","Icon","ICONS","style","buttonContent","getSizeStyle","size","small","responsive","default","ButtonLinkIconOnly","props","disabled","dataName","ariaLabel","link","onClick","className","contentView","styleButton","classnames","handleOnClick","useMemo","propTypes","PropTypes","oneOf","string","func","shape","href","download","bool","target"],"sources":["../../../src/atom/button-link-icon-only/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {getOr, keys} from 'lodash/fp';\nimport classnames from 'classnames';\nimport {ICONS} from '../../util/button-icons';\nimport Link from '../link';\n// eslint-disable-next-line css-modules/no-unused-class\nimport style from './style.css';\n\nconst getButtonContent = icon => {\n const Icon = getOr(null, icon, ICONS);\n\n if (!Icon) {\n return <div className={style.buttonContent} />;\n }\n\n return (\n <div className={style.buttonContent}>\n <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 ButtonLinkIconOnly = props => {\n const {\n size = 'default',\n disabled,\n icon,\n 'data-name': dataName,\n 'aria-label': ariaLabel,\n link,\n onClick,\n className\n } = props;\n const contentView = getButtonContent(icon);\n const styleButton = classnames(\n getSizeStyle(size),\n link && style.link,\n disabled && style.disabled,\n style[className]\n );\n\n const handleOnClick = useMemo(() => () => onClick(), [onClick]);\n\n if (link) {\n return (\n <Link\n {...link}\n className={styleButton}\n data-name={dataName}\n aria-label={ariaLabel}\n title={ariaLabel}\n >\n {contentView}\n </Link>\n );\n }\n\n return (\n <button\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 disabled={disabled}\n >\n {contentView}\n </button>\n );\n};\n\nButtonLinkIconOnly.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 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};\n\nexport default ButtonLinkIconOnly;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AAEA;;;;;;;;;;AAEA,MAAMA,gBAAgB,GAAGC,IAAI,IAAI;EAC/B,MAAMC,IAAI,GAAG,qBAAM,IAAN,EAAYD,IAAZ,EAAkBE,kBAAlB,CAAb;;EAEA,IAAI,CAACD,IAAL,EAAW;IACT,oBAAO;MAAK,SAAS,EAAEE,cAAA,CAAMC;IAAtB,EAAP;EACD;;EAED,oBACE;IAAK,SAAS,EAAED,cAAA,CAAMC;EAAtB,gBACE,6BAAC,IAAD;IAAM,SAAS,EAAED,cAAA,CAAMH;EAAvB,EADF,CADF;AAKD,CAZD;;AAcA,MAAMK,YAAY,GAAGC,IAAI,IAAI;EAC3B,QAAQA,IAAR;IACE,KAAK,OAAL;MACE,OAAOH,cAAA,CAAMI,KAAb;;IACF,KAAK,YAAL;MACE,OAAOJ,cAAA,CAAMK,UAAb;;IACF;MACE,OAAOL,cAAA,CAAMM,OAAb;EANJ;AAQD,CATD;;AAWA,MAAMC,kBAAkB,GAAGC,KAAK,IAAI;EAClC,MAAM;IACJL,IAAI,GAAG,SADH;IAEJM,QAFI;IAGJZ,IAHI;IAIJ,aAAaa,QAJT;IAKJ,cAAcC,SALV;IAMJC,IANI;IAOJC,OAPI;IAQJC;EARI,IASFN,KATJ;EAUA,MAAMO,WAAW,GAAGnB,gBAAgB,CAACC,IAAD,CAApC;EACA,MAAMmB,WAAW,GAAG,IAAAC,mBAAA,EAClBf,YAAY,CAACC,IAAD,CADM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AHY,CAAhB,CANuB;EAW7Bb,QAAQ,EAAEY,kBAAA,CAAUO,IAXS;EAY7Bd,SAAS,EAAEO,kBAAA,CAAUE;AAZQ,CAA/B;eAeehB,kB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button-menu/index.tsx"],"names":[],"mappings":";AAIA,OAAkB,EAAC,eAAe,EAA+B,MAAM,SAAS,CAAC;AAgCjF,QAAA,MAAM,UAAU;YAAW,eAAe;;;;;;;;;;;CAazC,CAAC;AAIF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button-menu/index.tsx"],"names":[],"mappings":";AAIA,OAAkB,EAAC,eAAe,EAA+B,MAAM,SAAS,CAAC;AAiCjF,QAAA,MAAM,UAAU;YAAW,eAAe;;;;;;;;;;;CAazC,CAAC;AAIF,eAAe,UAAU,CAAC"}
@@ -37,7 +37,8 @@ const Button = props => {
37
37
  title: label,
38
38
  "data-name": dataName,
39
39
  className: styleButton,
40
- onClick: handleOnClick
40
+ onClick: handleOnClick,
41
+ disabled: disabled
41
42
  }, /*#__PURE__*/_react.default.createElement("div", {
42
43
  className: _style.default.buttonContent
43
44
  }, /*#__PURE__*/_react.default.createElement("span", {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["Button","props","dataName","disabled","label","onClick","type","styleButton","classnames","style","button","default","defaultLeft","dangerous","dangerousLeft","handleOnClick","useCallback","buttonContent","propTypes","buttonPropTypes","ButtonMenu","buttons","buildButton","index","buttonList","useMemo","map","convert","cap"],"sources":["../../../src/atom/button-menu/index.tsx"],"sourcesContent":["import React, {useMemo, useCallback} from 'react';\nimport map from 'lodash/fp/map';\nimport classnames from 'classnames';\nimport style from './style.css';\nimport propTypes, {ButtonMenuProps, ButtonProps, buttonPropTypes} from './types';\n\nconst Button = (props: ButtonProps) => {\n const {'data-name': dataName, disabled, label, onClick, type = 'default'} = props;\n const styleButton = classnames(\n style.button,\n type === 'default' && style.default,\n type === 'defaultLeft' && style.defaultLeft,\n type === 'dangerous' && style.dangerous,\n type === 'dangerousLeft' && style.dangerousLeft,\n disabled && style.disabled\n );\n\n const handleOnClick = useCallback(() => onClick(), [onClick]);\n return (\n <button\n type=\"button\"\n aria-label={label}\n title={label}\n data-name={dataName}\n className={styleButton}\n onClick={handleOnClick}\n >\n <div className={style.buttonContent}>\n <span className={style.label}>{label}</span>\n </div>\n </button>\n );\n};\n\nButton.propTypes = buttonPropTypes;\n\nconst ButtonMenu = (props: ButtonMenuProps) => {\n const {buttons, 'data-name': dataName} = props;\n const buildButton = useCallback((button: ButtonProps, index) => {\n return <Button {...button} key={button.label + index} />;\n }, []);\n\n const buttonList = useMemo(\n // @ts-expect-error (to avoid using map as any)\n () => map.convert({cap: false})(buildButton, buttons),\n [buttons, buildButton]\n );\n\n return <div data-name={dataName}>{buttonList}</div>;\n};\n\nButtonMenu.propTypes = propTypes;\n\nexport default ButtonMenu;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,MAAM,GAAIC,KAAD,IAAwB;EACrC,MAAM;IAAC,aAAaC,QAAd;IAAwBC,QAAxB;IAAkCC,KAAlC;IAAyCC,OAAzC;IAAkDC,IAAI,GAAG;EAAzD,IAAsEL,KAA5E;EACA,MAAMM,WAAW,GAAG,IAAAC,mBAAA,EAClBC,cAAA,CAAMC,MADY,EAElBJ,IAAI,KAAK,SAAT,IAAsBG,cAAA,CAAME,OAFV,EAGlBL,IAAI,KAAK,aAAT,IAA0BG,cAAA,CAAMG,WAHd,EAIlBN,IAAI,KAAK,WAAT,IAAwBG,cAAA,CAAMI,SAJZ,EAKlBP,IAAI,KAAK,eAAT,IAA4BG,cAAA,CAAMK,aALhB,EAMlBX,QAAQ,IAAIM,cAAA,CAAMN,QANA,CAApB;EASA,MAAMY,aAAa,GAAG,IAAAC,kBAAA,EAAY,MAAMX,OAAO,EAAzB,EAA6B,CAACA,OAAD,CAA7B,CAAtB;EACA,oBACE;IACE,IAAI,EAAC,QADP;IAEE,cAAYD,KAFd;IAGE,KAAK,EAAEA,KAHT;IAIE,aAAWF,QAJb;IAKE,SAAS,EAAEK,WALb;IAME,OAAO,EAAEQ;EANX,gBAQE;IAAK,SAAS,EAAEN,cAAA,CAAMQ;EAAtB,gBACE;IAAM,SAAS,EAAER,cAAA,CAAML;EAAvB,GAA+BA,KAA/B,CADF,CARF,CADF;AAcD,CA1BD;;AA4BAJ,MAAM,CAACkB,SAAP,2CAAmBC,sBAAnB;;AAEA,MAAMC,UAAU,GAAInB,KAAD,IAA4B;EAC7C,MAAM;IAACoB,OAAD;IAAU,aAAanB;EAAvB,IAAmCD,KAAzC;EACA,MAAMqB,WAAW,GAAG,IAAAN,kBAAA,EAAY,CAACN,MAAD,EAAsBa,KAAtB,KAAgC;IAC9D,oBAAO,6BAAC,MAAD,eAAYb,MAAZ;MAAoB,GAAG,EAAEA,MAAM,CAACN,KAAP,GAAemB;IAAxC,GAAP;EACD,CAFmB,EAEjB,EAFiB,CAApB;EAIA,MAAMC,UAAU,GAAG,IAAAC,cAAA,GACjB;EACA,MAAMC,YAAA,CAAIC,OAAJ,CAAY;IAACC,GAAG,EAAE;EAAN,CAAZ,EAA0BN,WAA1B,EAAuCD,OAAvC,CAFW,EAGjB,CAACA,OAAD,EAAUC,WAAV,CAHiB,CAAnB;EAMA,oBAAO;IAAK,aAAWpB;EAAhB,GAA2BsB,UAA3B,CAAP;AACD,CAbD;;AAeAJ,UAAU,CAACF,SAAX,2CAAuBA,cAAvB;eAEeE,U"}
1
+ {"version":3,"file":"index.js","names":["Button","props","dataName","disabled","label","onClick","type","styleButton","classnames","style","button","default","defaultLeft","dangerous","dangerousLeft","handleOnClick","useCallback","buttonContent","propTypes","buttonPropTypes","ButtonMenu","buttons","buildButton","index","buttonList","useMemo","map","convert","cap"],"sources":["../../../src/atom/button-menu/index.tsx"],"sourcesContent":["import React, {useMemo, useCallback} from 'react';\nimport map from 'lodash/fp/map';\nimport classnames from 'classnames';\nimport style from './style.css';\nimport propTypes, {ButtonMenuProps, ButtonProps, buttonPropTypes} from './types';\n\nconst Button = (props: ButtonProps) => {\n const {'data-name': dataName, disabled, label, onClick, type = 'default'} = props;\n const styleButton = classnames(\n style.button,\n type === 'default' && style.default,\n type === 'defaultLeft' && style.defaultLeft,\n type === 'dangerous' && style.dangerous,\n type === 'dangerousLeft' && style.dangerousLeft,\n disabled && style.disabled\n );\n\n const handleOnClick = useCallback(() => onClick(), [onClick]);\n return (\n <button\n type=\"button\"\n aria-label={label}\n title={label}\n data-name={dataName}\n className={styleButton}\n onClick={handleOnClick}\n disabled={disabled}\n >\n <div className={style.buttonContent}>\n <span className={style.label}>{label}</span>\n </div>\n </button>\n );\n};\n\nButton.propTypes = buttonPropTypes;\n\nconst ButtonMenu = (props: ButtonMenuProps) => {\n const {buttons, 'data-name': dataName} = props;\n const buildButton = useCallback((button: ButtonProps, index) => {\n return <Button {...button} key={button.label + index} />;\n }, []);\n\n const buttonList = useMemo(\n // @ts-expect-error (to avoid using map as any)\n () => map.convert({cap: false})(buildButton, buttons),\n [buttons, buildButton]\n );\n\n return <div data-name={dataName}>{buttonList}</div>;\n};\n\nButtonMenu.propTypes = propTypes;\n\nexport default ButtonMenu;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,MAAM,GAAIC,KAAD,IAAwB;EACrC,MAAM;IAAC,aAAaC,QAAd;IAAwBC,QAAxB;IAAkCC,KAAlC;IAAyCC,OAAzC;IAAkDC,IAAI,GAAG;EAAzD,IAAsEL,KAA5E;EACA,MAAMM,WAAW,GAAG,IAAAC,mBAAA,EAClBC,cAAA,CAAMC,MADY,EAElBJ,IAAI,KAAK,SAAT,IAAsBG,cAAA,CAAME,OAFV,EAGlBL,IAAI,KAAK,aAAT,IAA0BG,cAAA,CAAMG,WAHd,EAIlBN,IAAI,KAAK,WAAT,IAAwBG,cAAA,CAA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Link {
17
17
  onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
18
18
  useButtonTag: PropTypes.Requireable<boolean>;
19
19
  style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
20
+ disabled: PropTypes.Requireable<boolean>;
20
21
  };
21
22
  namespace contextTypes {
22
23
  const skin: PropTypes.Requireable<PropTypes.InferProps<{
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/link/index.js"],"names":[],"mappings":";AAMA,mEA0GC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/link/index.js"],"names":[],"mappings":";AAMA,mEA4GC"}
@@ -55,7 +55,8 @@ const Link = (props, legacyContext) => {
55
55
  children,
56
56
  onMouseLeave = _noop2.default,
57
57
  onMouseEnter = _noop2.default,
58
- download
58
+ download,
59
+ disabled
59
60
  } = props;
60
61
  const handleMouseEnter = (0, _react.useCallback)(() => {
61
62
  setHovered(true);
@@ -87,13 +88,13 @@ const Link = (props, legacyContext) => {
87
88
  const _props = (0, _react.useMemo)(() => _extends({}, linKElementProps, {
88
89
  'data-name': dataName,
89
90
  'aria-label': ariaLabel,
90
- href: href ? createHref(href) : undefined,
91
+ href: !href || disabled ? '#' : createHref(href),
91
92
  onClick: handleOnClick,
92
93
  onMouseEnter: handleMouseEnter,
93
94
  onMouseLeave: handleMouseLeave,
94
95
  className,
95
96
  style: _extends({}, propsStyle, _style, _hoverStyle)
96
- }), [_hoverStyle, _style, ariaLabel, className, createHref, dataName, handleMouseEnter, handleMouseLeave, handleOnClick, href, linKElementProps, propsStyle]);
97
+ }), [_hoverStyle, _style, ariaLabel, className, createHref, dataName, handleMouseEnter, handleMouseLeave, handleOnClick, href, disabled, linKElementProps, propsStyle]);
97
98
 
98
99
  return useButtonTag ? /*#__PURE__*/_react.default.createElement("button", _extends({}, _props, {
99
100
  type: "button"
@@ -115,7 +116,8 @@ Link.propTypes = process.env.NODE_ENV !== "production" ? {
115
116
  onMouseEnter: _propTypes.default.func,
116
117
  onMouseLeave: _propTypes.default.func,
117
118
  useButtonTag: _propTypes.default.bool,
118
- style: _propTypes.default.shape({})
119
+ style: _propTypes.default.shape({}),
120
+ disabled: _propTypes.default.bool
119
121
  } : {};
120
122
  Link.contextTypes = {
121
123
  skin: _provider.default.childContextTypes.skin,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["Link","props","legacyContext","skin","GetSkinFromContext","hovered","setHovered","useState","history","createHref","skinHover","hoverColor","dataName","ariaLabel","useButtonTag","linKElementProps","href","onClick","className","style","propsStyle","children","onMouseLeave","onMouseEnter","download","handleMouseEnter","useCallback","handleMouseLeave","navigate","useMemo","pushToHistory","handleOnClick","e","_style","pointerEvents","_hoverStyle","color","_props","undefined","propTypes","PropTypes","node","string","title","target","oneOf","bool","func","shape","contextTypes","Provider","childContextTypes"],"sources":["../../../src/atom/link/index.js"],"sourcesContent":["import React, {useCallback, useMemo, useState} from 'react';\nimport PropTypes from 'prop-types';\nimport {identity, getOr, noop} from 'lodash/fp';\nimport Provider, {GetSkinFromContext} from '../provider';\nimport pushToHistory from '../../util/navigation';\n\nconst Link = (props, legacyContext) => {\n const skin = GetSkinFromContext(legacyContext);\n const [hovered, setHovered] = useState(false);\n const {history: {createHref = identity} = {}} = legacyContext;\n const {\n skinHover,\n hoverColor = getOr('#00B0FF', 'common.primary', skin),\n 'data-name': dataName = 'link',\n 'aria-label': ariaLabel,\n useButtonTag = false,\n ...linKElementProps\n } = props;\n const {\n href,\n onClick = noop,\n className,\n style: propsStyle,\n children,\n onMouseLeave = noop,\n onMouseEnter = noop,\n download\n } = props;\n\n const handleMouseEnter = useCallback(() => {\n setHovered(true);\n\n onMouseEnter();\n }, [onMouseEnter]);\n\n const handleMouseLeave = useCallback(() => {\n setHovered(false);\n\n onMouseLeave();\n }, [onMouseLeave]);\n\n const navigate = useMemo(() => pushToHistory(legacyContext)({href}), [href, legacyContext]);\n\n const handleOnClick = useCallback(\n e => {\n onClick(e);\n\n if (!download) {\n navigate(e);\n }\n },\n [download, navigate, onClick]\n );\n\n const _style = useMemo(\n () =>\n href || onClick\n ? null\n : {\n pointerEvents: 'none'\n },\n [href, onClick]\n );\n const _hoverStyle = useMemo(\n () =>\n skinHover && hovered\n ? {\n color: hoverColor\n }\n : null,\n [hoverColor, hovered, skinHover]\n );\n\n const _props = useMemo(\n () => ({\n ...linKElementProps,\n 'data-name': dataName,\n 'aria-label': ariaLabel,\n href: href ? createHref(href) : undefined,\n onClick: handleOnClick,\n onMouseEnter: handleMouseEnter,\n onMouseLeave: handleMouseLeave,\n className,\n style: {\n ...propsStyle,\n ..._style,\n ..._hoverStyle\n }\n }),\n [\n _hoverStyle,\n _style,\n ariaLabel,\n className,\n createHref,\n dataName,\n handleMouseEnter,\n handleMouseLeave,\n handleOnClick,\n href,\n linKElementProps,\n propsStyle\n ]\n );\n\n return useButtonTag ? (\n <button {..._props} type=\"button\">\n {children}\n </button>\n ) : (\n <a {..._props}>{children}</a>\n );\n};\n\nLink.propTypes = {\n children: PropTypes.node,\n className: PropTypes.string,\n href: PropTypes.string,\n 'data-name': PropTypes.string,\n 'aria-label': PropTypes.string,\n title: PropTypes.string,\n target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top']),\n skinHover: PropTypes.bool,\n hoverColor: PropTypes.string,\n download: PropTypes.bool,\n onClick: PropTypes.func,\n onMouseEnter: PropTypes.func,\n onMouseLeave: PropTypes.func,\n useButtonTag: PropTypes.bool,\n style: PropTypes.shape({})\n};\n\nLink.contextTypes = {\n skin: Provider.childContextTypes.skin,\n history: Provider.childContextTypes.history\n};\n\nexport default Link;\n"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;;;;;;;;;;;;;AAEA,MAAMA,IAAI,GAAG,CAACC,KAAD,EAAQC,aAAR,KAA0B;EACrC,MAAMC,IAAI,GAAG,IAAAC,4BAAA,EAAmBF,aAAnB,CAAb;EACA,MAAM,CAACG,OAAD,EAAUC,UAAV,IAAwB,I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AUK,KAAV,CAAgB,CAAC,OAAD,EAAU,QAAV,EAAoB,SAApB,EAA+B,MAA/B,CAAhB,CAPO;EAQfnC,SAAS,EAAE8B,kBAAA,CAAUM,IARN;EASfnC,UAAU,EAAE6B,kBAAA,CAAUE,MATP;EAUflB,QAAQ,EAAEgB,kBAAA,CAAUM,IAVL;EAWf7B,OAAO,EAAEuB,kBAAA,CAAUO,IAXJ;EAYfxB,YAAY,EAAEiB,kBAAA,CAAUO,IAZT;EAafzB,YAAY,EAAEkB,kBAAA,CAAUO,IAbT;EAcfjC,YAAY,EAAE0B,kBAAA,CAAUM,IAdT;EAef3B,KAAK,EAAEqB,kBAAA,CAAUQ,KAAV,CAAgB,EAAhB;AAfQ,CAAjB;AAkBAhD,IAAI,CAACiD,YAAL,GAAoB;EAClB9C,IAAI,EAAE+C,iBAAA,CAASC,iBAAT,CAA2BhD,IADf;EAElBK,OAAO,EAAE0C,iBAAA,CAASC,iBAAT,CAA2B3C;AAFlB,CAApB;eAKeR,I"}
1
+ {"version":3,"file":"index.js","names":["Link","props","legacyContext","skin","GetSkinFromContext","hovered","setHovered","useState","history","createHref","skinHover","hoverColor","dataName","ariaLabel","useButtonTag","linKElementProps","href","onClick","className","style","propsStyle","children","onMouseLeave","onMouseEnter","download","disabled","handleMouseEnter","useCallback","handleMouseLeave","navigate","useMemo","pushToHistory","handleOnClick","e","_style","pointerEvents","_hoverStyle","color","_props","propTypes","PropTypes","node","string","title","target","oneOf","bool","func","shape","contextTypes","Provider","childContextTypes"],"sources":["../../../src/atom/link/index.js"],"sourcesContent":["import React, {useCallback, useMemo, useState} from 'react';\nimport PropTypes from 'prop-types';\nimport {identity, getOr, noop} from 'lodash/fp';\nimport Provider, {GetSkinFromContext} from '../provider';\nimport pushToHistory from '../../util/navigation';\n\nconst Link = (props, legacyContext) => {\n const skin = GetSkinFromContext(legacyContext);\n const [hovered, setHovered] = useState(false);\n const {history: {createHref = identity} = {}} = legacyContext;\n const {\n skinHover,\n hoverColor = getOr('#00B0FF', 'common.primary', skin),\n 'data-name': dataName = 'link',\n 'aria-label': ariaLabel,\n useButtonTag = false,\n ...linKElementProps\n } = props;\n const {\n href,\n onClick = noop,\n className,\n style: propsStyle,\n children,\n onMouseLeave = noop,\n onMouseEnter = noop,\n download,\n disabled\n } = props;\n\n const handleMouseEnter = useCallback(() => {\n setHovered(true);\n\n onMouseEnter();\n }, [onMouseEnter]);\n\n const handleMouseLeave = useCallback(() => {\n setHovered(false);\n\n onMouseLeave();\n }, [onMouseLeave]);\n\n const navigate = useMemo(() => pushToHistory(legacyContext)({href}), [href, legacyContext]);\n\n const handleOnClick = useCallback(\n e => {\n onClick(e);\n\n if (!download) {\n navigate(e);\n }\n },\n [download, navigate, onClick]\n );\n\n const _style = useMemo(\n () =>\n href || onClick\n ? null\n : {\n pointerEvents: 'none'\n },\n [href, onClick]\n );\n const _hoverStyle = useMemo(\n () =>\n skinHover && hovered\n ? {\n color: hoverColor\n }\n : null,\n [hoverColor, hovered, skinHover]\n );\n\n const _props = useMemo(\n () => ({\n ...linKElementProps,\n 'data-name': dataName,\n 'aria-label': ariaLabel,\n href: !href || disabled ? '#' : createHref(href),\n onClick: handleOnClick,\n onMouseEnter: handleMouseEnter,\n onMouseLeave: handleMouseLeave,\n className,\n style: {\n ...propsStyle,\n ..._style,\n ..._hoverStyle\n }\n }),\n [\n _hoverStyle,\n _style,\n ariaLabel,\n className,\n createHref,\n dataName,\n handleMouseEnter,\n handleMouseLeave,\n handleOnClick,\n href,\n disabled,\n linKElementProps,\n propsStyle\n ]\n );\n\n return useButtonTag ? (\n <button {..._props} type=\"button\">\n {children}\n </button>\n ) : (\n <a {..._props}>{children}</a>\n );\n};\n\nLink.propTypes = {\n children: PropTypes.node,\n className: PropTypes.string,\n href: PropTypes.string,\n 'data-name': PropTypes.string,\n 'aria-label': PropTypes.string,\n title: PropTypes.string,\n target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top']),\n skinHover: PropTypes.bool,\n hoverColor: PropTypes.string,\n download: PropTypes.bool,\n onClick: PropTypes.func,\n onMouseEnter: PropTypes.func,\n onMouseLeave: PropTypes.func,\n useButtonTag: PropTypes.bool,\n style: PropTypes.shape({}),\n disabled: PropTypes.bool\n};\n\nLink.contextTypes = {\n skin: Provider.childContextTypes.skin,\n history: Provider.childContextTypes.history\n};\n\nexport default Link;\n"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;;;;;;;;;;;;;AAEA,MAAMA,IAAI,GAAG,CAACC,KAAD,EAAQC,aAAR,KAA0B;EACrC,MAAMC,IAAI,GAAG,IAAAC,4BAAA,EAAmBF,aAAnB,CAAb;EACA,MAAM,CAACG,OAAD,EAAUC,UAAV,IAAwB,IAAAC,eAAA,EAAS,KAAT,CAA9B;EACA,MAAM;IAACC,OAAO,EAAE;MAACC,UAAU;IAAX,IAA0B;EAApC,IAA0CP,aAAhD;;EACA,MAAM;IACJQ,SADI;IAEJC,UAAU,GAAG,qBAAM,SAAN,EAAiB,gBAAjB,EAAmCR,IAAnC,CAFT;IAGJ,aAAaS,QAAQ,GAAG,MAHpB;IAIJ,cAAcC,SAJV;IAKJC,YAAY,GAAG;EALX,IAOFb,KAPJ;EAAA,MAMKc,gBANL,iCAOId,KAPJ;;EAQA,MAAM;IACJe,IADI;IAEJC,OAAO,iBAFH;IAGJC,SAHI;IAIJC,KAAK,EAAEC,UAJH;IAKJC,QALI;IAMJC,YAAY,iBANR;IAOJC,YAAY,iBAPR;IAQJC,QARI;IASJC;EATI,IAUFxB,KAVJ;EAYA,MAAMyB,gBAAgB,GAAG,IAAAC,kBAAA,EAAY,MAAM;IACzCrB,UAAU,CAAC,IAAD,CAAV;IAEAiB,YAAY;EACb,CAJwB,EAItB,CAACA,YAAD,CAJsB,CAAzB;EAMA,MAAMK,gBAAgB,GAAG,IAAAD,kBAAA,EAAY,MAAM;IACzCrB,UAAU,CAAC,KAAD,CAAV;IAEAgB,YAAY;EACb,CAJwB,EAItB,CAACA,YAAD,CAJsB,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[]) => any>;
273
273
  useButtonTag: PropTypes.Requireable<boolean>;
274
274
  style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
275
+ disabled: PropTypes.Requireable<boolean>;
275
276
  }>>;
276
277
  };
277
278
  declare type PopinHeaderProps = {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/cm-popin/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAKnC,OAAO,IAAI,MAAM,iBAAiB,CAAC;AACnC,OAAO,EAAC,UAAU,EAAC,MAAM,wBAAwB,CAAC;AAClD,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAClD,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAGlD,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoDd,CAAC;AAEF,aAAK,gBAAgB,GAAG;IACtB,KAAK,EAAE,UAAU,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE;QACZ,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,aAAa,EAAE,MAAM,IAAI,CAAC;CAC3B,CAAC;AAEF,o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10
  locale: PropTypes.Requireable<string>;
11
11
  focused: PropTypes.Requireable<boolean>;
12
12
  }> | null | undefined)[]>;
13
+ const skillsBaseUrl: PropTypes.Requireable<string>;
13
14
  const onSkillClick: PropTypes.Requireable<(...args: any[]) => any>;
14
15
  }
15
16
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/discipline-associated-skills/index.js"],"names":[],"mappings":";AAUA,0FA0EC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/discipline-associated-skills/index.js"],"names":[],"mappings":";AAUA,0FAgFC"}
@@ -35,13 +35,14 @@ const DisciplineAssociatedSkills = (props, context) => {
35
35
  } = context;
36
36
  const {
37
37
  skills = [],
38
+ skillsBaseUrl,
38
39
  onSkillClick
39
40
  } = props;
41
+ const hrefFormat = (0, _react.useCallback)(skill => skillsBaseUrl ? `${skillsBaseUrl}/${skill.ref}` : '', [skillsBaseUrl]);
40
42
  const AnchorElement = (0, _react.useCallback)(skill => /*#__PURE__*/_react.default.createElement("div", {
41
43
  className: _style.default.chipFocusedContent
42
44
  }, skill.focused ? /*#__PURE__*/_react.default.createElement(_icon.default, {
43
45
  iconName: "bullseye-arrow",
44
- backgroundColor: "#DDD1FF",
45
46
  size: {
46
47
  faSize: 12,
47
48
  wrapperSize: 12
@@ -60,8 +61,9 @@ const DisciplineAssociatedSkills = (props, context) => {
60
61
  }, /*#__PURE__*/_react.default.createElement("div", {
61
62
  className: _style.default.chipsWrapper
62
63
  }, skills.map(skill => {
63
- function handleSkillClick() {
64
- return onSkillClick(skill.ref);
64
+ function handleSkillClick(event) {
65
+ if (!skillsBaseUrl) event.preventDefault();
66
+ onSkillClick();
65
67
  }
66
68
 
67
69
  function handleAnchorElement() {
@@ -72,7 +74,8 @@ const DisciplineAssociatedSkills = (props, context) => {
72
74
  return TooltipContentElement(skill);
73
75
  }
74
76
 
75
- return /*#__PURE__*/_react.default.createElement("div", {
77
+ return /*#__PURE__*/_react.default.createElement("a", {
78
+ href: hrefFormat(skill),
76
79
  key: (0, _uniqueId2.default)(),
77
80
  className: (0, _classnames.default)(_style.default.chipWrapper, skill.focused && _style.default.chipWrapperFocused),
78
81
  onClick: handleSkillClick
@@ -97,6 +100,7 @@ DisciplineAssociatedSkills.propTypes = process.env.NODE_ENV !== "production" ? {
97
100
  locale: _propTypes.default.string,
98
101
  focused: _propTypes.default.bool
99
102
  })),
103
+ skillsBaseUrl: _propTypes.default.string,
100
104
  onSkillClick: _propTypes.default.func
101
105
  } : {};
102
106
  var _default = DisciplineAssociatedSkills;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["DisciplineAssociatedSkills","props","context","translate","skills","onSkillClick","AnchorElement","useCallback","skill","style","chipFocusedContent","focused","faSize","wrapperSize","chipFocusedContentText","locale","TooltipContentElement","tooltipContentWrapper","associatedSkillsWrapper","chipsWrapper","map","handleSkillClick","ref","handleAnchorElement","handleTooltipContentElement","classnames","chipWrapper","chipWrapperFocused","infoIconTooltip","tooltipSkillFocused","tooltip","contextTypes","Provider","childContextTypes","propTypes","PropTypes","arrayOf","shape","string","bool","func"],"sources":["../../../src/molecule/discipline-associated-skills/index.js"],"sourcesContent":["import React, {useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {isEmpty, uniqueId} from 'lodash/fp';\nimport Icon from '../../atom/icon';\nimport ToolTip from '../../atom/tooltip';\nimport Provider from '../../atom/provider';\nimport CatalogSection from '../../atom/catalog-section';\nimport style from './style.css';\n\nconst DisciplineAssociatedSkills = (props, context) => {\n const {translate} = context;\n\n const {skills = [], onSkillClick} = props;\n\n const AnchorElement = useCallback(\n skill => (\n <div className={style.chipFocusedContent}>\n {skill.focused ? (\n <Icon\n iconName=\"bullseye-arrow\"\n backgroundColor=\"#DDD1FF\"\n size={{\n faSize: 12,\n wrapperSize: 12\n }}\n />\n ) : null}\n <div className={style.chipFocusedContentText}>{skill.locale}</div>\n </div>\n ),\n []\n );\n\n const TooltipContentElement = useCallback(\n skill => (\n <div className={style.tooltipContentWrapper}>\n {skill.focused ? (\n <div>\n <b>{translate('skill_focused_chip_tooltip')}</b>\n </div>\n ) : null}\n <div>{skill.locale}</div>\n </div>\n ),\n []\n );\n\n return !isEmpty(skills) ? (\n <div data-name=\"discipline-associated-skills\" className={style.associatedSkillsWrapper}>\n <CatalogSection title={translate('associated_skills')}>\n <div className={style.chipsWrapper}>\n {skills.map(skill => {\n function handleSkillClick() {\n return onSkillClick(skill.ref);\n }\n function handleAnchorElement() {\n return AnchorElement(skill);\n }\n function handleTooltipContentElement() {\n return TooltipContentElement(skill);\n }\n return (\n <div\n key={uniqueId()}\n className={classnames(style.chipWrapper, skill.focused && style.chipWrapperFocused)}\n onClick={handleSkillClick}\n >\n <ToolTip\n AnchorElement={handleAnchorElement}\n fontSize={12}\n delayHide={0}\n iconContainerClassName={style.infoIconTooltip}\n tooltipClassName={skill.focused ? style.tooltipSkillFocused : style.tooltip}\n TooltipContent={handleTooltipContentElement}\n closeToolTipInformationTextAriaLabel={translate('close_tooltip_information')}\n />\n </div>\n );\n })}\n </div>\n </CatalogSection>\n </div>\n ) : null;\n};\n\nDisciplineAssociatedSkills.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nDisciplineAssociatedSkills.propTypes = {\n skills: PropTypes.arrayOf(\n PropTypes.shape({\n ref: PropTypes.string,\n locale: PropTypes.string,\n focused: PropTypes.bool\n })\n ),\n onSkillClick: PropTypes.func\n};\n\nexport default DisciplineAssociatedSkills;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA,MAAMA,0BAA0B,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACrD,MAAM;IAACC;EAAD,IAAcD,OAApB;EAEA,MAAM;IAACE,MAAM,GAAG,EAAV;IAAcC;EAAd,IAA8BJ,KAApC;EAEA,MAAMK,aAAa,GAAG,IAAAC,kBAAA,EAC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iBF,cAAA,CAAMkB,kBAArD,CAFb;MAGE,OAAO,EAAEN;IAHX,gBAKE,6BAAC,gBAAD;MACE,aAAa,EAAEE,mBADjB;MAEE,QAAQ,EAAE,EAFZ;MAGE,SAAS,EAAE,CAHb;MAIE,sBAAsB,EAAEd,cAAA,CAAMmB,eAJhC;MAKE,gBAAgB,EAAEpB,KAAK,CAACG,OAAN,GAAgBF,cAAA,CAAMoB,mBAAtB,GAA4CpB,cAAA,CAAMqB,OALtE;MAME,cAAc,EAAEN,2BANlB;MAOE,oCAAoC,EAAErB,SAAS,CAAC,2BAAD;IAPjD,EALF,CADF;EAiBD,CA3BA,CADH,CADF,CADF,CADK,GAmCH,IAnCJ;AAoCD,CA1ED;;AA4EAH,0BAA0B,CAAC+B,YAA3B,GAA0C;EACxC5B,SAAS,EAAE6B,iBAAA,CAASC,iBAAT,CAA2B9B;AADE,CAA1C;AAIAH,0BAA0B,CAACkC,SAA3B,2CAAuC;EACrC9B,MAAM,EAAE+B,kBAAA,CAAUC,OAAV,CACND,kBAAA,CAAUE,KAAV,CAAgB;IACdf,GAAG,EAAEa,kBAAA,CAAUG,MADD;IAEdvB,MAAM,EAAEoB,kBAAA,CAAUG,MAFJ;IAGd3B,OAAO,EAAEwB,kBAAA,CAAUI;EAHL,CAAhB,CADM,CAD6B;EAQrClC,YAAY,EAAE8B,kBAAA,CAAUK;AARa,CAAvC;eAWexC,0B"}
1
+ {"version":3,"file":"index.js","names":["DisciplineAssociatedSkills","props","context","translate","skills","skillsBaseUrl","onSkillClick","hrefFormat","useCallback","skill","ref","AnchorElement","style","chipFocusedContent","focused","faSize","wrapperSize","chipFocusedContentText","locale","TooltipContentElement","tooltipContentWrapper","associatedSkillsWrapper","chipsWrapper","map","handleSkillClick","event","preventDefault","handleAnchorElement","handleTooltipContentElement","classnames","chipWrapper","chipWrapperFocused","infoIconTooltip","tooltipSkillFocused","tooltip","contextTypes","Provider","childContextTypes","propTypes","PropTypes","arrayOf","shape","string","bool","func"],"sources":["../../../src/molecule/discipline-associated-skills/index.js"],"sourcesContent":["import React, {useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {isEmpty, uniqueId} from 'lodash/fp';\nimport Icon from '../../atom/icon';\nimport ToolTip from '../../atom/tooltip';\nimport Provider from '../../atom/provider';\nimport CatalogSection from '../../atom/catalog-section';\nimport style from './style.css';\n\nconst DisciplineAssociatedSkills = (props, context) => {\n const {translate} = context;\n\n const {skills = [], skillsBaseUrl, onSkillClick} = props;\n\n const hrefFormat = useCallback(\n skill => (skillsBaseUrl ? `${skillsBaseUrl}/${skill.ref}` : ''),\n [skillsBaseUrl]\n );\n\n const AnchorElement = useCallback(\n skill => (\n <div className={style.chipFocusedContent}>\n {skill.focused ? (\n <Icon\n iconName=\"bullseye-arrow\"\n size={{\n faSize: 12,\n wrapperSize: 12\n }}\n />\n ) : null}\n <div className={style.chipFocusedContentText}>{skill.locale}</div>\n </div>\n ),\n []\n );\n\n const TooltipContentElement = useCallback(\n skill => (\n <div className={style.tooltipContentWrapper}>\n {skill.focused ? (\n <div>\n <b>{translate('skill_focused_chip_tooltip')}</b>\n </div>\n ) : null}\n <div>{skill.locale}</div>\n </div>\n ),\n []\n );\n\n return !isEmpty(skills) ? (\n <div data-name=\"discipline-associated-skills\" className={style.associatedSkillsWrapper}>\n <CatalogSection title={translate('associated_skills')}>\n <div className={style.chipsWrapper}>\n {skills.map(skill => {\n function handleSkillClick(event) {\n if (!skillsBaseUrl) event.preventDefault();\n onSkillClick();\n }\n function handleAnchorElement() {\n return AnchorElement(skill);\n }\n function handleTooltipContentElement() {\n return TooltipContentElement(skill);\n }\n return (\n <a\n href={hrefFormat(skill)}\n key={uniqueId()}\n className={classnames(style.chipWrapper, skill.focused && style.chipWrapperFocused)}\n onClick={handleSkillClick}\n >\n <ToolTip\n AnchorElement={handleAnchorElement}\n fontSize={12}\n delayHide={0}\n iconContainerClassName={style.infoIconTooltip}\n tooltipClassName={skill.focused ? style.tooltipSkillFocused : style.tooltip}\n TooltipContent={handleTooltipContentElement}\n closeToolTipInformationTextAriaLabel={translate('close_tooltip_information')}\n />\n </a>\n );\n })}\n </div>\n </CatalogSection>\n </div>\n ) : null;\n};\n\nDisciplineAssociatedSkills.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nDisciplineAssociatedSkills.propTypes = {\n skills: PropTypes.arrayOf(\n PropTypes.shape({\n ref: PropTypes.string,\n locale: PropTypes.string,\n focused: PropTypes.bool\n })\n ),\n skillsBaseUrl: PropTypes.string,\n onSkillClick: PropTypes.func\n};\n\nexport default DisciplineAssociatedSkills;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA,MAAMA,0BAA0B,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACrD,MAAM;IAACC;EAAD,IAAcD,OAApB;EAEA,MAAM;IAACE,MAAM,GAAG,EAAV;IAAcC,aAAd;IAA6BC;EAA7B,IAA6CL,KAAnD;EAEA,MAAMM,UAAU,GAAG,IAAAC,kBAAA,EACjBC,KAAK,IAAKJ,aAAa,GAAI,GAAEA,aAAc,IAAGI,KAAK,CAACC,GAAI,EAAjC,GAAqC,EAD3C,EAEjB,CAACL,aAAD,CAFiB,CAAnB;EAKA,MAAMM,aAAa,GAAG,IAAAH,kBAAA,EACpBC,KAAK,iBACH;IAAK,SAAS,EAAEG,cAAA,CAAMC;EAAtB,GACGJ,KAAK,CAACK,OAAN,gBACC,6BAAC,aAAD;IACE,QAAQ,EAAC,gBADX;IAEE,IAAI,EAAE;MACJC,MAAM,EAAE,EADJ;MAEJC,WAAW,EAAE;IAFT;EAFR,EADD,GAQG,IATN,eAUE;IAAK,SAAS,EAAEJ,cAAA,CAAMK;EAAtB,GAA+CR,KAAK,CAACS,MAArD,CAVF,CAFkB,EAepB,EAfoB,CAAtB;EAkBA,MAAMC,qBAAqB,GAAG,IAAAX,kBAAA,EAC5BC,KAAK,iBACH;I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C,EAAEzB,SAAS,CAAC,2BAAD;IAPjD,EANF,CADF;EAkBD,CA7BA,CADH,CADF,CADF,CADK,GAqCH,IArCJ;AAsCD,CAhFD;;AAkFAH,0BAA0B,CAACmC,YAA3B,GAA0C;EACxChC,SAAS,EAAEiC,iBAAA,CAASC,iBAAT,CAA2BlC;AADE,CAA1C;AAIAH,0BAA0B,CAACsC,SAA3B,2CAAuC;EACrClC,MAAM,EAAEmC,kBAAA,CAAUC,OAAV,CACND,kBAAA,CAAUE,KAAV,CAAgB;IACd/B,GAAG,EAAE6B,kBAAA,CAAUG,MADD;IAEdxB,MAAM,EAAEqB,kBAAA,CAAUG,MAFJ;IAGd5B,OAAO,EAAEyB,kBAAA,CAAUI;EAHL,CAAhB,CADM,CAD6B;EAQrCtC,aAAa,EAAEkC,kBAAA,CAAUG,MARY;EASrCpC,YAAY,EAAEiC,kBAAA,CAAUK;AATa,CAAvC;eAYe5C,0B"}
@@ -3,7 +3,9 @@
3
3
  @value desktop from breakpoints;
4
4
  @value mobile from breakpoints;
5
5
  @value cm_grey_100 from colors;
6
+ @value cm_grey_150 from colors;
6
7
  @value cm_grey_200 from colors;
8
+ @value cm_grey_500 from colors;
7
9
  @value cm_grey_700 from colors;
8
10
 
9
11
  .associatedSkillsWrapper {
@@ -20,18 +22,35 @@
20
22
  width: fit-content;
21
23
  border-radius: 8px;
22
24
  padding: 4px 8px;
23
- background-color: cm_grey_200;
24
- color: cm_grey_700;
25
+ background-color: cm_grey_150;
26
+ color: cm_grey_500;
25
27
  font-family: 'Gilroy';
26
28
  font-style: normal;
27
29
  font-weight: 600;
28
30
  line-height: 20px;
29
31
  font-size: 14px;
32
+ cursor: pointer;
33
+ }
34
+
35
+ .chipWrapper:hover {
36
+ background-color: cm_grey_200;
37
+ color: cm_grey_700;
30
38
  }
31
39
 
32
40
  .chipWrapperFocused {
33
41
  background-color: #DDD1FF;
34
- color: #3900D6;
42
+ color: #4B0AFF;
43
+ svg {
44
+ color: #4B0AFF;
45
+ }
46
+ }
47
+
48
+ .chipWrapperFocused:hover {
49
+ background-color: #B89EFF;
50
+ color: #2B00A3;
51
+ svg {
52
+ color: #2B00A3;
53
+ }
35
54
  }
36
55
 
37
56
  .chipFocusedContent {
@@ -42,6 +61,7 @@
42
61
 
43
62
  div {
44
63
  padding: 0 !important;
64
+ background-color: transparent;
45
65
  }
46
66
  }
47
67
 
@@ -273,6 +273,7 @@ declare namespace PlayerLoading {
273
273
  onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
274
274
  useButtonTag: PropTypes.Requireable<boolean>;
275
275
  style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
276
+ disabled: PropTypes.Requireable<boolean>;
276
277
  }>>;
277
278
  }>>;
278
279
  }
@@ -324,6 +324,7 @@ declare namespace SlidePlayer {
324
324
  onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
325
325
  useButtonTag: PropTypes.Requireable<boolean>;
326
326
  style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
327
+ disabled: PropTypes.Requireable<boolean>;
327
328
  }>>;
328
329
  }>>;
329
330
  }>>;
@@ -596,6 +597,7 @@ declare namespace SlidePlayer {
596
597
  onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
597
598
  useButtonTag: PropTypes.Requireable<boolean>;
598
599
  style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
600
+ disabled: PropTypes.Requireable<boolean>;
599
601
  }>>;
600
602
  }>>;
601
603
  }
@@ -330,6 +330,7 @@ declare namespace SlidesPlayer {
330
330
  onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
331
331
  useButtonTag: PropTypes.Requireable<boolean>;
332
332
  style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
333
+ disabled: PropTypes.Requireable<boolean>;
333
334
  }>>;
334
335
  }>>;
335
336
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/template/app-player/player/slides/index.js"],"names":[],"mappings":";AA+aA,qEAkB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AA1ID;;uBAyBC;;;;;;;;;;;;;;;;;;;;;;;;;AArPD;;;gBAaC;;;;;;;;;;;;;AAyDD;;;;gBAEC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAlHD,oEAQC;;;;;;;;;AAgND;;gBAiBC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA/GD,qEAaC"}
@@ -38,6 +38,7 @@ declare class PopinCorrection extends React.Component<any, any, any> {
38
38
  onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
39
39
  useButtonTag: PropTypes.Requireable<boolean>;
40
40
  style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
41
+ disabled: PropTypes.Requireable<boolean>;
41
42
  }>>;
42
43
  type: PropTypes.Validator<string>;
43
44
  extraLifeGranted: PropTypes.Requireable<boolean>;
@@ -86,6 +87,7 @@ declare class PopinCorrection extends React.Component<any, any, any> {
86
87
  onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
87
88
  useButtonTag: PropTypes.Requireable<boolean>;
88
89
  style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
90
+ disabled: PropTypes.Requireable<boolean>;
89
91
  }>>;
90
92
  }>>;
91
93
  onOpen: PropTypes.Requireable<(...args: any[]) => any>;
@@ -358,6 +360,7 @@ declare class PopinCorrection extends React.Component<any, any, any> {
358
360
  onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
359
361
  useButtonTag: PropTypes.Requireable<boolean>;
360
362
  style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
363
+ disabled: PropTypes.Requireable<boolean>;
361
364
  }>>;
362
365
  }>>;
363
366
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/app-player/popin-correction/index.js"],"names":[],"mappings":";AAmGA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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