@coorpacademy/components 11.32.48 → 11.32.50

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 (83) hide show
  1. package/es/atom/input-switch/style.css +9 -1
  2. package/es/molecule/banner/index.d.ts +5 -4
  3. package/es/molecule/banner/index.d.ts.map +1 -1
  4. package/es/molecule/banner/index.js +93 -37
  5. package/es/molecule/banner/index.js.map +1 -1
  6. package/es/molecule/banner/style.css +27 -5
  7. package/es/molecule/progress-wrapper/style.css +2 -10
  8. package/es/template/back-office/brand-update/index.d.ts +5 -4
  9. package/es/template/certification-detail/index.js +2 -2
  10. package/es/template/certification-detail/index.js.map +1 -1
  11. package/es/template/playlist-detail/index.d.ts +1 -0
  12. package/es/template/playlist-detail/index.d.ts.map +1 -1
  13. package/es/template/playlist-detail/index.js +6 -3
  14. package/es/template/playlist-detail/index.js.map +1 -1
  15. package/es/template/skill-detail/all-courses.css +4 -0
  16. package/es/template/skill-detail/all-courses.d.ts +1 -0
  17. package/es/template/skill-detail/all-courses.d.ts.map +1 -1
  18. package/es/template/skill-detail/all-courses.js +16 -3
  19. package/es/template/skill-detail/all-courses.js.map +1 -1
  20. package/es/template/skill-detail/index.d.ts +1 -0
  21. package/es/template/skill-detail/index.d.ts.map +1 -1
  22. package/es/template/skill-detail/index.js +6 -3
  23. package/es/template/skill-detail/index.js.map +1 -1
  24. package/es/variables/colors.d.ts +3 -0
  25. package/es/variables/colors.d.ts.map +1 -1
  26. package/es/variables/colors.js +3 -0
  27. package/es/variables/colors.js.map +1 -1
  28. package/lib/atom/input-switch/style.css +9 -1
  29. package/lib/molecule/banner/index.d.ts +5 -4
  30. package/lib/molecule/banner/index.d.ts.map +1 -1
  31. package/lib/molecule/banner/index.js +105 -38
  32. package/lib/molecule/banner/index.js.map +1 -1
  33. package/lib/molecule/banner/style.css +27 -5
  34. package/lib/molecule/progress-wrapper/style.css +2 -10
  35. package/lib/template/back-office/brand-update/index.d.ts +5 -4
  36. package/lib/template/certification-detail/index.js +2 -2
  37. package/lib/template/certification-detail/index.js.map +1 -1
  38. package/lib/template/playlist-detail/index.d.ts +1 -0
  39. package/lib/template/playlist-detail/index.d.ts.map +1 -1
  40. package/lib/template/playlist-detail/index.js +6 -3
  41. package/lib/template/playlist-detail/index.js.map +1 -1
  42. package/lib/template/skill-detail/all-courses.css +4 -0
  43. package/lib/template/skill-detail/all-courses.d.ts +1 -0
  44. package/lib/template/skill-detail/all-courses.d.ts.map +1 -1
  45. package/lib/template/skill-detail/all-courses.js +17 -3
  46. package/lib/template/skill-detail/all-courses.js.map +1 -1
  47. package/lib/template/skill-detail/index.d.ts +1 -0
  48. package/lib/template/skill-detail/index.d.ts.map +1 -1
  49. package/lib/template/skill-detail/index.js +6 -3
  50. package/lib/template/skill-detail/index.js.map +1 -1
  51. package/lib/variables/colors.d.ts +3 -0
  52. package/lib/variables/colors.d.ts.map +1 -1
  53. package/lib/variables/colors.js +3 -0
  54. package/lib/variables/colors.js.map +1 -1
  55. package/locales/bs/global.json +2 -0
  56. package/locales/cs/global.json +2 -0
  57. package/locales/de/global.json +2 -0
  58. package/locales/en/global.json +2 -0
  59. package/locales/es/global.json +2 -0
  60. package/locales/et/global.json +2 -0
  61. package/locales/fi/global.json +2 -0
  62. package/locales/fr/global.json +2 -0
  63. package/locales/hr/global.json +2 -0
  64. package/locales/hu/global.json +2 -0
  65. package/locales/hy/global.json +2 -0
  66. package/locales/it/global.json +2 -0
  67. package/locales/ja/global.json +2 -0
  68. package/locales/ko/global.json +2 -0
  69. package/locales/nl/global.json +2 -0
  70. package/locales/pl/global.json +2 -0
  71. package/locales/pt/global.json +2 -0
  72. package/locales/ro/global.json +2 -0
  73. package/locales/ru/global.json +2 -0
  74. package/locales/sk/global.json +2 -0
  75. package/locales/sl/global.json +2 -0
  76. package/locales/sv/global.json +2 -0
  77. package/locales/tl/global.json +2 -0
  78. package/locales/tr/global.json +2 -0
  79. package/locales/uk/global.json +2 -0
  80. package/locales/vi/global.json +2 -0
  81. package/locales/zh/global.json +2 -0
  82. package/locales/zh_TW/global.json +2 -0
  83. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"all-courses.js","names":["React","useState","useCallback","useMemo","PropTypes","Provider","Select","SelectOptionPropTypes","ButtonLink","SearchForm","CardsGrid","searchValueIncluded","InputSwitch","style","uncappedMap","convert","cap","FilterButton","props","context","dataName","ariaLabel","selected","label","onClick","skin","primarySkinColor","buttonProps","customStyle","backgroundColor","color","transition","width","contextTypes","childContextTypes","translate","propTypes","string","bool","func","AllCourses","content","filters","sorting","totalContents","options","onChange","list","loading","showCompleted","setShowCompleted","searchValue","setSearchValue","sortView","undefined","filteredContent","course","progress","contentResult","skill","title","handleSearch","value","handleSearchReset","handleShowCompletedToggle","prevShowCompleted","continueLearningWrapper","continueLearningTitle","continueLearningNumber","searchAndSortSection","searchWrapper","placeholder","sortSection","sortWrapper","filterWrapper","filterProps","index","name","handleFilterChange","filterButtonWrapper","divider","justifyContent","emptySearchResultContainer","emptySearchResultTitle","emptySearchResultDescription","emptySearchResultClearSearch","shape","number","arrayOf"],"sources":["../../../src/template/skill-detail/all-courses.js"],"sourcesContent":["import React, {useState, useCallback, useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {get, filter, map, size, isNil} from 'lodash/fp';\nimport Provider from '../../atom/provider';\nimport Select, {SelectOptionPropTypes} from '../../atom/select';\nimport ButtonLink from '../../atom/button-link';\nimport SearchForm from '../../molecule/search-form';\nimport CardsGrid from '../../organism/cards-grid';\nimport searchValueIncluded from '../../util/search-value-included';\nimport InputSwitch from '../../atom/input-switch';\nimport style from './all-courses.css';\n\nconst uncappedMap = map.convert({cap: false});\n\nconst FilterButton = (props, context) => {\n const {dataName, ariaLabel, selected, label, onClick} = props;\n const {skin} = context;\n const primarySkinColor = get('common.primary', skin);\n\n const buttonProps = {\n customStyle: {\n backgroundColor: selected ? primarySkinColor : '#E1E1E3',\n color: selected ? '#FFFFFF' : '#515161',\n transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out',\n width: 'fit-content'\n },\n label,\n onClick,\n 'data-name': dataName,\n 'aria-label': ariaLabel\n };\n\n return <ButtonLink {...buttonProps} />;\n};\n\nFilterButton.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nFilterButton.propTypes = {\n dataName: PropTypes.string,\n ariaLabel: PropTypes.string,\n selected: PropTypes.bool,\n label: PropTypes.string,\n onClick: PropTypes.func\n};\n\nconst AllCourses = (props, context) => {\n const {content, filters, sorting, totalContents} = props;\n const {options, onChange} = filters;\n const {list, loading} = content;\n const {translate} = context;\n const [showCompleted, setShowCompleted] = useState(true);\n const [searchValue, setSearchValue] = useState('');\n\n const sortView =\n sorting !== undefined ? (\n <div data-name=\"choice\">\n <Select {...sorting} aria-label=\"All courses sort\" />\n </div>\n ) : null;\n\n const filteredContent = useMemo(() => {\n return showCompleted ? list : filter(course => course.progress < 1, list);\n }, [list, showCompleted]);\n\n const contentResult = useMemo(() => {\n return filter(skill => searchValueIncluded(skill.title, searchValue), filteredContent);\n }, [filteredContent, searchValue]);\n\n const handleSearch = useCallback(\n value => {\n setSearchValue(value);\n },\n [setSearchValue]\n );\n\n const handleSearchReset = useCallback(() => {\n setSearchValue('');\n }, [setSearchValue]);\n\n const handleShowCompletedToggle = useCallback(() => {\n setShowCompleted(prevShowCompleted => !prevShowCompleted);\n }, []);\n\n return (\n <>\n <div className={style.continueLearningWrapper}>\n <span className={style.continueLearningTitle}>{translate('all_content')}</span>\n <span className={style.continueLearningNumber}>\n {isNil(totalContents) ? size(contentResult) : totalContents}\n </span>\n </div>\n <div className={style.searchAndSortSection}>\n <div className={style.searchWrapper}>\n <SearchForm\n search={{\n placeholder: translate('search_place_holder'),\n value: searchValue,\n onChange: handleSearch\n }}\n onReset={handleSearchReset}\n dataTestId=\"all-courses-search-input\"\n />\n </div>\n <div className={style.sortSection}>\n <InputSwitch\n id={'show-completed-courses-switch'}\n type=\"switch\"\n name={translate('show_completed')}\n title={translate('show_completed')}\n aria-label={'Show completed courses aria label'}\n value={showCompleted}\n onChange={handleShowCompletedToggle}\n />\n {sortView ? (\n <div className={style.sortWrapper}>\n {translate('sort_by')}\n {sortView}\n </div>\n ) : null}\n </div>\n </div>\n <div className={style.filterWrapper}>\n {size(options) > 2\n ? uncappedMap((filterProps, index) => {\n const {name, value, selected} = filterProps;\n\n function handleFilterChange() {\n onChange(value);\n }\n\n return (\n <div key={index} className={style.filterButtonWrapper}>\n <FilterButton\n dataName={`filter-button-${value}`}\n ariaLabel={`Filter by ${name}`}\n selected={selected}\n label={name}\n onClick={handleFilterChange}\n />\n {value === 'ALL' ? <div className={style.divider} /> : null}\n </div>\n );\n }, options)\n : null}\n </div>\n <div>\n {size(contentResult) ? (\n <CardsGrid\n list={contentResult}\n loading={loading}\n customStyle={{justifyContent: 'left'}}\n />\n ) : (\n <div className={style.emptySearchResultContainer}>\n <div className={style.emptySearchResultTitle}>\n {translate('empty_search_result_title', {searchValue})}\n </div>\n <div className={style.emptySearchResultDescription}>\n {translate('empty_search_result_description')}\n </div>\n <div className={style.emptySearchResultClearSearch} onClick={handleSearchReset}>\n {translate('empty_search_result_clear_search')}\n </div>\n </div>\n )}\n </div>\n </>\n );\n};\n\nAllCourses.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nAllCourses.propTypes = {\n content: PropTypes.shape(CardsGrid.propTypes),\n totalContents: 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};\n\nexport default AllCourses;\n"],"mappings":";;;;;;;;AAAA,OAAOA,KAAP,IAAeC,QAAf,EAAyBC,WAAzB,EAAsCC,OAAtC,QAAoD,OAApD;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,MAA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CADZ,CAPF,CARJ,CA7DF,CADF;AAqFD,CA3HD;;AA6HAK,UAAU,CAACP,YAAX,GAA0B;EACxBR,IAAI,EAAEpB,QAAQ,CAAC6B,iBAAT,CAA2BT,IADT;EAExBU,SAAS,EAAE9B,QAAQ,CAAC6B,iBAAT,CAA2BC;AAFd,CAA1B;AAKAK,UAAU,CAACJ,SAAX,2CAAuB;EACrBK,OAAO,EAAErC,SAAS,CAACkF,KAAV,CAAgB5E,SAAS,CAAC0B,SAA1B,CADY;EAErBQ,aAAa,EAAExC,SAAS,CAACmF,MAFJ;EAGrB7C,OAAO,EAAEtC,SAAS,CAACkF,KAAV,CAAgB;IACvBxC,QAAQ,EAAE1C,SAAS,CAACmC,IADG;IAEvBM,OAAO,EAAEzC,SAAS,CAACoF,OAAV,CAAkBpF,SAAS,CAACkF,KAAV,CAAgB/E,qBAAhB,CAAlB;EAFc,CAAhB,CAHY;EAOrBoC,OAAO,EAAEvC,SAAS,CAACkF,KAAV,CAAgBhF,MAAM,CAAC8B,SAAvB;AAPY,CAAvB;AAUA,eAAeI,UAAf"}
1
+ {"version":3,"file":"all-courses.js","names":["React","useState","useCallback","useMemo","PropTypes","Provider","Select","SelectOptionPropTypes","ButtonLink","SearchForm","CardsGrid","searchValueIncluded","InputSwitch","Banner","style","uncappedMap","convert","cap","FilterButton","props","context","dataName","ariaLabel","selected","label","onClick","skin","primarySkinColor","buttonProps","customStyle","backgroundColor","color","transition","width","contextTypes","childContextTypes","translate","propTypes","string","bool","func","AllCourses","content","filters","sorting","totalContents","bannerMicrolearningRuleAction","options","onChange","list","loading","showCompleted","setShowCompleted","searchValue","setSearchValue","sortView","undefined","filteredContent","course","progress","contentResult","skill","title","handleSearch","value","handleSearchReset","handleShowCompletedToggle","prevShowCompleted","continueLearningWrapper","continueLearningTitle","continueLearningNumber","searchAndSortSection","searchWrapper","placeholder","sortSection","sortWrapper","bannerWrapper","type","action","filterWrapper","filterProps","index","name","handleFilterChange","filterButtonWrapper","divider","justifyContent","emptySearchResultContainer","emptySearchResultTitle","emptySearchResultDescription","emptySearchResultClearSearch","shape","number","arrayOf"],"sources":["../../../src/template/skill-detail/all-courses.js"],"sourcesContent":["import React, {useState, useCallback, useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {get, filter, map, size, isNil} from 'lodash/fp';\nimport Provider from '../../atom/provider';\nimport Select, {SelectOptionPropTypes} from '../../atom/select';\nimport ButtonLink from '../../atom/button-link';\nimport SearchForm from '../../molecule/search-form';\nimport CardsGrid from '../../organism/cards-grid';\nimport searchValueIncluded from '../../util/search-value-included';\nimport InputSwitch from '../../atom/input-switch';\nimport Banner from '../../molecule/banner';\nimport style from './all-courses.css';\n\nconst uncappedMap = map.convert({cap: false});\n\nconst FilterButton = (props, context) => {\n const {dataName, ariaLabel, selected, label, onClick} = props;\n const {skin} = context;\n const primarySkinColor = get('common.primary', skin);\n\n const buttonProps = {\n customStyle: {\n backgroundColor: selected ? primarySkinColor : '#E1E1E3',\n color: selected ? '#FFFFFF' : '#515161',\n transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out',\n width: 'fit-content'\n },\n label,\n onClick,\n 'data-name': dataName,\n 'aria-label': ariaLabel\n };\n\n return <ButtonLink {...buttonProps} />;\n};\n\nFilterButton.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nFilterButton.propTypes = {\n dataName: PropTypes.string,\n ariaLabel: PropTypes.string,\n selected: PropTypes.bool,\n label: PropTypes.string,\n onClick: PropTypes.func\n};\n\nconst AllCourses = (props, context) => {\n const {content, filters, sorting, totalContents, bannerMicrolearningRuleAction} = props;\n const {options, onChange} = filters;\n const {list, loading} = content;\n const {translate} = context;\n const [showCompleted, setShowCompleted] = useState(true);\n const [searchValue, setSearchValue] = useState('');\n\n const sortView =\n sorting !== undefined ? (\n <div data-name=\"choice\">\n <Select {...sorting} aria-label=\"All courses sort\" />\n </div>\n ) : null;\n\n const filteredContent = useMemo(() => {\n return showCompleted ? list : filter(course => course.progress < 1, list);\n }, [list, showCompleted]);\n\n const contentResult = useMemo(() => {\n return filter(skill => searchValueIncluded(skill.title, searchValue), filteredContent);\n }, [filteredContent, searchValue]);\n\n const handleSearch = useCallback(\n value => {\n setSearchValue(value);\n },\n [setSearchValue]\n );\n\n const handleSearchReset = useCallback(() => {\n setSearchValue('');\n }, [setSearchValue]);\n\n const handleShowCompletedToggle = useCallback(() => {\n setShowCompleted(prevShowCompleted => !prevShowCompleted);\n }, []);\n\n return (\n <>\n <div className={style.continueLearningWrapper}>\n <span className={style.continueLearningTitle}>{translate('all_content')}</span>\n <span className={style.continueLearningNumber}>\n {isNil(totalContents) ? size(contentResult) : totalContents}\n </span>\n </div>\n <div className={style.searchAndSortSection}>\n <div className={style.searchWrapper}>\n <SearchForm\n search={{\n placeholder: translate('search_place_holder'),\n value: searchValue,\n onChange: handleSearch\n }}\n onReset={handleSearchReset}\n dataTestId=\"all-courses-search-input\"\n />\n </div>\n <div className={style.sortSection}>\n <InputSwitch\n id={'show-completed-courses-switch'}\n type=\"switch\"\n name={translate('show_completed')}\n title={translate('show_completed')}\n aria-label={'Show completed courses aria label'}\n value={showCompleted}\n onChange={handleShowCompletedToggle}\n />\n {sortView ? (\n <div className={style.sortWrapper}>\n {translate('sort_by')}\n {sortView}\n </div>\n ) : null}\n </div>\n </div>\n {bannerMicrolearningRuleAction ? (\n <div className={style.bannerWrapper}>\n <Banner\n type=\"info\"\n message={translate('banner_microlearning_rule_message')}\n cta={[\n {\n type: 'switch',\n label: translate('banner_microlearning_rule_label'),\n action: bannerMicrolearningRuleAction\n }\n ]}\n />\n </div>\n ) : null}\n <div className={style.filterWrapper}>\n {size(options) > 2\n ? uncappedMap((filterProps, index) => {\n const {name, value, selected} = filterProps;\n\n function handleFilterChange() {\n onChange(value);\n }\n\n return (\n <div key={index} className={style.filterButtonWrapper}>\n <FilterButton\n dataName={`filter-button-${value}`}\n ariaLabel={`Filter by ${name}`}\n selected={selected}\n label={name}\n onClick={handleFilterChange}\n />\n {value === 'ALL' ? <div className={style.divider} /> : null}\n </div>\n );\n }, options)\n : null}\n </div>\n <div>\n {size(contentResult) ? (\n <CardsGrid\n list={contentResult}\n loading={loading}\n customStyle={{justifyContent: 'left'}}\n />\n ) : (\n <div className={style.emptySearchResultContainer}>\n <div className={style.emptySearchResultTitle}>\n {translate('empty_search_result_title', {searchValue})}\n </div>\n <div className={style.emptySearchResultDescription}>\n {translate('empty_search_result_description')}\n </div>\n <div className={style.emptySearchResultClearSearch} onClick={handleSearchReset}>\n {translate('empty_search_result_clear_search')}\n </div>\n </div>\n )}\n </div>\n </>\n );\n};\n\nAllCourses.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nAllCourses.propTypes = {\n content: PropTypes.shape(CardsGrid.propTypes),\n totalContents: 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 bannerMicrolearningRuleAction: PropTypes.func\n};\n\nexport default AllCourses;\n"],"mappings":";;;;;;;;AAAA,OAAOA,KAAP,IAAeC,QAAf,EAAyBC,WAAzB,EAAsCC,OAAtC,QAAoD,OAApD;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,MAAP,IAAgBC,qBAAhB,QAA4C,mBAA5C;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,UAAP,MAAuB,4BAAvB;AACA,OAAOC,SAAP,MAAsB,2BAAtB;AACA,OAAOC,mBAAP,MAAgC,kCAAhC;AACA,OAAOC,WAAP,MAAwB,yBAAxB;AACA,OAAOC,MAAP,MAAmB,uBAAnB;AACA,OAAOC,KAAP,MAAkB,mBAAlB;;AAEA,MAAMC,WAAW,GAAG,KAAIC,OAAJ,CAAY;EAACC,GAAG,EAAE;AAAN,CAAZ,CAApB;;AAEA,MAA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D,CADZ,CAPF,CARJ,CA5EF,CADF;AAoGD,CA1ID;;AA4IAK,UAAU,CAACP,YAAX,GAA0B;EACxBR,IAAI,EAAErB,QAAQ,CAAC8B,iBAAT,CAA2BT,IADT;EAExBU,SAAS,EAAE/B,QAAQ,CAAC8B,iBAAT,CAA2BC;AAFd,CAA1B;AAKAK,UAAU,CAACJ,SAAX,2CAAuB;EACrBK,OAAO,EAAEtC,SAAS,CAACuF,KAAV,CAAgBjF,SAAS,CAAC2B,SAA1B,CADY;EAErBQ,aAAa,EAAEzC,SAAS,CAACwF,MAFJ;EAGrBjD,OAAO,EAAEvC,SAAS,CAACuF,KAAV,CAAgB;IACvB3C,QAAQ,EAAE5C,SAAS,CAACoC,IADG;IAEvBO,OAAO,EAAE3C,SAAS,CAACyF,OAAV,CAAkBzF,SAAS,CAACuF,KAAV,CAAgBpF,qBAAhB,CAAlB;EAFc,CAAhB,CAHY;EAOrBqC,OAAO,EAAExC,SAAS,CAACuF,KAAV,CAAgBrF,MAAM,CAAC+B,SAAvB,CAPY;EAQrBS,6BAA6B,EAAE1C,SAAS,CAACoC;AARpB,CAAvB;AAWA,eAAeC,UAAf"}
@@ -123,6 +123,7 @@ declare namespace SkillDetail {
123
123
  export const onBackClick: PropTypes.Requireable<(...args: any[]) => any>;
124
124
  export const onReviewClick: PropTypes.Requireable<(...args: any[]) => any>;
125
125
  export const onContinueLearningClick: PropTypes.Requireable<(...args: any[]) => any>;
126
+ export const bannerMicrolearningRuleAction: PropTypes.Requireable<(...args: any[]) => any>;
126
127
  }
127
128
  export { propTypes_1 as propTypes };
128
129
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/skill-detail/index.js"],"names":[],"mappings":"AAeO,8EA+BN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYD,oEAmJC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/skill-detail/index.js"],"names":[],"mappings":"AAeO,8EA+BN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYD,oEAqJC"}
@@ -69,7 +69,8 @@ const SkillDetail = (props, context) => {
69
69
  sorting,
70
70
  onBackClick,
71
71
  onReviewClick,
72
- onContinueLearningClick
72
+ onContinueLearningClick,
73
+ bannerMicrolearningRuleAction = null
73
74
  } = props;
74
75
  const descriptionRef = useRef(null);
75
76
  const {
@@ -175,7 +176,8 @@ const SkillDetail = (props, context) => {
175
176
  content: skillIncludedCourses,
176
177
  filters: filters,
177
178
  sorting: sorting,
178
- totalContents: totalContents
179
+ totalContents: totalContents,
180
+ bannerMicrolearningRuleAction: bannerMicrolearningRuleAction
179
181
  })));
180
182
  };
181
183
 
@@ -203,7 +205,8 @@ SkillDetail.propTypes = process.env.NODE_ENV !== "production" ? {
203
205
  sorting: PropTypes.shape(Select.propTypes),
204
206
  onBackClick: PropTypes.func,
205
207
  onReviewClick: PropTypes.func,
206
- onContinueLearningClick: PropTypes.func
208
+ onContinueLearningClick: PropTypes.func,
209
+ bannerMicrolearningRuleAction: PropTypes.func
207
210
  } : {};
208
211
  export default SkillDetail;
209
212
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","useCallback","useState","useRef","useEffect","PropTypes","convert","classnames","Markdown","Provider","Select","SelectOptionPropTypes","ButtonLink","ButtonLinkIcon","Icon","CardsGrid","style","AllCourses","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","skillIncludedCourses","filters","sorting","onBackClick","onReviewClick","onContinueLearningClick","descriptionRef","score","questionsToReview","totalContents","isDescriptionTruncated","setIsDescriptionTruncated","showMore","setShowMore","handleShowMore","current","clientHeight","scrollHeight","Description","truncate","ProgressBar","undefined","progressBarColor","inlineProgressValueStyle","progressBarWrapper","progress","backgroundContainer","container","backButton","ctaContainer","skillFocusBadge","faSize","wrapperSize","showMoreWrapper","ctaWrapper","skillInformation","skillInformationNumber","progressContainer","progressInformationNumber","toFixed","string","isRequired","shape","number","onChange","options","arrayOf"],"sources":["../../../src/template/skill-detail/index.js"],"sourcesContent":["import React, {useCallback, useState, useRef, useEffect} from 'react';\nimport PropTypes from 'prop-types';\nimport {convert} from 'css-color-function';\nimport classnames from 'classnames';\nimport {get, isNil} from 'lodash/fp';\nimport Markdown from 'markdown-to-jsx';\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';\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 ongoingCoursesAvailable,\n skillIncludedCourses,\n filters,\n sorting,\n onBackClick,\n onReviewClick,\n onContinueLearningClick\n } = props;\n const descriptionRef = useRef(null);\n const {score = 0, questionsToReview, totalContents} = metrics;\n const {translate} = context;\n\n const [isDescriptionTruncated, setIsDescriptionTruncated] = useState(false);\n const [showMore, setShowMore] = useState(false);\n\n const handleShowMore = useCallback(() => setShowMore(!showMore), [setShowMore, showMore]);\n\n useEffect(() => {\n if (descriptionRef.current) {\n const {clientHeight = 0, scrollHeight = 0} = descriptionRef.current;\n setIsDescriptionTruncated(scrollHeight > clientHeight);\n }\n }, [description]);\n\n const Description = useCallback(() => {\n return (\n <div\n ref={descriptionRef}\n className={classnames(style.description, !showMore && style.truncate)}\n >\n <Markdown>{description}</Markdown>\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 {!isNil(onBackClick) ? (\n <ButtonLinkIcon\n faIcon=\"arrow-left\"\n data-name=\"back-button\"\n aria-label={translate('back')}\n onClick={onBackClick}\n className={style.backButton}\n tooltipPlacement=\"right\"\n />\n ) : null}\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 {isDescriptionTruncated ? (\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={ongoingCoursesAvailable}\n onClick={onContinueLearningClick}\n />\n </div>\n </div>\n {questionsToReview > 0 ? (\n <div className={style.skillInformation} data-name=\"skill-questions\">\n <span className={style.skillInformationNumber}>{questionsToReview}</span>\n &nbsp;{translate('skill_chart_side_panel_questions_to_review')}\n </div>\n ) : null}\n <div className={style.progressContainer}>\n <ProgressBar />\n <span className={style.progressInformationNumber}>{score.toFixed(1)}%</span>\n </div>\n <AllCourses\n content={skillIncludedCourses}\n filters={filters}\n sorting={sorting}\n totalContents={totalContents}\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 questionsToReview: PropTypes.number,\n totalContents: PropTypes.number\n }),\n focused: PropTypes.bool,\n availableForReview: PropTypes.bool,\n ongoingCoursesAvailable: PropTypes.bool,\n skillIncludedCourses: PropTypes.shape(CardsGrid.propTypes),\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,EAAsCC,MAAtC,EAA8CC,SAA9C,QAA8D,OAA9D;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SAAQC,O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CAACmF,KAAV,CAAgB7E,qBAAhB,CAAlB;EAFc,CAAhB,CAba;EAiBtBqC,OAAO,EAAE3C,SAAS,CAACmF,KAAV,CAAgB9E,MAAM,CAAC0B,SAAvB,CAjBa;EAkBtBa,WAAW,EAAE5C,SAAS,CAACiC,IAlBD;EAmBtBY,aAAa,EAAE7C,SAAS,CAACiC,IAnBH;EAoBtBa,uBAAuB,EAAE9C,SAAS,CAACiC;AApBb,CAAxB;AAuBA,eAAeC,WAAf"}
1
+ {"version":3,"file":"index.js","names":["React","useCallback","useState","useRef","useEffect","PropTypes","convert","classnames","Markdown","Provider","Select","SelectOptionPropTypes","ButtonLink","ButtonLinkIcon","Icon","CardsGrid","style","AllCourses","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","skillIncludedCourses","filters","sorting","onBackClick","onReviewClick","onContinueLearningClick","bannerMicrolearningRuleAction","descriptionRef","score","questionsToReview","totalContents","isDescriptionTruncated","setIsDescriptionTruncated","showMore","setShowMore","handleShowMore","current","clientHeight","scrollHeight","Description","truncate","ProgressBar","undefined","progressBarColor","inlineProgressValueStyle","progressBarWrapper","progress","backgroundContainer","container","backButton","ctaContainer","skillFocusBadge","faSize","wrapperSize","showMoreWrapper","ctaWrapper","skillInformation","skillInformationNumber","progressContainer","progressInformationNumber","toFixed","string","isRequired","shape","number","onChange","options","arrayOf"],"sources":["../../../src/template/skill-detail/index.js"],"sourcesContent":["import React, {useCallback, useState, useRef, useEffect} from 'react';\nimport PropTypes from 'prop-types';\nimport {convert} from 'css-color-function';\nimport classnames from 'classnames';\nimport {get, isNil} from 'lodash/fp';\nimport Markdown from 'markdown-to-jsx';\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';\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 ongoingCoursesAvailable,\n skillIncludedCourses,\n filters,\n sorting,\n onBackClick,\n onReviewClick,\n onContinueLearningClick,\n bannerMicrolearningRuleAction = null\n } = props;\n const descriptionRef = useRef(null);\n const {score = 0, questionsToReview, totalContents} = metrics;\n const {translate} = context;\n\n const [isDescriptionTruncated, setIsDescriptionTruncated] = useState(false);\n const [showMore, setShowMore] = useState(false);\n\n const handleShowMore = useCallback(() => setShowMore(!showMore), [setShowMore, showMore]);\n\n useEffect(() => {\n if (descriptionRef.current) {\n const {clientHeight = 0, scrollHeight = 0} = descriptionRef.current;\n setIsDescriptionTruncated(scrollHeight > clientHeight);\n }\n }, [description]);\n\n const Description = useCallback(() => {\n return (\n <div\n ref={descriptionRef}\n className={classnames(style.description, !showMore && style.truncate)}\n >\n <Markdown>{description}</Markdown>\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 {!isNil(onBackClick) ? (\n <ButtonLinkIcon\n faIcon=\"arrow-left\"\n data-name=\"back-button\"\n aria-label={translate('back')}\n onClick={onBackClick}\n className={style.backButton}\n tooltipPlacement=\"right\"\n />\n ) : null}\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 {isDescriptionTruncated ? (\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={ongoingCoursesAvailable}\n onClick={onContinueLearningClick}\n />\n </div>\n </div>\n {questionsToReview > 0 ? (\n <div className={style.skillInformation} data-name=\"skill-questions\">\n <span className={style.skillInformationNumber}>{questionsToReview}</span>\n &nbsp;{translate('skill_chart_side_panel_questions_to_review')}\n </div>\n ) : null}\n <div className={style.progressContainer}>\n <ProgressBar />\n <span className={style.progressInformationNumber}>{score.toFixed(1)}%</span>\n </div>\n <AllCourses\n content={skillIncludedCourses}\n filters={filters}\n sorting={sorting}\n totalContents={totalContents}\n bannerMicrolearningRuleAction={bannerMicrolearningRuleAction}\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 questionsToReview: PropTypes.number,\n totalContents: PropTypes.number\n }),\n focused: PropTypes.bool,\n availableForReview: PropTypes.bool,\n ongoingCoursesAvailable: PropTypes.bool,\n skillIncludedCourses: PropTypes.shape(CardsGrid.propTypes),\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 bannerMicrolearningRuleAction: PropTypes.func\n};\n\nexport default SkillDetail;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,WAAf,EAA4BC,QAA5B,EAAsCC,MAAtC,EAA8CC,SAA9C,QAA8D,OAA9D;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SAAQC,OAAR,QAAsB,oBAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,OAAOC,QAAP,MAAqB,iBAArB;AACA,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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,CAACiC,IApBb;EAqBtBc,6BAA6B,EAAE/C,SAAS,CAACiC;AArBnB,CAAxB;AAwBA,eAAeC,WAAf"}
@@ -1,11 +1,14 @@
1
1
  export declare const COLORS: {
2
2
  readonly gray: "#EAEAEB";
3
3
  readonly negative: "#ed3436";
4
+ readonly cm_negative_200: "#B81400";
4
5
  readonly positive: "#35CC7F";
6
+ readonly cm_positive_200: "#05944F";
5
7
  readonly white: "#ffffff";
6
8
  readonly cm_grey_800: "#171721";
7
9
  readonly cm_primary_blue: "#0061FF";
8
10
  readonly cm_grey_500: "#515161";
11
+ readonly cm_yellow_400: "#bd7e00";
9
12
  readonly brand: "#00B0FF";
10
13
  };
11
14
  export declare type Colors = typeof COLORS;
@@ -1 +1 @@
1
- {"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/variables/colors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;CAST,CAAC;AAEX,oBAAY,MAAM,GAAG,OAAO,MAAM,CAAC"}
1
+ {"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/variables/colors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;CAYT,CAAC;AAEX,oBAAY,MAAM,GAAG,OAAO,MAAM,CAAC"}
@@ -1,11 +1,14 @@
1
1
  export const COLORS = {
2
2
  gray: '#EAEAEB',
3
3
  negative: '#ed3436',
4
+ cm_negative_200: '#B81400',
4
5
  positive: '#35CC7F',
6
+ cm_positive_200: '#05944F',
5
7
  white: '#ffffff',
6
8
  cm_grey_800: '#171721',
7
9
  cm_primary_blue: '#0061FF',
8
10
  cm_grey_500: '#515161',
11
+ cm_yellow_400: '#bd7e00',
9
12
  brand: '#00B0FF'
10
13
  };
11
14
  //# sourceMappingURL=colors.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"colors.js","names":["COLORS","gray","negative","positive","white","cm_grey_800","cm_primary_blue","cm_grey_500","brand"],"sources":["../../src/variables/colors.ts"],"sourcesContent":["export const COLORS = {\n gray: '#EAEAEB',\n negative: '#ed3436',\n positive: '#35CC7F',\n white: '#ffffff',\n cm_grey_800: '#171721',\n cm_primary_blue: '#0061FF',\n cm_grey_500: '#515161',\n brand: '#00B0FF'\n} as const;\n\nexport type Colors = typeof COLORS;\n"],"mappings":"AAAA,OAAO,MAAMA,MAAM,GAAG;EACpBC,IAAI,EAAE,SADc;EAEpBC,QAAQ,EAAE,SAFU;EAGpBC,QAAQ,EAAE,SAHU;EAIpBC,KAAK,EAAE,SAJa;EAKpBC,WAAW,EAAE,SALO;EAMpBC,eAAe,EAAE,SANG;EAOpBC,WAAW,EAAE,SAPO;EAQpBC,KAAK,EAAE;AARa,CAAf"}
1
+ {"version":3,"file":"colors.js","names":["COLORS","gray","negative","cm_negative_200","positive","cm_positive_200","white","cm_grey_800","cm_primary_blue","cm_grey_500","cm_yellow_400","brand"],"sources":["../../src/variables/colors.ts"],"sourcesContent":["export const COLORS = {\n gray: '#EAEAEB',\n negative: '#ed3436',\n cm_negative_200: '#B81400',\n positive: '#35CC7F',\n cm_positive_200: '#05944F',\n white: '#ffffff',\n cm_grey_800: '#171721',\n cm_primary_blue: '#0061FF',\n cm_grey_500: '#515161',\n cm_yellow_400: '#bd7e00',\n brand: '#00B0FF'\n} as const;\n\nexport type Colors = typeof COLORS;\n"],"mappings":"AAAA,OAAO,MAAMA,MAAM,GAAG;EACpBC,IAAI,EAAE,SADc;EAEpBC,QAAQ,EAAE,SAFU;EAGpBC,eAAe,EAAE,SAHG;EAIpBC,QAAQ,EAAE,SAJU;EAKpBC,eAAe,EAAE,SALG;EAMpBC,KAAK,EAAE,SANa;EAOpBC,WAAW,EAAE,SAPO;EAQpBC,eAAe,EAAE,SARG;EASpBC,WAAW,EAAE,SATO;EAUpBC,aAAa,EAAE,SAVK;EAWpBC,KAAK,EAAE;AAXa,CAAf"}
@@ -86,6 +86,10 @@
86
86
  left: 30px;
87
87
  }
88
88
 
89
+ .coorpmanager input:checked ~ label::after {
90
+ left: 23px;
91
+ }
92
+
89
93
  .checkbox:disabled ~ label {
90
94
  background: light;
91
95
  pointer-events: none;
@@ -108,6 +112,10 @@
108
112
  min-height: 24px;
109
113
  }
110
114
 
115
+ .coorpmanager .title {
116
+ width: fit-content;
117
+ }
118
+
111
119
  .description {
112
120
  font-family: 'Gilroy';
113
121
  font-weight: 500;
@@ -126,6 +134,7 @@
126
134
  }
127
135
 
128
136
  .coorpmanager label::after, .coorpmanagerModified label::after {
137
+ top: 1px;
129
138
  width: 22px;
130
139
  height: 22px;
131
140
  }
@@ -134,7 +143,6 @@
134
143
  font-family: Gilroy;
135
144
  font-weight: bold;
136
145
  color: black;
137
- min-width: 190px;
138
146
  }
139
147
 
140
148
  .coorpmanager .checkbox:checked ~ label {
@@ -5,10 +5,11 @@ declare namespace Banner {
5
5
  const bannerKey: PropTypes.Requireable<string>;
6
6
  const type: PropTypes.Requireable<string>;
7
7
  const message: PropTypes.Validator<string>;
8
- const firstCTA: PropTypes.Requireable<(...args: any[]) => any>;
9
- const firstCTALabel: PropTypes.Requireable<string>;
10
- const secondCTALabel: PropTypes.Requireable<string>;
11
- const secondCTA: PropTypes.Requireable<(...args: any[]) => any>;
8
+ const cta: PropTypes.Requireable<(PropTypes.InferProps<{
9
+ label: PropTypes.Requireable<string>;
10
+ type: PropTypes.Requireable<string>;
11
+ action: PropTypes.Requireable<(...args: any[]) => any>;
12
+ }> | null | undefined)[]>;
12
13
  const temporary: PropTypes.Requireable<boolean>;
13
14
  const onEnd: PropTypes.Requireable<(...args: any[]) => any>;
14
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/banner/index.js"],"names":[],"mappings":";AAuBA,iDAmDC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/banner/index.js"],"names":[],"mappings":";AA0BA,iDAmFC"}
@@ -3,46 +3,124 @@
3
3
  exports.__esModule = true;
4
4
  exports.default = void 0;
5
5
 
6
+ var _size2 = _interopRequireDefault(require("lodash/fp/size"));
7
+
8
+ var _map2 = _interopRequireDefault(require("lodash/fp/map"));
9
+
10
+ var _isEmpty2 = _interopRequireDefault(require("lodash/fp/isEmpty"));
11
+
12
+ var _noop2 = _interopRequireDefault(require("lodash/fp/noop"));
13
+
6
14
  var _keys2 = _interopRequireDefault(require("lodash/fp/keys"));
7
15
 
8
- var _react = _interopRequireDefault(require("react"));
16
+ var _react = _interopRequireWildcard(require("react"));
9
17
 
10
18
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
19
 
12
20
  var _classnames = _interopRequireDefault(require("classnames"));
13
21
 
14
- var _novaIcons = require("@coorpacademy/nova-icons");
22
+ var _colors = require("../../variables/colors");
15
23
 
16
24
  var _buttonLink = _interopRequireDefault(require("../../atom/button-link"));
17
25
 
26
+ var _icon = _interopRequireDefault(require("../../atom/icon"));
27
+
28
+ var _inputSwitch = _interopRequireDefault(require("../../atom/input-switch"));
29
+
18
30
  var _style = _interopRequireDefault(require("./style.css"));
19
31
 
32
+ 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); }
33
+
34
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
35
+
20
36
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
37
 
22
- const ICONS = {
23
- success: _novaIcons.NovaCompositionCoorpacademyValidate,
24
- error: _novaIcons.NovaSolidInterfaceFeedbackInterfaceAlertDiamond,
25
- warning: _novaIcons.NovaSolidInterfaceFeedbackInterfaceAlertDiamond
38
+ const uncappedMap = _map2.default.convert({
39
+ cap: false
40
+ });
41
+
42
+ const TYPES = {
43
+ success: ['circle-check', _colors.COLORS.cm_positive_200],
44
+ error: ['triangle-exclamation', _colors.COLORS.cm_negative_200],
45
+ warning: ['circle-exclamation', _colors.COLORS.cm_yellow_400],
46
+ info: ['circle-info', _colors.COLORS.cm_grey_500]
26
47
  };
27
48
  const STYLES = {
28
49
  success: _style.default.success,
29
50
  error: _style.default.error,
30
- warning: _style.default.warning
51
+ warning: _style.default.warning,
52
+ info: _style.default.info
31
53
  };
32
54
 
33
55
  const Banner = props => {
34
56
  const {
35
57
  type,
36
58
  message,
37
- firstCTA,
38
- firstCTALabel,
39
- secondCTALabel,
40
- secondCTA,
59
+ cta = [],
41
60
  temporary,
42
61
  bannerKey,
43
62
  onEnd
44
63
  } = props;
45
- const Icon = ICONS[type];
64
+ const [switchValue, setSwitchValue] = (0, _react.useState)(false);
65
+
66
+ const ButtonSeparator = /*#__PURE__*/_react.default.createElement("div", {
67
+ className: (0, _classnames.default)(_style.default.buttonsBar, STYLES[type])
68
+ });
69
+
70
+ const handleSwitchToggle = (0, _react.useCallback)(action => e => {
71
+ const newSwitchValue = !switchValue;
72
+ setSwitchValue(newSwitchValue);
73
+ action(newSwitchValue);
74
+ }, [switchValue]);
75
+
76
+ const buildButton = ({
77
+ type: buttonType = 'button',
78
+ label,
79
+ action = _noop2.default
80
+ }) => {
81
+ const commonStyle = (0, _classnames.default)(_style.default.button, STYLES[type]);
82
+
83
+ switch (buttonType) {
84
+ case 'switch':
85
+ return /*#__PURE__*/_react.default.createElement("div", {
86
+ className: commonStyle
87
+ }, /*#__PURE__*/_react.default.createElement(_inputSwitch.default, {
88
+ id: "show-microlearning-switch",
89
+ theme: "coorpmanager",
90
+ title: label,
91
+ value: switchValue,
92
+ onChange: handleSwitchToggle(action),
93
+ "data-name": `banner-switch-cta`,
94
+ "aria-label": label
95
+ }));
96
+
97
+ default:
98
+ return /*#__PURE__*/_react.default.createElement("div", {
99
+ className: commonStyle
100
+ }, /*#__PURE__*/_react.default.createElement(_buttonLink.default, {
101
+ "data-name": "banner-button-cta",
102
+ "aria-label": label,
103
+ label: label,
104
+ onClick: action,
105
+ type: "text",
106
+ customStyle: {
107
+ padding: 0
108
+ }
109
+ }));
110
+ }
111
+ };
112
+
113
+ const buildCta = ctaOptions => {
114
+ return uncappedMap((options, i) => {
115
+ if ((0, _isEmpty2.default)(options)) return null;
116
+ return /*#__PURE__*/_react.default.createElement("div", {
117
+ className: _style.default.ctaWrapper,
118
+ key: i
119
+ }, i > 0 && i <= (0, _size2.default)(options) ? ButtonSeparator : null, buildButton(options));
120
+ }, ctaOptions);
121
+ };
122
+
123
+ const [iconName, iconColor] = TYPES[type];
46
124
  return /*#__PURE__*/_react.default.createElement("div", {
47
125
  key: bannerKey,
48
126
  className: (0, _classnames.default)(_style.default.banner, STYLES[type], temporary && _style.default.temporaryBanner),
@@ -51,37 +129,26 @@ const Banner = props => {
51
129
  }, /*#__PURE__*/_react.default.createElement("div", {
52
130
  "data-name": `${type}-banner-message`,
53
131
  className: _style.default.message
54
- }, /*#__PURE__*/_react.default.createElement(Icon, {
55
- className: (0, _classnames.default)(_style.default.icon, temporary && _style.default.temporaryIcon)
56
- }), message), firstCTALabel ? /*#__PURE__*/_react.default.createElement("div", {
57
- className: (0, _classnames.default)(_style.default.button, STYLES[type])
58
- }, /*#__PURE__*/_react.default.createElement(_buttonLink.default, {
59
- "data-name": "first-banner-cta",
60
- "aria-label": firstCTALabel,
61
- label: firstCTALabel,
62
- onClick: firstCTA,
63
- type: "text"
64
- })) : null, firstCTALabel && secondCTALabel ? /*#__PURE__*/_react.default.createElement("div", {
65
- className: (0, _classnames.default)(_style.default.buttonsBar, STYLES[type])
66
- }) : null, secondCTALabel ? /*#__PURE__*/_react.default.createElement("div", {
67
- className: (0, _classnames.default)(_style.default.button, STYLES[type])
68
- }, /*#__PURE__*/_react.default.createElement(_buttonLink.default, {
69
- "data-name": "second-banner-cta",
70
- onClick: secondCTA,
71
- "aria-label": secondCTALabel,
72
- label: secondCTALabel,
73
- type: "text"
74
- })) : null);
132
+ }, /*#__PURE__*/_react.default.createElement(_icon.default, {
133
+ iconName: iconName,
134
+ iconColor: iconColor,
135
+ className: (0, _classnames.default)(_style.default.icon, temporary && _style.default.temporaryIcon),
136
+ customStyle: {
137
+ padding: 0
138
+ }
139
+ }), message), buildCta(cta));
75
140
  };
76
141
 
142
+ const ctaPropTypes = process.env.NODE_ENV !== "production" ? _propTypes.default.shape({
143
+ label: _propTypes.default.string,
144
+ type: _propTypes.default.oneOf(['button', 'switch']),
145
+ action: _propTypes.default.func
146
+ }) : {};
77
147
  Banner.propTypes = process.env.NODE_ENV !== "production" ? {
78
148
  bannerKey: _propTypes.default.string,
79
- type: _propTypes.default.oneOf((0, _keys2.default)(ICONS)),
149
+ type: _propTypes.default.oneOf((0, _keys2.default)(TYPES)),
80
150
  message: _propTypes.default.string.isRequired,
81
- firstCTA: _propTypes.default.func,
82
- firstCTALabel: _propTypes.default.string,
83
- secondCTALabel: _propTypes.default.string,
84
- secondCTA: _propTypes.default.func,
151
+ cta: _propTypes.default.arrayOf(ctaPropTypes),
85
152
  temporary: _propTypes.default.bool,
86
153
  onEnd: _propTypes.default.func
87
154
  } : {};
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ICONS","success","ValidateIcon","error","QuestionIcon","warning","STYLES","style","Banner","props","type","message","firstCTA","firstCTALabel","secondCTALabel","secondCTA","temporary","bannerKey","onEnd","Icon","classnames","banner","temporaryBanner","icon","temporaryIcon","button","buttonsBar","propTypes","PropTypes","string","oneOf","isRequired","func","bool"],"sources":["../../../src/molecule/banner/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {keys} from 'lodash/fp';\nimport {\n NovaSolidInterfaceFeedbackInterfaceAlertDiamond as QuestionIcon,\n NovaCompositionCoorpacademyValidate as ValidateIcon\n} from '@coorpacademy/nova-icons';\nimport ButtonLink from '../../atom/button-link';\nimport style from './style.css';\n\nconst ICONS = {\n success: ValidateIcon,\n error: QuestionIcon,\n warning: QuestionIcon\n};\n\nconst STYLES = {\n success: style.success,\n error: style.error,\n warning: style.warning\n};\n\nconst Banner = props => {\n const {\n type,\n message,\n firstCTA,\n firstCTALabel,\n secondCTALabel,\n secondCTA,\n temporary,\n bannerKey,\n onEnd\n } = props;\n const Icon = ICONS[type];\n return (\n <div\n key={bannerKey}\n className={classnames(style.banner, STYLES[type], temporary && style.temporaryBanner)}\n onAnimationEnd={onEnd}\n title={message}\n >\n <div data-name={`${type}-banner-message`} className={style.message}>\n <Icon className={classnames(style.icon, temporary && style.temporaryIcon)} />\n {message}\n </div>\n {firstCTALabel ? (\n <div className={classnames(style.button, STYLES[type])}>\n <ButtonLink\n data-name=\"first-banner-cta\"\n aria-label={firstCTALabel}\n label={firstCTALabel}\n onClick={firstCTA}\n type=\"text\"\n />\n </div>\n ) : null}\n {firstCTALabel && secondCTALabel ? (\n <div className={classnames(style.buttonsBar, STYLES[type])} />\n ) : null}\n {secondCTALabel ? (\n <div className={classnames(style.button, STYLES[type])}>\n <ButtonLink\n data-name=\"second-banner-cta\"\n onClick={secondCTA}\n aria-label={secondCTALabel}\n label={secondCTALabel}\n type=\"text\"\n />\n </div>\n ) : null}\n </div>\n );\n};\n\nBanner.propTypes = {\n bannerKey: PropTypes.string,\n type: PropTypes.oneOf(keys(ICONS)),\n message: PropTypes.string.isRequired,\n firstCTA: PropTypes.func,\n firstCTALabel: PropTypes.string,\n secondCTALabel: PropTypes.string,\n secondCTA: PropTypes.func,\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AYG,aAFd;IAGE,KAAK,EAAEA,aAHT;IAIE,OAAO,EAAED,QAJX;IAKE,IAAI,EAAC;EALP,EADF,CADY,GAUV,IApBN,EAqBGC,aAAa,IAAIC,cAAjB,gBACC;IAAK,SAAS,EAAE,IAAAM,mBAAA,EAAWb,cAAA,CAAMmB,UAAjB,EAA6BpB,MAAM,CAACI,IAAD,CAAnC;EAAhB,EADD,GAEG,IAvBN,EAwBGI,cAAc,gBACb;IAAK,SAAS,EAAE,IAAAM,mBAAA,EAAWb,cAAA,CAAMkB,MAAjB,EAAyBnB,MAAM,CAACI,IAAD,CAA/B;EAAhB,gBACE,6BAAC,mBAAD;IACE,aAAU,mBADZ;IAEE,OAAO,EAAEK,SAFX;IAGE,cAAYD,cAHd;IAIE,KAAK,EAAEA,cAJT;IAKE,IAAI,EAAC;EALP,EADF,CADa,GAUX,IAlCN,CADF;AAsCD,CAnDD;;AAqDAN,MAAM,CAACmB,SAAP,2CAAmB;EACjBV,SAAS,EAAEW,kBAAA,CAAUC,MADJ;EAEjBnB,IAAI,EAAEkB,kBAAA,CAAUE,KAAV,CAAgB,oBAAK9B,KAAL,CAAhB,CAFW;EAGjBW,OAAO,EAAEiB,kBAAA,CAAUC,MAAV,CAAiBE,UAHT;EAIjBnB,QAAQ,EAAEgB,kBAAA,CAAUI,IAJH;EAKjBnB,aAAa,EAAEe,kBAAA,CAAUC,MALR;EAMjBf,cAAc,EAAEc,kBAAA,CAAUC,MANT;EAOjBd,SAAS,EAAEa,kBAAA,CAAUI,IAPJ;EAQjBhB,SAAS,EAAEY,kBAAA,CAAUK,IARJ;EASjBf,KAAK,EAAEU,kBAAA,CAAUI;AATA,CAAnB;eAYexB,M"}
1
+ {"version":3,"file":"index.js","names":["uncappedMap","convert","cap","TYPES","success","COLORS","cm_positive_200","error","cm_negative_200","warning","cm_yellow_400","info","cm_grey_500","STYLES","style","Banner","props","type","message","cta","temporary","bannerKey","onEnd","switchValue","setSwitchValue","useState","ButtonSeparator","classnames","buttonsBar","handleSwitchToggle","useCallback","action","e","newSwitchValue","buildButton","buttonType","label","commonStyle","button","padding","buildCta","ctaOptions","options","i","ctaWrapper","iconName","iconColor","banner","temporaryBanner","icon","temporaryIcon","ctaPropTypes","PropTypes","shape","string","oneOf","func","propTypes","isRequired","arrayOf","bool"],"sources":["../../../src/molecule/banner/index.js"],"sourcesContent":["import React, {useState, useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {keys, noop, isEmpty, map, size} from 'lodash/fp';\nimport {COLORS} from '../../variables/colors';\nimport ButtonLink from '../../atom/button-link';\nimport Icon from '../../atom/icon';\nimport InputSwitch from '../../atom/input-switch';\nimport style from './style.css';\n\nconst uncappedMap = map.convert({cap: false});\n\nconst TYPES = {\n success: ['circle-check', COLORS.cm_positive_200],\n error: ['triangle-exclamation', COLORS.cm_negative_200],\n warning: ['circle-exclamation', COLORS.cm_yellow_400],\n info: ['circle-info', COLORS.cm_grey_500]\n};\n\nconst STYLES = {\n success: style.success,\n error: style.error,\n warning: style.warning,\n info: style.info\n};\n\nconst Banner = props => {\n const {type, message, cta = [], temporary, bannerKey, onEnd} = props;\n const [switchValue, setSwitchValue] = useState(false);\n\n const ButtonSeparator = <div className={classnames(style.buttonsBar, STYLES[type])} />;\n\n const handleSwitchToggle = useCallback(\n action => e => {\n const newSwitchValue = !switchValue;\n setSwitchValue(newSwitchValue);\n action(newSwitchValue);\n },\n [switchValue]\n );\n\n const buildButton = ({type: buttonType = 'button', label, action = noop}) => {\n const commonStyle = classnames(style.button, STYLES[type]);\n\n switch (buttonType) {\n case 'switch':\n return (\n <div className={commonStyle}>\n <InputSwitch\n id=\"show-microlearning-switch\"\n theme=\"coorpmanager\"\n title={label}\n value={switchValue}\n onChange={handleSwitchToggle(action)}\n data-name={`banner-switch-cta`}\n aria-label={label}\n />\n </div>\n );\n default:\n return (\n <div className={commonStyle}>\n <ButtonLink\n data-name=\"banner-button-cta\"\n aria-label={label}\n label={label}\n onClick={action}\n type=\"text\"\n customStyle={{padding: 0}}\n />\n </div>\n );\n }\n };\n\n const buildCta = ctaOptions => {\n return uncappedMap((options, i) => {\n if (isEmpty(options)) return null;\n\n return (\n <div className={style.ctaWrapper} key={i}>\n {i > 0 && i <= size(options) ? ButtonSeparator : null}\n {buildButton(options)}\n </div>\n );\n }, ctaOptions);\n };\n\n const [iconName, iconColor] = TYPES[type];\n\n return (\n <div\n key={bannerKey}\n className={classnames(style.banner, STYLES[type], temporary && style.temporaryBanner)}\n onAnimationEnd={onEnd}\n title={message}\n >\n <div data-name={`${type}-banner-message`} className={style.message}>\n <Icon\n iconName={iconName}\n iconColor={iconColor}\n className={classnames(style.icon, temporary && style.temporaryIcon)}\n customStyle={{padding: 0}}\n />\n {message}\n </div>\n {buildCta(cta)}\n </div>\n );\n};\n\nconst ctaPropTypes = PropTypes.shape({\n label: PropTypes.string,\n type: PropTypes.oneOf(['button', 'switch']),\n action: PropTypes.func\n});\n\nBanner.propTypes = {\n bannerKey: PropTypes.string,\n type: PropTypes.oneOf(keys(TYPES)),\n message: PropTypes.string.isRequired,\n cta: PropTypes.arrayOf(ctaPropTypes),\n temporary: PropTypes.bool,\n onEnd: PropTypes.func\n};\n\nexport default Banner;\n"],"mappings":";;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA,MAAMA,WAAW,GAAG,cAAIC,OAAJ,CAAY;EAACC,GAAG,EAAE;AAAN,CAAZ,CAApB;;AAEA,MAAMC,KAAK,GAAG;EACZC,OAAO,EAAE,CAAC,cAAD,EAAiBC,cAAA,CAAOC,eAAxB,CADG;EAEZC,KAAK,EAAE,CAAC,sBAAD,EAAyBF,cAAA,CAAOG,eAAhC,CAFK;EAGZC,OAAO,EAAE,CAAC,oBAAD,EAAuBJ,cAAA,CAAOK,aAA9B,CAHG;EAIZC,IAAI,EAAE,CAAC,aAAD,EAAgBN,cAAA,CAAOO,WAAvB;AAJM,CAAd;AAOA,M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AA,CAAMmC,IAAjB,EAAuB7B,SAAS,IAAIN,cAAA,CAAMoC,aAA1C,CAHb;IAIE,WAAW,EAAE;MAACX,OAAO,EAAE;IAAV;EAJf,EADF,EAOGrB,OAPH,CANF,EAeGsB,QAAQ,CAACrB,GAAD,CAfX,CADF;AAmBD,CAnFD;;AAqFA,MAAMgC,YAAN,2CAAqBC,kBAAA,CAAUC,KAAV,CAAgB;EACnCjB,KAAK,EAAEgB,kBAAA,CAAUE,MADkB;EAEnCrC,IAAI,EAAEmC,kBAAA,CAAUG,KAAV,CAAgB,CAAC,QAAD,EAAW,QAAX,CAAhB,CAF6B;EAGnCxB,MAAM,EAAEqB,kBAAA,CAAUI;AAHiB,CAAhB,CAArB;AAMAzC,MAAM,CAAC0C,SAAP,2CAAmB;EACjBpC,SAAS,EAAE+B,kBAAA,CAAUE,MADJ;EAEjBrC,IAAI,EAAEmC,kBAAA,CAAUG,KAAV,CAAgB,oBAAKpD,KAAL,CAAhB,CAFW;EAGjBe,OAAO,EAAEkC,kBAAA,CAAUE,MAAV,CAAiBI,UAHT;EAIjBvC,GAAG,EAAEiC,kBAAA,CAAUO,OAAV,CAAkBR,YAAlB,CAJY;EAKjB/B,SAAS,EAAEgC,kBAAA,CAAUQ,IALJ;EAMjBtC,KAAK,EAAE8B,kBAAA,CAAUI;AANA,CAAnB;eASezC,M"}
@@ -12,6 +12,8 @@
12
12
  @value cm_yellow_100 from colors;
13
13
  @value cm_yellow_200 from colors;
14
14
  @value cm_yellow_400 from colors;
15
+ @value cm_grey_100 from colors;
16
+ @value cm_grey_700 from colors;
15
17
 
16
18
  @keyframes fadeIn {
17
19
  0% {
@@ -33,11 +35,11 @@
33
35
  .banner {
34
36
  display: flex;
35
37
  flex-direction: row;
36
- justify-content: flex-start;
37
- align-items: center;
38
+ justify-content: flex-start;
39
+ align-items: center;
38
40
  gap: 8px;
39
- padding: 16px 24px;
40
- border-radius: 5px;
41
+ padding: 16px;
42
+ border-radius: 12px;
41
43
  }
42
44
 
43
45
  .banner.warning {
@@ -55,6 +57,11 @@
55
57
  color: cm_positive_200;
56
58
  }
57
59
 
60
+ .banner.info {
61
+ background-color: cm_grey_100;
62
+ color: cm_grey_700;
63
+ }
64
+
58
65
  .temporaryBanner {
59
66
  display: inline-flex;
60
67
  align-items: center;
@@ -74,6 +81,11 @@
74
81
  transform: translateX(-50%);
75
82
  }
76
83
 
84
+ .ctaWrapper {
85
+ display: flex;
86
+ gap: 4px;
87
+ }
88
+
77
89
  .button{
78
90
  background-color: transparent;
79
91
  white-space: nowrap;
@@ -103,7 +115,6 @@
103
115
  color: color(cm_positive_100 blackness(+12%));
104
116
  }
105
117
 
106
-
107
118
  .buttonsBar {
108
119
  width: 2px;
109
120
  align-self: stretch;
@@ -123,6 +134,9 @@
123
134
  background-color: cm_positive_100;
124
135
  }
125
136
 
137
+ .buttonsBar.info {
138
+ background-color: cm_grey_700;
139
+ }
126
140
 
127
141
  .icon {
128
142
  height: 22px;
@@ -147,4 +161,12 @@
147
161
  display: flex;
148
162
  align-content: center;
149
163
  align-items: center;
164
+ gap: 16px;
150
165
  }
166
+
167
+ @media mobile {
168
+ .banner {
169
+ flex-wrap: wrap;
170
+ gap: 24px;
171
+ }
172
+ }