@coorpacademy/components 10.3.32-alpha.2 → 10.4.2-alpha.2

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 (96) hide show
  1. package/es/atom/input-switch/test/fixtures.js +10 -0
  2. package/es/atom/input-switch/test/fixtures.js.map +1 -1
  3. package/es/atom/loader/test/fixtures.js +2 -0
  4. package/es/atom/loader/test/fixtures.js.map +1 -1
  5. package/es/molecule/card/customer.css +61 -3
  6. package/es/molecule/card/customer.js +17 -5
  7. package/es/molecule/card/customer.js.map +1 -1
  8. package/es/molecule/card/index.js +15 -5
  9. package/es/molecule/card/index.js.map +1 -1
  10. package/es/molecule/card/style.css +86 -24
  11. package/es/molecule/card/test/fixtures/coorpmanager.js +18 -0
  12. package/es/molecule/card/test/fixtures/coorpmanager.js.map +1 -0
  13. package/es/molecule/card/test/fixtures.js +2 -0
  14. package/es/molecule/card/test/fixtures.js.map +1 -1
  15. package/es/molecule/card-content/index.js +11 -5
  16. package/es/molecule/card-content/index.js.map +1 -1
  17. package/es/molecule/card-content/style.css +52 -0
  18. package/es/molecule/cockpit-popin/test/fixtures.js +17 -0
  19. package/es/molecule/cockpit-popin/test/fixtures.js.map +1 -0
  20. package/es/molecule/search/test/fixtures.js +15 -0
  21. package/es/molecule/search/test/fixtures.js.map +1 -0
  22. package/es/molecule/vertical-tabs/test/fixtures.js +2 -0
  23. package/es/molecule/vertical-tabs/test/fixtures.js.map +1 -1
  24. package/es/organism/course-selection/index.js +6 -1
  25. package/es/organism/course-selection/index.js.map +1 -1
  26. package/es/organism/course-selection/style.css +7 -1
  27. package/es/organism/course-selection/test/fixtures/default.js +29 -7
  28. package/es/organism/course-selection/test/fixtures/default.js.map +1 -1
  29. package/es/organism/course-selection/test/fixtures.js +2 -0
  30. package/es/organism/course-selection/test/fixtures.js.map +1 -1
  31. package/es/organism/search-and-chips-results/index.js +6 -1
  32. package/es/organism/search-and-chips-results/index.js.map +1 -1
  33. package/es/organism/search-and-chips-results/style.css +7 -1
  34. package/es/organism/wizard-contents/index.js +1 -6
  35. package/es/organism/wizard-contents/index.js.map +1 -1
  36. package/es/organism/wizard-contents/style.css +2 -8
  37. package/es/template/back-office/brand-update/index.js +4 -2
  38. package/es/template/back-office/brand-update/index.js.map +1 -1
  39. package/es/template/back-office/brand-update/style.css +4 -0
  40. package/es/template/back-office/brand-update/test/fixtures/loader.js +6 -2
  41. package/es/template/back-office/brand-update/test/fixtures/loader.js.map +1 -1
  42. package/es/template/back-office/brand-update/test/fixtures/manageusers-edit.js +236 -1
  43. package/es/template/back-office/brand-update/test/fixtures/manageusers-edit.js.map +1 -1
  44. package/es/template/back-office/brand-update/test/fixtures/manageusers-list.js +1 -1
  45. package/es/template/back-office/brand-update/test/fixtures/manageusers-list.js.map +1 -1
  46. package/es/template/back-office/brand-update/test/fixtures/uploadusers.js +1 -1
  47. package/es/template/back-office/brand-update/test/fixtures/uploadusers.js.map +1 -1
  48. package/lib/atom/input-switch/test/fixtures.js +15 -0
  49. package/lib/atom/input-switch/test/fixtures.js.map +1 -1
  50. package/lib/atom/loader/test/fixtures.js +3 -0
  51. package/lib/atom/loader/test/fixtures.js.map +1 -1
  52. package/lib/molecule/card/customer.css +61 -3
  53. package/lib/molecule/card/customer.js +22 -6
  54. package/lib/molecule/card/customer.js.map +1 -1
  55. package/lib/molecule/card/index.js +19 -6
  56. package/lib/molecule/card/index.js.map +1 -1
  57. package/lib/molecule/card/style.css +86 -24
  58. package/lib/molecule/card/test/fixtures/coorpmanager.js +28 -0
  59. package/lib/molecule/card/test/fixtures/coorpmanager.js.map +1 -0
  60. package/lib/molecule/card/test/fixtures.js +3 -0
  61. package/lib/molecule/card/test/fixtures.js.map +1 -1
  62. package/lib/molecule/card-content/index.js +14 -6
  63. package/lib/molecule/card-content/index.js.map +1 -1
  64. package/lib/molecule/card-content/style.css +52 -0
  65. package/lib/molecule/cockpit-popin/test/fixtures.js +28 -0
  66. package/lib/molecule/cockpit-popin/test/fixtures.js.map +1 -0
  67. package/lib/molecule/search/test/fixtures.js +25 -0
  68. package/lib/molecule/search/test/fixtures.js.map +1 -0
  69. package/lib/molecule/vertical-tabs/test/fixtures.js +3 -0
  70. package/lib/molecule/vertical-tabs/test/fixtures.js.map +1 -1
  71. package/lib/organism/course-selection/index.js +7 -1
  72. package/lib/organism/course-selection/index.js.map +1 -1
  73. package/lib/organism/course-selection/style.css +7 -1
  74. package/lib/organism/course-selection/test/fixtures/default.js +30 -7
  75. package/lib/organism/course-selection/test/fixtures/default.js.map +1 -1
  76. package/lib/organism/course-selection/test/fixtures.js +3 -0
  77. package/lib/organism/course-selection/test/fixtures.js.map +1 -1
  78. package/lib/organism/search-and-chips-results/index.js +7 -1
  79. package/lib/organism/search-and-chips-results/index.js.map +1 -1
  80. package/lib/organism/search-and-chips-results/style.css +7 -1
  81. package/lib/organism/wizard-contents/index.js +1 -7
  82. package/lib/organism/wizard-contents/index.js.map +1 -1
  83. package/lib/organism/wizard-contents/style.css +2 -8
  84. package/lib/template/back-office/brand-update/index.js +4 -2
  85. package/lib/template/back-office/brand-update/index.js.map +1 -1
  86. package/lib/template/back-office/brand-update/style.css +4 -0
  87. package/lib/template/back-office/brand-update/test/fixtures/loader.js +7 -3
  88. package/lib/template/back-office/brand-update/test/fixtures/loader.js.map +1 -1
  89. package/lib/template/back-office/brand-update/test/fixtures/manageusers-edit.js +236 -1
  90. package/lib/template/back-office/brand-update/test/fixtures/manageusers-edit.js.map +1 -1
  91. package/lib/template/back-office/brand-update/test/fixtures/manageusers-list.js +2 -2
  92. package/lib/template/back-office/brand-update/test/fixtures/manageusers-list.js.map +1 -1
  93. package/lib/template/back-office/brand-update/test/fixtures/uploadusers.js +2 -2
  94. package/lib/template/back-office/brand-update/test/fixtures/uploadusers.js.map +1 -1
  95. package/locales/hy/global.json +80 -0
  96. package/package.json +2 -2
@@ -8,6 +8,8 @@ var _renderComponent = _interopRequireDefault(require("../../../test/helpers/ren
8
8
 
9
9
  var _ = _interopRequireDefault(require(".."));
10
10
 
11
+ var _coorpmanager = _interopRequireDefault(require("./fixtures/coorpmanager"));
12
+
11
13
  var _default = _interopRequireDefault(require("./fixtures/default"));
12
14
 
13
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -18,5 +20,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
18
20
  t.not(value, undefined, `PropType for "Atom.AtomLoader.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
19
21
  });
20
22
  });
23
+ (0, _ava.default)('Atom › AtomLoader › Coorpmanager › should be rendered', _renderComponent.default, _.default, _coorpmanager.default);
21
24
  (0, _ava.default)('Atom › AtomLoader › Default › should be rendered', _renderComponent.default, _.default, _default.default);
22
25
  //# sourceMappingURL=fixtures.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/atom/loader/test/fixtures.js"],"names":["t","pass","AtomLoader","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,iDAAL,EAAwDA,CAAC,IAAI;AAC3DA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAWC,SAAnB,EAA8B,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC5CL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,2CAA0CF,GAAI,mEAAvE;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,kDAAL,EAAyDG,wBAAzD,EAA+EN,SAA/E,EAA2FO,gBAA3F","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomLoader from '..';\nimport fixtureDefault from './fixtures/default';\n\ntest('Atom › AtomLoader > should have valid propTypes', t => {\n t.pass();\n forEach(AtomLoader.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomLoader.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomLoader › Default › should be rendered', renderComponentMacro, AtomLoader, fixtureDefault);\n"],"file":"fixtures.js"}
1
+ {"version":3,"sources":["../../../../src/atom/loader/test/fixtures.js"],"names":["t","pass","AtomLoader","propTypes","value","key","not","undefined","renderComponentMacro","fixtureCoorpmanager","fixtureDefault"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,iDAAL,EAAwDA,CAAC,IAAI;AAC3DA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAWC,SAAnB,EAA8B,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC5CL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,2CAA0CF,GAAI,mEAAvE;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,uDAAL,EAA8DG,wBAA9D,EAAoFN,SAApF,EAAgGO,qBAAhG;AACA,kBAAK,kDAAL,EAAyDD,wBAAzD,EAA+EN,SAA/E,EAA2FQ,gBAA3F","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomLoader from '..';\nimport fixtureCoorpmanager from './fixtures/coorpmanager';\nimport fixtureDefault from './fixtures/default';\n\ntest('Atom › AtomLoader > should have valid propTypes', t => {\n t.pass();\n forEach(AtomLoader.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomLoader.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomLoader › Coorpmanager › should be rendered', renderComponentMacro, AtomLoader, fixtureCoorpmanager);\ntest('Atom › AtomLoader › Default › should be rendered', renderComponentMacro, AtomLoader, fixtureDefault);\n"],"file":"fixtures.js"}
@@ -3,33 +3,91 @@
3
3
  @value colors: "../../variables/colors.css";
4
4
  @value white from colors;
5
5
 
6
- .content {
6
+ .default {
7
7
  display: flex;
8
8
  flex-wrap: wrap;
9
9
  justify-content: center;
10
- padding: 12px 12px 0;
11
10
  width: 100%;
12
11
  font-family: 'Open Sans';
13
12
  box-sizing: border-box;
14
13
  text-align: center;
15
14
  color: white;
16
15
  text-transform: uppercase;
17
- font-size: 12px;
18
16
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.75);
19
17
  user-select: none;
20
18
  }
21
19
 
20
+ .customer[disabled] {
21
+ background: none;
22
+ }
23
+
24
+ .content {
25
+ composes: default;
26
+ padding: 12px 12px 0;
27
+ font-size: 12px;
28
+ }
29
+
30
+ .coorpmanager .content {
31
+ padding: 8px 12px 0;
32
+ font-size: 8px;
33
+ }
34
+
35
+ .customer {
36
+ position: absolute;
37
+ top: 0;
38
+ left: 0;
39
+ width: 100%;
40
+ height: 100%;
41
+ }
42
+
43
+ .customer {
44
+ background: linear-gradient(
45
+ to bottom,
46
+ rgba(0, 0, 0, 0.2) 0%,
47
+ rgba(0, 0, 0, 0) 20%
48
+ );
49
+ }
50
+ .chapterCustomer {
51
+ padding-top: 10px;
52
+ }
53
+
54
+ .coorpmanager.customer.chapterCustomer {
55
+ padding-top: 0px;
56
+ }
57
+
22
58
  .coorp,
23
59
  .original {
24
60
  letter-spacing: 3px;
25
61
  }
26
62
 
63
+ .coorpmanager .coorp {
64
+ letter-spacing: 2px;
65
+ }
66
+
67
+ .coorpmanager.customer.chapterCustomer .coorp {
68
+ letter-spacing: 1px;
69
+ }
70
+
71
+ .coorpmanager .original {
72
+ letter-spacing: 2px;
73
+ }
74
+
75
+ .coorpmanager.customer.chapterCustomer .original {
76
+ letter-spacing: 1px;
77
+ }
78
+
27
79
  .coorp {
28
80
  font-weight: 100;
29
81
  margin-right: 5px;
30
82
  letter-spacing: 4px;
31
83
  }
32
84
 
85
+ .coorpmanager .coorp {
86
+ font-weight: 100;
87
+ margin-right: 5px;
88
+ letter-spacing: 2px;
89
+ }
90
+
33
91
  .original {
34
92
  font-weight: 600;
35
93
  }
@@ -1,24 +1,38 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.default = void 0;
4
+ exports.default = exports.THEMES = void 0;
5
+
6
+ var _keys2 = _interopRequireDefault(require("lodash/fp/keys"));
5
7
 
6
8
  var _react = _interopRequireDefault(require("react"));
7
9
 
8
10
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
11
 
12
+ var _classnames = _interopRequireDefault(require("classnames"));
13
+
10
14
  var _customer = _interopRequireDefault(require("./customer.css"));
11
15
 
12
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
17
 
18
+ const THEMES = {
19
+ default: null,
20
+ coorpmanager: _customer.default.coorpmanager
21
+ };
22
+ exports.THEMES = THEMES;
23
+
14
24
  const Customer = props => {
15
25
  const {
16
26
  name,
17
- className,
18
- coorpOriginal
27
+ type,
28
+ coorpOriginal,
29
+ theme,
30
+ disabled = false
19
31
  } = props;
32
+ const className = (0, _classnames.default)(THEMES[theme], _customer.default.customer, type === 'chapter' ? _customer.default.chapterCustomer : null);
20
33
  return /*#__PURE__*/_react.default.createElement("div", {
21
- className: className
34
+ className: className,
35
+ disabled: disabled
22
36
  }, /*#__PURE__*/_react.default.createElement("div", {
23
37
  className: _customer.default.content
24
38
  }, coorpOriginal ? /*#__PURE__*/_react.default.createElement("span", {
@@ -29,9 +43,11 @@ const Customer = props => {
29
43
  };
30
44
 
31
45
  Customer.propTypes = process.env.NODE_ENV !== "production" ? {
32
- className: _propTypes.default.string,
46
+ theme: _propTypes.default.oneOf((0, _keys2.default)(THEMES)),
47
+ type: _propTypes.default.string,
33
48
  name: _propTypes.default.string,
34
- coorpOriginal: _propTypes.default.bool.isRequired
49
+ coorpOriginal: _propTypes.default.bool.isRequired,
50
+ disabled: _propTypes.default.bool
35
51
  } : {};
36
52
  var _default = Customer;
37
53
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/molecule/card/customer.js"],"names":["Customer","props","name","className","coorpOriginal","style","content","coorp","original","propTypes","PropTypes","string","bool","isRequired"],"mappings":";;;;;AAAA;;AACA;;AACA;;;;AAEA,MAAMA,QAAQ,GAAGC,KAAK,IAAI;AACxB,QAAM;AAACC,IAAAA,IAAD;AAAOC,IAAAA,SAAP;AAAkBC,IAAAA;AAAlB,MAAmCH,KAAzC;AAEA,sBACE;AAAK,IAAA,SAAS,EAAEE;AAAhB,kBACE;AAAK,IAAA,SAAS,EAAEE,kBAAMC;AAAtB,KACGF,aAAa,gBAAG;AAAM,IAAA,SAAS,EAAEC,kBAAME;AAAvB,cAAH,GAAiD,IADjE,EAEGH,aAAa,gBAAG;AAAM,IAAA,SAAS,EAAEC,kBAAMG;AAAvB,iBAAH,GAAuD,IAFvE,EAGG,CAACJ,aAAD,IAAkBF,IAHrB,CADF,CADF;AASD,CAZD;;AAcAF,QAAQ,CAACS,SAAT,2CAAqB;AACnBN,EAAAA,SAAS,EAAEO,mBAAUC,MADF;AAEnBT,EAAAA,IAAI,EAAEQ,mBAAUC,MAFG;AAGnBP,EAAAA,aAAa,EAAEM,mBAAUE,IAAV,CAAeC;AAHX,CAArB;eAMeb,Q","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport style from './customer.css';\n\nconst Customer = props => {\n const {name, className, coorpOriginal} = props;\n\n return (\n <div className={className}>\n <div className={style.content}>\n {coorpOriginal ? <span className={style.coorp}>Coorp </span> : null}\n {coorpOriginal ? <span className={style.original}>Original </span> : null}\n {!coorpOriginal && name}\n </div>\n </div>\n );\n};\n\nCustomer.propTypes = {\n className: PropTypes.string,\n name: PropTypes.string,\n coorpOriginal: PropTypes.bool.isRequired\n};\n\nexport default Customer;\n"],"file":"customer.js"}
1
+ {"version":3,"sources":["../../../src/molecule/card/customer.js"],"names":["THEMES","default","coorpmanager","style","Customer","props","name","type","coorpOriginal","theme","disabled","className","customer","chapterCustomer","content","coorp","original","propTypes","PropTypes","oneOf","string","bool","isRequired"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAEA;;;;AAEO,MAAMA,MAAM,GAAG;AACpBC,EAAAA,OAAO,EAAE,IADW;AAEpBC,EAAAA,YAAY,EAAEC,kBAAMD;AAFA,CAAf;;;AAKP,MAAME,QAAQ,GAAGC,KAAK,IAAI;AACxB,QAAM;AAACC,IAAAA,IAAD;AAAOC,IAAAA,IAAP;AAAaC,IAAAA,aAAb;AAA4BC,IAAAA,KAA5B;AAAmCC,IAAAA,QAAQ,GAAG;AAA9C,MAAuDL,KAA7D;AACA,QAAMM,SAAS,GAAG,yBAChBX,MAAM,CAACS,KAAD,CADU,EAEhBN,kBAAMS,QAFU,EAGhBL,IAAI,KAAK,SAAT,GAAqBJ,kBAAMU,eAA3B,GAA6C,IAH7B,CAAlB;AAMA,sBACE;AAAK,IAAA,SAAS,EAAEF,SAAhB;AAA2B,IAAA,QAAQ,EAAED;AAArC,kBACE;AAAK,IAAA,SAAS,EAAEP,kBAAMW;AAAtB,KACGN,aAAa,gBAAG;AAAM,IAAA,SAAS,EAAEL,kBAAMY;AAAvB,cAAH,GAAiD,IADjE,EAEGP,aAAa,gBAAG;AAAM,IAAA,SAAS,EAAEL,kBAAMa;AAAvB,iBAAH,GAAuD,IAFvE,EAGG,CAACR,aAAD,IAAkBF,IAHrB,CADF,CADF;AASD,CAjBD;;AAmBAF,QAAQ,CAACa,SAAT,2CAAqB;AACnBR,EAAAA,KAAK,EAAES,mBAAUC,KAAV,CAAgB,oBAAKnB,MAAL,CAAhB,CADY;AAEnBO,EAAAA,IAAI,EAAEW,mBAAUE,MAFG;AAGnBd,EAAAA,IAAI,EAAEY,mBAAUE,MAHG;AAInBZ,EAAAA,aAAa,EAAEU,mBAAUG,IAAV,CAAeC,UAJX;AAKnBZ,EAAAA,QAAQ,EAAEQ,mBAAUG;AALD,CAArB;eAQejB,Q","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {keys} from 'lodash/fp';\nimport style from './customer.css';\n\nexport const THEMES = {\n default: null,\n coorpmanager: style.coorpmanager\n};\n\nconst Customer = props => {\n const {name, type, coorpOriginal, theme, disabled = false} = props;\n const className = classnames(\n THEMES[theme],\n style.customer,\n type === 'chapter' ? style.chapterCustomer : null\n );\n\n return (\n <div className={className} disabled={disabled}>\n <div className={style.content}>\n {coorpOriginal ? <span className={style.coorp}>Coorp </span> : null}\n {coorpOriginal ? <span className={style.original}>Original </span> : null}\n {!coorpOriginal && name}\n </div>\n </div>\n );\n};\n\nCustomer.propTypes = {\n theme: PropTypes.oneOf(keys(THEMES)),\n type: PropTypes.string,\n name: PropTypes.string,\n coorpOriginal: PropTypes.bool.isRequired,\n disabled: PropTypes.bool\n};\n\nexport default Customer;\n"],"file":"customer.js"}
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.default = void 0;
4
+ exports.default = exports.THEMES = void 0;
5
+
6
+ var _keys2 = _interopRequireDefault(require("lodash/fp/keys"));
5
7
 
6
8
  var _pick2 = _interopRequireDefault(require("lodash/fp/pick"));
7
9
 
@@ -43,6 +45,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
43
45
 
44
46
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
45
47
 
48
+ const THEMES = {
49
+ default: null,
50
+ coorpmanager: _style.default.coorpmanager
51
+ };
52
+ exports.THEMES = THEMES;
53
+
46
54
  const CardBackground = ({
47
55
  type,
48
56
  image,
@@ -144,12 +152,13 @@ const Card = (0, _react.memo)(function Card(props, context) {
144
152
  isSelected,
145
153
  notification,
146
154
  badgeCategory,
147
- badgeLabel
155
+ badgeLabel,
156
+ theme = 'default'
148
157
  } = props;
149
158
  const empty = (0, _isEmpty2.default)((0, _pick2.default)(['title', 'type', 'author', 'image'], props));
150
159
  const primaryColor = (0, _get2.default)('common.primary', skin);
151
160
  const whiteColor = (0, _get2.default)('common.white', skin);
152
- const cardStyle = (0, _classnames.default)(type === 'chapter' ? _style.default.chapter : _style.default.course, title ? null : _style.default.lazy, _style.default.grid, empty ? _style.default.empty : null);
161
+ const cardStyle = (0, _classnames.default)(THEMES[theme], type === 'chapter' ? _style.default.chapter : _style.default.course, title ? null : _style.default.lazy, _style.default.grid, empty ? _style.default.empty : null);
153
162
  const handleClick = (0, _react.useMemo)(() => e => !disabled && onClick(e), [disabled, onClick]);
154
163
  const lock = disabled ? /*#__PURE__*/_react.default.createElement(_novaIcons.NovaSolidLoginLocked, {
155
164
  className: _style.default.lockIcon,
@@ -194,7 +203,9 @@ const Card = (0, _react.memo)(function Card(props, context) {
194
203
  }) : null, /*#__PURE__*/_react.default.createElement(_selectable.default, {
195
204
  isSelected: isSelected
196
205
  }), notification ? /*#__PURE__*/_react.default.createElement(_notification.default, notification) : null, customer ? /*#__PURE__*/_react.default.createElement(_customer.default, _extends({}, customer, {
197
- className: (0, _classnames.default)(_style.default.customer, type === 'chapter' ? _style.default.chapterCustomer : null)
206
+ theme: theme,
207
+ type: type,
208
+ disabled: disabled
198
209
  })) : null, /*#__PURE__*/_react.default.createElement(_cardContent.default, {
199
210
  mode: _cardContent.MODES.CARD,
200
211
  adaptiv: adaptiv,
@@ -206,7 +217,8 @@ const Card = (0, _react.memo)(function Card(props, context) {
206
217
  title: title,
207
218
  type: type,
208
219
  badgeCategory: badgeCategory,
209
- badgeLabel: badgeLabel
220
+ badgeLabel: badgeLabel,
221
+ theme: theme
210
222
  }), badge ? /*#__PURE__*/_react.default.createElement("div", {
211
223
  className: _style.default.badge,
212
224
  style: inlineBadgeStyle
@@ -236,7 +248,8 @@ Card.propTypes = process.env.NODE_ENV !== "production" ? {
236
248
  isSelected: _propTypes.default.bool,
237
249
  notification: _propTypes.default.shape(_notification.default.propTypes),
238
250
  badgeCategory: _cardContent.default.propTypes.badgeCategory,
239
- badgeLabel: _cardContent.default.propTypes.badgeLabel
251
+ badgeLabel: _cardContent.default.propTypes.badgeLabel,
252
+ theme: _propTypes.default.oneOf((0, _keys2.default)(THEMES))
240
253
  } : {};
241
254
  var _default = Card;
242
255
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/molecule/card/index.js"],"names":["CardBackground","type","image","empty","skin","externalContent","primaryColor","whiteColor","EXTERNAL_CONTENT_ICONS","IconType","icon","iconColor","color","backgroundIcon","style","externalIconCircleWrapper","externalIcon","_backgroundIcon","externalIconCircleWithImageWrapper","backgroundColor","externalIconWithImage","imageWrapper","backgroundImage","externalContentHeader","externalBackground","emptyIcon","chapterImageWrapper","contextTypes","Provider","childContextTypes","propTypes","PropTypes","string","bool","Card","props","context","badge","adaptiv","disabled","title","author","customer","certifiedAuthor","progress","favorite","addFavoriteToolTip","removeFavoriteToolTip","onClick","onFavoriteClick","isSelected","notification","badgeCategory","badgeLabel","cardStyle","chapter","course","lazy","grid","handleClick","e","lock","lockIcon","inlineBadgeStyle","getType","contentType","chapterCustomer","MODES","CARD","lockWrapper","shape","Customer","number","func","Notification","CardContentInfo"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AAIA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,cAAc,GAAG,CAAC;AAACC,EAAAA,IAAD;AAAOC,EAAAA,KAAP;AAAcC,EAAAA;AAAd,CAAD,EAAuB;AAACC,EAAAA;AAAD,CAAvB,KAAkC;AACvD,QAAMC,eAAe,GAAG,wCAAkBJ,IAAlB,CAAxB;AACA,QAAMK,YAAY,GAAG,mBAAI,gBAAJ,EAAsBF,IAAtB,CAArB;AACA,QAAMG,UAAU,GAAG,mBAAI,cAAJ,EAAoBH,IAApB,CAAnB;;AAEA,MAAIC,eAAe,IAAIG,wCAAuBP,IAAvB,CAAvB,EAAqD;AACnD,UAAMQ,QAAQ,GAAGD,wCAAuBP,IAAvB,EAA6BS,IAA9C;AACA,UAAMC,SAAS,GAAGH,wCAAuB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AAI,CAACP,YAAL,GAAoB;AAClBvB,EAAAA,IAAI,EAAEwB,kBAASC,iBAAT,CAA2BzB;AADf,CAApB;AAIA8B,IAAI,CAACJ,SAAL,2CAAiB;AACfO,EAAAA,KAAK,EAAEN,mBAAUC,MADF;AAEf9B,EAAAA,KAAK,EAAE6B,mBAAUC,MAFF;AAGfO,EAAAA,QAAQ,EAAER,mBAAUE,IAHL;AAIfK,EAAAA,OAAO,EAAEP,mBAAUE,IAJJ;AAKfhC,EAAAA,IAAI,EAAE8B,mBAAUC,MALD;AAMfQ,EAAAA,KAAK,EAAET,mBAAUC,MANF;AAOfS,EAAAA,MAAM,EAAEV,mBAAUC,MAPH;AAQfW,EAAAA,eAAe,EAAEZ,mBAAUE,IARZ;AASfS,EAAAA,QAAQ,EAAEX,mBAAUuC,KAAV,CAAgBC,kBAASzC,SAAzB,CATK;AAUfc,EAAAA,QAAQ,EAAEb,mBAAUyC,MAVL;AAWf3B,EAAAA,QAAQ,EAAEd,mBAAUE,IAXL;AAYfa,EAAAA,kBAAkB,EAAEf,mBAAUC,MAZf;AAafe,EAAAA,qBAAqB,EAAEhB,mBAAUC,MAblB;AAcfgB,EAAAA,OAAO,EAAEjB,mBAAU0C,IAdJ;AAefxB,EAAAA,eAAe,EAAElB,mBAAU0C,IAfZ;AAgBfvB,EAAAA,UAAU,EAAEnB,mBAAUE,IAhBP;AAiBfkB,EAAAA,YAAY,EAAEpB,mBAAUuC,KAAV,CAAgBI,sBAAa5C,SAA7B,CAjBC;AAkBfsB,EAAAA,aAAa,EAAEuB,qBAAgB7C,SAAhB,CAA0BsB,aAlB1B;AAmBfC,EAAAA,UAAU,EAAEsB,qBAAgB7C,SAAhB,CAA0BuB;AAnBvB,CAAjB;eAqBenB,I","sourcesContent":["import React, {useMemo, memo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {get, isEmpty, isUndefined, pick} from 'lodash/fp';\nimport {\n NovaSolidLoginLocked as LockIcon,\n NovaCompositionCoorpacademyPictures as PicturesIcon\n} from '@coorpacademy/nova-icons';\nimport {isExternalContent, EXTERNAL_CONTENT_ICONS} from '../../util/external-content';\nimport Provider from '../../atom/provider';\nimport CardContentInfo, {MODES} from '../card-content';\nimport Customer from './customer';\nimport Favorite from './favorite';\nimport Selectable from './selectable';\nimport Notification from './notification';\nimport style from './style.css';\n\nconst CardBackground = ({type, image, empty}, {skin}) => {\n const externalContent = isExternalContent(type);\n const primaryColor = get('common.primary', skin);\n const whiteColor = get('common.white', skin);\n\n if (externalContent && EXTERNAL_CONTENT_ICONS[type]) {\n const IconType = EXTERNAL_CONTENT_ICONS[type].icon;\n const iconColor = EXTERNAL_CONTENT_ICONS[type].color;\n const backgroundIcon = (\n <div className={style.externalIconCircleWrapper}>\n <IconType className={style.externalIcon} />\n </div>\n );\n\n if (image) {\n const _backgroundIcon = (\n <div\n className={classnames(\n style.externalIconCircleWrapper,\n style.externalIconCircleWithImageWrapper\n )}\n style={{\n backgroundColor: iconColor\n }}\n >\n <IconType className={style.externalIconWithImage} />\n </div>\n );\n\n return (\n <div className={style.imageWrapper}>\n <div\n data-name=\"cover\"\n style={{\n backgroundColor: iconColor,\n backgroundImage: `url('${image}')`\n }}\n className={classnames(style.externalContentHeader, style.externalBackground)}\n >\n {_backgroundIcon}\n </div>\n </div>\n );\n }\n return (\n <div className={style.imageWrapper}>\n <div\n data-name=\"cover\"\n style={{\n backgroundColor: iconColor\n }}\n className={style.externalContentHeader}\n >\n {backgroundIcon}\n </div>\n </div>\n );\n }\n\n const emptyIcon = empty ? <PicturesIcon className={style.emptyIcon} color={whiteColor} /> : null;\n return (\n <div\n className={classnames(\n style.imageWrapper,\n type === 'chapter' ? style.chapterImageWrapper : null\n )}\n >\n <div\n data-name=\"cover\"\n className={style.image}\n style={{\n backgroundColor: primaryColor,\n backgroundImage: image ? `url('${image}')` : 'none'\n }}\n >\n {emptyIcon}\n </div>\n </div>\n );\n};\n\nCardBackground.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nCardBackground.propTypes = {\n type: PropTypes.string,\n image: PropTypes.string,\n empty: PropTypes.bool\n};\n\nconst Card = memo(function Card(props, context) {\n const {skin} = context;\n const {\n image,\n badge,\n adaptiv,\n disabled = false,\n type = 'course',\n title,\n author,\n customer,\n certifiedAuthor,\n progress,\n favorite,\n addFavoriteToolTip,\n removeFavoriteToolTip,\n onClick,\n onFavoriteClick,\n isSelected,\n notification,\n badgeCategory,\n badgeLabel\n } = props;\n const empty = isEmpty(pick(['title', 'type', 'author', 'image'], props));\n const primaryColor = get('common.primary', skin);\n const whiteColor = get('common.white', skin);\n const cardStyle = classnames(\n type === 'chapter' ? style.chapter : style.course,\n title ? null : style.lazy,\n style.grid,\n empty ? style.empty : null\n );\n const handleClick = useMemo(() => e => !disabled && onClick(e), [disabled, onClick]);\n const lock = disabled ? (\n <LockIcon className={style.lockIcon} color={whiteColor} height={40} />\n ) : null;\n const inlineBadgeStyle = {color: primaryColor};\n const getType = contentType => {\n switch (contentType) {\n case 'chapter':\n return 'microlearning';\n case 'course':\n return 'learner';\n default:\n return contentType;\n }\n };\n\n return (\n <div\n className={cardStyle}\n data-name=\"card\"\n data-lock={disabled}\n data-type={getType(type)}\n disabled={disabled}\n onClick={handleClick}\n >\n <CardBackground type={type} image={image} empty={empty} />\n {isUndefined(isSelected) && !isUndefined(favorite) ? (\n <Favorite\n className={style.favorite}\n favorite={favorite}\n disabled={disabled}\n onFavoriteClick={onFavoriteClick}\n addFavoriteToolTip={addFavoriteToolTip}\n removeFavoriteToolTip={removeFavoriteToolTip}\n />\n ) : null}\n <Selectable isSelected={isSelected} />\n {notification ? <Notification {...notification} /> : null}\n {customer ? (\n <Customer\n {...customer}\n className={classnames(style.customer, type === 'chapter' ? style.chapterCustomer : null)}\n />\n ) : null}\n <CardContentInfo\n mode={MODES.CARD}\n adaptiv={adaptiv}\n author={author}\n certifiedAuthor={certifiedAuthor}\n disabled={disabled}\n empty={empty}\n progress={progress}\n title={title}\n type={type}\n badgeCategory={badgeCategory}\n badgeLabel={badgeLabel}\n />\n {badge ? (\n <div className={style.badge} style={inlineBadgeStyle}>\n {badge}\n </div>\n ) : null}\n {disabled ? <div className={style.lockWrapper}>{lock}</div> : null}\n </div>\n );\n});\n\nCard.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nCard.propTypes = {\n badge: PropTypes.string,\n image: PropTypes.string,\n disabled: PropTypes.bool,\n adaptiv: PropTypes.bool,\n type: PropTypes.string,\n title: PropTypes.string,\n author: PropTypes.string,\n certifiedAuthor: PropTypes.bool,\n customer: PropTypes.shape(Customer.propTypes),\n progress: PropTypes.number,\n favorite: PropTypes.bool,\n addFavoriteToolTip: PropTypes.string,\n removeFavoriteToolTip: PropTypes.string,\n onClick: PropTypes.func,\n onFavoriteClick: PropTypes.func,\n isSelected: PropTypes.bool,\n notification: PropTypes.shape(Notification.propTypes),\n badgeCategory: CardContentInfo.propTypes.badgeCategory,\n badgeLabel: CardContentInfo.propTypes.badgeLabel\n};\nexport default Card;\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../src/molecule/card/index.js"],"names":["THEMES","default","coorpmanager","style","CardBackground","type","image","empty","skin","externalContent","primaryColor","whiteColor","EXTERNAL_CONTENT_ICONS","IconType","icon","iconColor","color","backgroundIcon","externalIconCircleWrapper","externalIcon","_backgroundIcon","externalIconCircleWithImageWrapper","backgroundColor","externalIconWithImage","imageWrapper","backgroundImage","externalContentHeader","externalBackground","emptyIcon","chapterImageWrapper","contextTypes","Provider","childContextTypes","propTypes","PropTypes","string","bool","Card","props","context","badge","adaptiv","disabled","title","author","customer","certifiedAuthor","progress","favorite","addFavoriteToolTip","removeFavoriteToolTip","onClick","onFavoriteClick","isSelected","notification","badgeCategory","badgeLabel","theme","cardStyle","chapter","course","lazy","grid","handleClick","e","lock","lockIcon","inlineBadgeStyle","getType","contentType","MODES","CARD","lockWrapper","shape","Customer","number","func","Notification","CardContentInfo","oneOf"],"mappings":";;;;;;;;;;;;;;;AAAA;;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AASfS,EAAAA,QAAQ,EAAEX,mBAAUuC,KAAV,CAAgBC,kBAASzC,SAAzB,CATK;AAUfc,EAAAA,QAAQ,EAAEb,mBAAUyC,MAVL;AAWf3B,EAAAA,QAAQ,EAAEd,mBAAUE,IAXL;AAYfa,EAAAA,kBAAkB,EAAEf,mBAAUC,MAZf;AAafe,EAAAA,qBAAqB,EAAEhB,mBAAUC,MAblB;AAcfgB,EAAAA,OAAO,EAAEjB,mBAAU0C,IAdJ;AAefxB,EAAAA,eAAe,EAAElB,mBAAU0C,IAfZ;AAgBfvB,EAAAA,UAAU,EAAEnB,mBAAUE,IAhBP;AAiBfkB,EAAAA,YAAY,EAAEpB,mBAAUuC,KAAV,CAAgBI,sBAAa5C,SAA7B,CAjBC;AAkBfsB,EAAAA,aAAa,EAAEuB,qBAAgB7C,SAAhB,CAA0BsB,aAlB1B;AAmBfC,EAAAA,UAAU,EAAEsB,qBAAgB7C,SAAhB,CAA0BuB,UAnBvB;AAoBfC,EAAAA,KAAK,EAAEvB,mBAAU6C,KAAV,CAAgB,oBAAK/E,MAAL,CAAhB;AApBQ,CAAjB;eAsBeqC,I","sourcesContent":["import React, {useMemo, memo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {get, isEmpty, isUndefined, pick, keys} from 'lodash/fp';\nimport {\n NovaSolidLoginLocked as LockIcon,\n NovaCompositionCoorpacademyPictures as PicturesIcon\n} from '@coorpacademy/nova-icons';\nimport {isExternalContent, EXTERNAL_CONTENT_ICONS} from '../../util/external-content';\nimport Provider from '../../atom/provider';\nimport CardContentInfo, {MODES} from '../card-content';\nimport Customer from './customer';\nimport Favorite from './favorite';\nimport Selectable from './selectable';\nimport Notification from './notification';\nimport style from './style.css';\n\nexport const THEMES = {\n default: null,\n coorpmanager: style.coorpmanager\n};\n\nconst CardBackground = ({type, image, empty}, {skin}) => {\n const externalContent = isExternalContent(type);\n const primaryColor = get('common.primary', skin);\n const whiteColor = get('common.white', skin);\n\n if (externalContent && EXTERNAL_CONTENT_ICONS[type]) {\n const IconType = EXTERNAL_CONTENT_ICONS[type].icon;\n const iconColor = EXTERNAL_CONTENT_ICONS[type].color;\n const backgroundIcon = (\n <div className={style.externalIconCircleWrapper}>\n <IconType className={style.externalIcon} />\n </div>\n );\n\n if (image) {\n const _backgroundIcon = (\n <div\n className={classnames(\n style.externalIconCircleWrapper,\n style.externalIconCircleWithImageWrapper\n )}\n style={{\n backgroundColor: iconColor\n }}\n >\n <IconType className={style.externalIconWithImage} />\n </div>\n );\n\n return (\n <div className={style.imageWrapper}>\n <div\n data-name=\"cover\"\n style={{\n backgroundColor: iconColor,\n backgroundImage: `url('${image}')`\n }}\n className={classnames(style.externalContentHeader, style.externalBackground)}\n >\n {_backgroundIcon}\n </div>\n </div>\n );\n }\n return (\n <div className={style.imageWrapper}>\n <div\n data-name=\"cover\"\n style={{\n backgroundColor: iconColor\n }}\n className={style.externalContentHeader}\n >\n {backgroundIcon}\n </div>\n </div>\n );\n }\n\n const emptyIcon = empty ? <PicturesIcon className={style.emptyIcon} color={whiteColor} /> : null;\n return (\n <div\n className={classnames(\n style.imageWrapper,\n type === 'chapter' ? style.chapterImageWrapper : null\n )}\n >\n <div\n data-name=\"cover\"\n className={style.image}\n style={{\n backgroundColor: primaryColor,\n backgroundImage: image ? `url('${image}')` : 'none'\n }}\n >\n {emptyIcon}\n </div>\n </div>\n );\n};\n\nCardBackground.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nCardBackground.propTypes = {\n type: PropTypes.string,\n image: PropTypes.string,\n empty: PropTypes.bool\n};\n\nconst Card = memo(function Card(props, context) {\n const {skin} = context;\n const {\n image,\n badge,\n adaptiv,\n disabled = false,\n type = 'course',\n title,\n author,\n customer,\n certifiedAuthor,\n progress,\n favorite,\n addFavoriteToolTip,\n removeFavoriteToolTip,\n onClick,\n onFavoriteClick,\n isSelected,\n notification,\n badgeCategory,\n badgeLabel,\n theme = 'default'\n } = props;\n const empty = isEmpty(pick(['title', 'type', 'author', 'image'], props));\n const primaryColor = get('common.primary', skin);\n const whiteColor = get('common.white', skin);\n const cardStyle = classnames(\n THEMES[theme],\n type === 'chapter' ? style.chapter : style.course,\n title ? null : style.lazy,\n style.grid,\n empty ? style.empty : null\n );\n const handleClick = useMemo(() => e => !disabled && onClick(e), [disabled, onClick]);\n const lock = disabled ? (\n <LockIcon className={style.lockIcon} color={whiteColor} height={40} />\n ) : null;\n const inlineBadgeStyle = {color: primaryColor};\n const getType = contentType => {\n switch (contentType) {\n case 'chapter':\n return 'microlearning';\n case 'course':\n return 'learner';\n default:\n return contentType;\n }\n };\n\n return (\n <div\n className={cardStyle}\n data-name=\"card\"\n data-lock={disabled}\n data-type={getType(type)}\n disabled={disabled}\n onClick={handleClick}\n >\n <CardBackground type={type} image={image} empty={empty} />\n {isUndefined(isSelected) && !isUndefined(favorite) ? (\n <Favorite\n className={style.favorite}\n favorite={favorite}\n disabled={disabled}\n onFavoriteClick={onFavoriteClick}\n addFavoriteToolTip={addFavoriteToolTip}\n removeFavoriteToolTip={removeFavoriteToolTip}\n />\n ) : null}\n <Selectable isSelected={isSelected} />\n {notification ? <Notification {...notification} /> : null}\n {customer ? <Customer {...customer} theme={theme} type={type} disabled={disabled} /> : null}\n <CardContentInfo\n mode={MODES.CARD}\n adaptiv={adaptiv}\n author={author}\n certifiedAuthor={certifiedAuthor}\n disabled={disabled}\n empty={empty}\n progress={progress}\n title={title}\n type={type}\n badgeCategory={badgeCategory}\n badgeLabel={badgeLabel}\n theme={theme}\n />\n {badge ? (\n <div className={style.badge} style={inlineBadgeStyle}>\n {badge}\n </div>\n ) : null}\n {disabled ? <div className={style.lockWrapper}>{lock}</div> : null}\n </div>\n );\n});\n\nCard.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nCard.propTypes = {\n badge: PropTypes.string,\n image: PropTypes.string,\n disabled: PropTypes.bool,\n adaptiv: PropTypes.bool,\n type: PropTypes.string,\n title: PropTypes.string,\n author: PropTypes.string,\n certifiedAuthor: PropTypes.bool,\n customer: PropTypes.shape(Customer.propTypes),\n progress: PropTypes.number,\n favorite: PropTypes.bool,\n addFavoriteToolTip: PropTypes.string,\n removeFavoriteToolTip: PropTypes.string,\n onClick: PropTypes.func,\n onFavoriteClick: PropTypes.func,\n isSelected: PropTypes.bool,\n notification: PropTypes.shape(Notification.propTypes),\n badgeCategory: CardContentInfo.propTypes.badgeCategory,\n badgeLabel: CardContentInfo.propTypes.badgeLabel,\n theme: PropTypes.oneOf(keys(THEMES))\n};\nexport default Card;\n"],"file":"index.js"}
@@ -36,25 +36,6 @@
36
36
  z-index: 0;
37
37
  }
38
38
 
39
- .customer {
40
- position: absolute;
41
- top: 0;
42
- left: 0;
43
- width: 100%;
44
- height: 100%;
45
- }
46
-
47
- .customer {
48
- background: linear-gradient(
49
- to bottom,
50
- rgba(0, 0, 0, 0.2) 0%,
51
- rgba(0, 0, 0, 0) 20%
52
- );
53
- }
54
- .chapterCustomer {
55
- padding-top: 10px;
56
- }
57
-
58
39
  .grid.empty {
59
40
  padding-bottom: 25px;
60
41
  opacity: 0.6;
@@ -66,6 +47,7 @@
66
47
  width: 256px;
67
48
  height: 297px;
68
49
  }
50
+
69
51
  .chapter {
70
52
  composes: default;
71
53
  border-radius: 8px;
@@ -73,6 +55,18 @@
73
55
  height: 297px;
74
56
  }
75
57
 
58
+ .coorpmanager.course {
59
+ border-radius: 5px;
60
+ width: 172px;
61
+ height: 201px;
62
+ }
63
+
64
+ .coorpmanager.chapter {
65
+ border-radius: 5px;
66
+ width: 138px;
67
+ height: 201px;
68
+ }
69
+
76
70
  .course .imageWrapper {
77
71
  width: 100%;
78
72
  height: 100%;
@@ -89,6 +83,10 @@
89
83
  left: 0;
90
84
  }
91
85
 
86
+ .coorpmanager.chapter .chapterImageWrapper {
87
+ max-height: 52px;
88
+ }
89
+
92
90
  .default .image {
93
91
  overflow: hidden;
94
92
  background-position: 50%;
@@ -218,10 +216,6 @@
218
216
  left: 0;
219
217
  }
220
218
 
221
- .default[disabled] .customer {
222
- background: none;
223
- }
224
-
225
219
  .badge {
226
220
  position: absolute;
227
221
  width: auto;
@@ -239,6 +233,11 @@
239
233
  user-select: none;
240
234
  }
241
235
 
236
+ .coorpmanager .badge {
237
+ padding: 2px 5px;
238
+ font-size: 7px;
239
+ }
240
+
242
241
  .emptyIcon {
243
242
  vertical-align: middle;
244
243
  width: 80px;
@@ -295,11 +294,24 @@
295
294
  }
296
295
 
297
296
  .externalIconCircleWrapper {
297
+ border-radius: 50%;
298
+ padding: 17px;
299
+ box-sizing: border-box;
300
+ background-color: rgba(255, 255, 255, 0.3);
301
+ justify-content: center;
302
+ transform: scale(1);
303
+ transition: transform 0.25s ease-in-out;
298
304
  width: 80px;
299
305
  height: 80px;
300
306
  margin-top: 20px;
307
+ }
308
+
309
+ .coorpmanager .externalIconCircleWrapper {
310
+ width: 50px;
311
+ height: 50px;
312
+ margin-top: 12px;
313
+ padding: 13px;
301
314
  border-radius: 50%;
302
- padding: 17px;
303
315
  box-sizing: border-box;
304
316
  background-color: rgba(255, 255, 255, 0.3);
305
317
  justify-content: center;
@@ -313,6 +325,12 @@
313
325
  height: 45px;
314
326
  }
315
327
 
328
+ .coorpmanager .externalIcon {
329
+ color: white;
330
+ width: 23px;
331
+ height: 23px;
332
+ }
333
+
316
334
  .externalIconCircleWrapper::after {
317
335
  animation: pulse 3s linear 0s infinite;
318
336
  animation-play-state: paused;
@@ -343,6 +361,18 @@
343
361
  transition: box-shadow 0.25s linear;
344
362
  }
345
363
 
364
+ .coorpmanager .externalIconCircleWrapper::after,
365
+ .coorpmanager .externalIconCircleWrapper::before {
366
+ width: 50px;
367
+ height: 50px;
368
+ top: 0;
369
+ left: 0;
370
+ transform: scale(1);
371
+ opacity: 0;
372
+ box-shadow: inset 0 0 7px 0 rgba(255, 255, 255, 0);
373
+ transition: box-shadow 0.25s linear;
374
+ }
375
+
346
376
  .externalIconCircleWithImageWrapper {
347
377
  width: 60px;
348
378
  height: 60px;
@@ -350,6 +380,22 @@
350
380
  z-index: 1;
351
381
  }
352
382
 
383
+ .coorpmanager .externalIconCircleWithImageWrapper {
384
+ width: 50px;
385
+ height: 50px;
386
+ border-radius: 50%;
387
+ padding: 12px;
388
+ z-index: 1;
389
+ margin-top: 20px;
390
+ }
391
+
392
+ .coorpmanager .externalIconWithImage {
393
+ color: white;
394
+ width: 25px;
395
+ height: 25px;
396
+ padding: 0 0 0 1px;
397
+ }
398
+
353
399
  .externalIconWithImage {
354
400
  color: white;
355
401
  width: 28px;
@@ -372,6 +418,22 @@
372
418
  transition: box-shadow 0.25s linear;
373
419
  }
374
420
 
421
+ .coorpmanager .externalIconCircleWithImageWrapper::after,
422
+ .coorpmanager .externalIconCircleWithImageWrapper::before {
423
+ content: '';
424
+ width: 50px;
425
+ height: 50px;
426
+ top: 0;
427
+ left: 0;
428
+ position: absolute;
429
+ transform: scale(1);
430
+ opacity: 0;
431
+ box-shadow: inset 0 0 7px 0 rgba(255, 255, 255, 0);
432
+ transition: box-shadow 0.25s linear;
433
+
434
+ }
435
+
436
+
375
437
  @keyframes pulse {
376
438
  0% {
377
439
  transform: scale(1);
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.default = void 0;
5
+
6
+ var _defaultsDeep2 = _interopRequireDefault(require("lodash/fp/defaultsDeep"));
7
+
8
+ var _default2 = _interopRequireDefault(require("./default"));
9
+
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+
12
+ const {
13
+ props
14
+ } = _default2.default;
15
+ var _default = {
16
+ props: (0, _defaultsDeep2.default)(props, {
17
+ disabled: false,
18
+ type: 'course',
19
+ image: 'https://api.coorpacademy.com/api-service/medias?url=https://static.coorpacademy.com/content/CoorpAcademy/content-marmiton/cockpit-marmiton/cover/shutterstock_520965634-1491986518210.jpg&h=500&w=500&q=90',
20
+ progress: 0.1,
21
+ isSelected: false,
22
+ badgeCategory: 'base',
23
+ badgeLabel: 'basic',
24
+ theme: 'coorpmanager'
25
+ })
26
+ };
27
+ exports.default = _default;
28
+ //# sourceMappingURL=coorpmanager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/molecule/card/test/fixtures/coorpmanager.js"],"names":["props","Default","disabled","type","image","progress","isSelected","badgeCategory","badgeLabel","theme"],"mappings":";;;;;;;AACA;;;;AAEA,MAAM;AAACA,EAAAA;AAAD,IAAUC,iBAAhB;eAEe;AACbD,EAAAA,KAAK,EAAE,4BAAaA,KAAb,EAAoB;AACzBE,IAAAA,QAAQ,EAAE,KADe;AAEzBC,IAAAA,IAAI,EAAE,QAFmB;AAGzBC,IAAAA,KAAK,EACH,4MAJuB;AAKzBC,IAAAA,QAAQ,EAAE,GALe;AAMzBC,IAAAA,UAAU,EAAE,KANa;AAOzBC,IAAAA,aAAa,EAAE,MAPU;AAQzBC,IAAAA,UAAU,EAAE,OARa;AASzBC,IAAAA,KAAK,EAAE;AATkB,GAApB;AADM,C","sourcesContent":["import {defaultsDeep} from 'lodash/fp';\nimport Default from './default';\n\nconst {props} = Default;\n\nexport default {\n props: defaultsDeep(props, {\n disabled: false,\n type: 'course',\n image:\n 'https://api.coorpacademy.com/api-service/medias?url=https://static.coorpacademy.com/content/CoorpAcademy/content-marmiton/cockpit-marmiton/cover/shutterstock_520965634-1491986518210.jpg&h=500&w=500&q=90',\n progress: 0.1,\n isSelected: false,\n badgeCategory: 'base',\n badgeLabel: 'basic',\n theme: 'coorpmanager'\n })\n};\n"],"file":"coorpmanager.js"}
@@ -16,6 +16,8 @@ var _arabic = _interopRequireDefault(require("./fixtures/arabic"));
16
16
 
17
17
  var _article = _interopRequireDefault(require("./fixtures/article"));
18
18
 
19
+ var _coorpmanager = _interopRequireDefault(require("./fixtures/coorpmanager"));
20
+
19
21
  var _default = _interopRequireDefault(require("./fixtures/default"));
20
22
 
21
23
  var _disabled = _interopRequireDefault(require("./fixtures/disabled"));
@@ -52,6 +54,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
52
54
  (0, _ava.default)('Molecule › MoleculeCard › Adaptiv › should be rendered', _renderComponent.default, _.default, _adaptiv.default);
53
55
  (0, _ava.default)('Molecule › MoleculeCard › Arabic › should be rendered', _renderComponent.default, _.default, _arabic.default);
54
56
  (0, _ava.default)('Molecule › MoleculeCard › Article › should be rendered', _renderComponent.default, _.default, _article.default);
57
+ (0, _ava.default)('Molecule › MoleculeCard › Coorpmanager › should be rendered', _renderComponent.default, _.default, _coorpmanager.default);
55
58
  (0, _ava.default)('Molecule › MoleculeCard › Default › should be rendered', _renderComponent.default, _.default, _default.default);
56
59
  (0, _ava.default)('Molecule › MoleculeCard › Disabled › should be rendered', _renderComponent.default, _.default, _disabled.default);
57
60
  (0, _ava.default)('Molecule › MoleculeCard › Empty › should be rendered', _renderComponent.default, _.default, _empty.default);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/molecule/card/test/fixtures.js"],"names":["t","pass","MoleculeCard","propTypes","value","key","not","undefined","renderComponentMacro","fixtureAdaptivAndDisabled","fixtureAdaptiv","fixtureArabic","fixtureArticle","fixtureDefault","fixtureDisabled","fixtureEmpty","fixtureExternalContent","fixtureFavorite","fixtureFreerunAndDisabled","fixtureFreerun","fixturePodcast","fixtureScorm","fixtureSelectableFalse","fixtureSelectableTrue","fixtureVideo"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,uDAAL,EAA8DA,CAAC,IAAI;AACjEA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAaC,SAArB,EAAgC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC9CL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,iDAAgDF,GAAI,mEAA7E;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,mEAAL,EAA0EG,wBAA1E,EAAgGN,SAAhG,EAA8GO,2BAA9G;AACA,kBAAK,wDAAL,EAA+DD,wBAA/D,EAAqFN,SAArF,EAAmGQ,gBAAnG;AACA,kBAAK,uDAAL,EAA8DF,wBAA9D,EAAoFN,SAApF,EAAkGS,eAAlG;AACA,kBAAK,wDAAL,EAA+DH,wBAA/D,EAAqFN,SAArF,EAAmGU,gBAAnG;AACA,kBAAK,wDAAL,EAA+DJ,wBAA/D,EAAqFN,SAArF,EAAmGW,gBAAnG;AACA,kBAAK,yDAAL,EAAgEL,wBAAhE,EAAsFN,SAAtF,EAAoGY,iBAApG;AACA,kBAAK,sDAAL,EAA6DN,wBAA7D,EAAmFN,SAAnF,EAAiGa,cAAjG;AACA,kBAAK,gEAAL,EAAuEP,wBAAvE,EAA6FN,SAA7F,EAA2Gc,wBAA3G;AACA,kBAAK,yDAAL,EAAgER,wBAAhE,EAAsFN,SAAtF,EAAoGe,iBAApG;AACA,kBAAK,mEAAL,EAA0ET,wBAA1E,EAAgGN,SAAhG,EAA8GgB,2BAA9G;AACA,kBAAK,wDAAL,EAA+DV,wBAA/D,EAAqFN,SAArF,EAAmGiB,gBAAnG;AACA,kBAAK,wDAAL,EAA+DX,wBAA/D,EAAqFN,SAArF,EAAmGkB,gBAAnG;AACA,kBAAK,sDAAL,EAA6DZ,wBAA7D,EAAmFN,SAAnF,EAAiGmB,cAAjG;AACA,kBAAK,gEAAL,EAAuEb,wBAAvE,EAA6FN,SAA7F,EAA2GoB,wBAA3G;AACA,kBAAK,+DAAL,EAAsEd,wBAAtE,EAA4FN,SAA5F,EAA0GqB,uBAA1G;AACA,kBAAK,sDAAL,EAA6Df,wBAA7D,EAAmFN,SAAnF,EAAiGsB,cAAjG","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeCard from '..';\nimport fixtureAdaptivAndDisabled from './fixtures/adaptiv-and-disabled';\nimport fixtureAdaptiv from './fixtures/adaptiv';\nimport fixtureArabic from './fixtures/arabic';\nimport fixtureArticle from './fixtures/article';\nimport fixtureDefault from './fixtures/default';\nimport fixtureDisabled from './fixtures/disabled';\nimport fixtureEmpty from './fixtures/empty';\nimport fixtureExternalContent from './fixtures/external-content';\nimport fixtureFavorite from './fixtures/favorite';\nimport fixtureFreerunAndDisabled from './fixtures/freerun-and-disabled';\nimport fixtureFreerun from './fixtures/freerun';\nimport fixturePodcast from './fixtures/podcast';\nimport fixtureScorm from './fixtures/scorm';\nimport fixtureSelectableFalse from './fixtures/selectable-false';\nimport fixtureSelectableTrue from './fixtures/selectable-true';\nimport fixtureVideo from './fixtures/video';\n\ntest('Molecule › MoleculeCard > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeCard.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeCard.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeCard › AdaptivAndDisabled › should be rendered', renderComponentMacro, MoleculeCard, fixtureAdaptivAndDisabled);\ntest('Molecule › MoleculeCard › Adaptiv › should be rendered', renderComponentMacro, MoleculeCard, fixtureAdaptiv);\ntest('Molecule › MoleculeCard › Arabic › should be rendered', renderComponentMacro, MoleculeCard, fixtureArabic);\ntest('Molecule › MoleculeCard › Article › should be rendered', renderComponentMacro, MoleculeCard, fixtureArticle);\ntest('Molecule › MoleculeCard › Default › should be rendered', renderComponentMacro, MoleculeCard, fixtureDefault);\ntest('Molecule › MoleculeCard › Disabled › should be rendered', renderComponentMacro, MoleculeCard, fixtureDisabled);\ntest('Molecule › MoleculeCard › Empty › should be rendered', renderComponentMacro, MoleculeCard, fixtureEmpty);\ntest('Molecule › MoleculeCard › ExternalContent › should be rendered', renderComponentMacro, MoleculeCard, fixtureExternalContent);\ntest('Molecule › MoleculeCard › Favorite › should be rendered', renderComponentMacro, MoleculeCard, fixtureFavorite);\ntest('Molecule › MoleculeCard › FreerunAndDisabled › should be rendered', renderComponentMacro, MoleculeCard, fixtureFreerunAndDisabled);\ntest('Molecule › MoleculeCard › Freerun › should be rendered', renderComponentMacro, MoleculeCard, fixtureFreerun);\ntest('Molecule › MoleculeCard › Podcast › should be rendered', renderComponentMacro, MoleculeCard, fixturePodcast);\ntest('Molecule › MoleculeCard › Scorm › should be rendered', renderComponentMacro, MoleculeCard, fixtureScorm);\ntest('Molecule › MoleculeCard › SelectableFalse › should be rendered', renderComponentMacro, MoleculeCard, fixtureSelectableFalse);\ntest('Molecule › MoleculeCard › SelectableTrue › should be rendered', renderComponentMacro, MoleculeCard, fixtureSelectableTrue);\ntest('Molecule › MoleculeCard › Video › should be rendered', renderComponentMacro, MoleculeCard, fixtureVideo);\n"],"file":"fixtures.js"}
1
+ {"version":3,"sources":["../../../../src/molecule/card/test/fixtures.js"],"names":["t","pass","MoleculeCard","propTypes","value","key","not","undefined","renderComponentMacro","fixtureAdaptivAndDisabled","fixtureAdaptiv","fixtureArabic","fixtureArticle","fixtureCoorpmanager","fixtureDefault","fixtureDisabled","fixtureEmpty","fixtureExternalContent","fixtureFavorite","fixtureFreerunAndDisabled","fixtureFreerun","fixturePodcast","fixtureScorm","fixtureSelectableFalse","fixtureSelectableTrue","fixtureVideo"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,uDAAL,EAA8DA,CAAC,IAAI;AACjEA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAaC,SAArB,EAAgC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC9CL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,iDAAgDF,GAAI,mEAA7E;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,mEAAL,EAA0EG,wBAA1E,EAAgGN,SAAhG,EAA8GO,2BAA9G;AACA,kBAAK,wDAAL,EAA+DD,wBAA/D,EAAqFN,SAArF,EAAmGQ,gBAAnG;AACA,kBAAK,uDAAL,EAA8DF,wBAA9D,EAAoFN,SAApF,EAAkGS,eAAlG;AACA,kBAAK,wDAAL,EAA+DH,wBAA/D,EAAqFN,SAArF,EAAmGU,gBAAnG;AACA,kBAAK,6DAAL,EAAoEJ,wBAApE,EAA0FN,SAA1F,EAAwGW,qBAAxG;AACA,kBAAK,wDAAL,EAA+DL,wBAA/D,EAAqFN,SAArF,EAAmGY,gBAAnG;AACA,kBAAK,yDAAL,EAAgEN,wBAAhE,EAAsFN,SAAtF,EAAoGa,iBAApG;AACA,kBAAK,sDAAL,EAA6DP,wBAA7D,EAAmFN,SAAnF,EAAiGc,cAAjG;AACA,kBAAK,gEAAL,EAAuER,wBAAvE,EAA6FN,SAA7F,EAA2Ge,wBAA3G;AACA,kBAAK,yDAAL,EAAgET,wBAAhE,EAAsFN,SAAtF,EAAoGgB,iBAApG;AACA,kBAAK,mEAAL,EAA0EV,wBAA1E,EAAgGN,SAAhG,EAA8GiB,2BAA9G;AACA,kBAAK,wDAAL,EAA+DX,wBAA/D,EAAqFN,SAArF,EAAmGkB,gBAAnG;AACA,kBAAK,wDAAL,EAA+DZ,wBAA/D,EAAqFN,SAArF,EAAmGmB,gBAAnG;AACA,kBAAK,sDAAL,EAA6Db,wBAA7D,EAAmFN,SAAnF,EAAiGoB,cAAjG;AACA,kBAAK,gEAAL,EAAuEd,wBAAvE,EAA6FN,SAA7F,EAA2GqB,wBAA3G;AACA,kBAAK,+DAAL,EAAsEf,wBAAtE,EAA4FN,SAA5F,EAA0GsB,uBAA1G;AACA,kBAAK,sDAAL,EAA6DhB,wBAA7D,EAAmFN,SAAnF,EAAiGuB,cAAjG","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeCard from '..';\nimport fixtureAdaptivAndDisabled from './fixtures/adaptiv-and-disabled';\nimport fixtureAdaptiv from './fixtures/adaptiv';\nimport fixtureArabic from './fixtures/arabic';\nimport fixtureArticle from './fixtures/article';\nimport fixtureCoorpmanager from './fixtures/coorpmanager';\nimport fixtureDefault from './fixtures/default';\nimport fixtureDisabled from './fixtures/disabled';\nimport fixtureEmpty from './fixtures/empty';\nimport fixtureExternalContent from './fixtures/external-content';\nimport fixtureFavorite from './fixtures/favorite';\nimport fixtureFreerunAndDisabled from './fixtures/freerun-and-disabled';\nimport fixtureFreerun from './fixtures/freerun';\nimport fixturePodcast from './fixtures/podcast';\nimport fixtureScorm from './fixtures/scorm';\nimport fixtureSelectableFalse from './fixtures/selectable-false';\nimport fixtureSelectableTrue from './fixtures/selectable-true';\nimport fixtureVideo from './fixtures/video';\n\ntest('Molecule › MoleculeCard > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeCard.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeCard.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeCard › AdaptivAndDisabled › should be rendered', renderComponentMacro, MoleculeCard, fixtureAdaptivAndDisabled);\ntest('Molecule › MoleculeCard › Adaptiv › should be rendered', renderComponentMacro, MoleculeCard, fixtureAdaptiv);\ntest('Molecule › MoleculeCard › Arabic › should be rendered', renderComponentMacro, MoleculeCard, fixtureArabic);\ntest('Molecule › MoleculeCard › Article › should be rendered', renderComponentMacro, MoleculeCard, fixtureArticle);\ntest('Molecule › MoleculeCard › Coorpmanager › should be rendered', renderComponentMacro, MoleculeCard, fixtureCoorpmanager);\ntest('Molecule › MoleculeCard › Default › should be rendered', renderComponentMacro, MoleculeCard, fixtureDefault);\ntest('Molecule › MoleculeCard › Disabled › should be rendered', renderComponentMacro, MoleculeCard, fixtureDisabled);\ntest('Molecule › MoleculeCard › Empty › should be rendered', renderComponentMacro, MoleculeCard, fixtureEmpty);\ntest('Molecule › MoleculeCard › ExternalContent › should be rendered', renderComponentMacro, MoleculeCard, fixtureExternalContent);\ntest('Molecule › MoleculeCard › Favorite › should be rendered', renderComponentMacro, MoleculeCard, fixtureFavorite);\ntest('Molecule › MoleculeCard › FreerunAndDisabled › should be rendered', renderComponentMacro, MoleculeCard, fixtureFreerunAndDisabled);\ntest('Molecule › MoleculeCard › Freerun › should be rendered', renderComponentMacro, MoleculeCard, fixtureFreerun);\ntest('Molecule › MoleculeCard › Podcast › should be rendered', renderComponentMacro, MoleculeCard, fixturePodcast);\ntest('Molecule › MoleculeCard › Scorm › should be rendered', renderComponentMacro, MoleculeCard, fixtureScorm);\ntest('Molecule › MoleculeCard › SelectableFalse › should be rendered', renderComponentMacro, MoleculeCard, fixtureSelectableFalse);\ntest('Molecule › MoleculeCard › SelectableTrue › should be rendered', renderComponentMacro, MoleculeCard, fixtureSelectableTrue);\ntest('Molecule › MoleculeCard › Video › should be rendered', renderComponentMacro, MoleculeCard, fixtureVideo);\n"],"file":"fixtures.js"}
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.default = exports.MODES = void 0;
4
+ exports.default = exports.THEMES = exports.MODES = void 0;
5
+
6
+ var _keys2 = _interopRequireDefault(require("lodash/fp/keys"));
5
7
 
6
8
  var _isNil2 = _interopRequireDefault(require("lodash/fp/isNil"));
7
9
 
@@ -30,6 +32,11 @@ const MODES = {
30
32
  CARD: 'card'
31
33
  };
32
34
  exports.MODES = MODES;
35
+ const THEMES = {
36
+ default: null,
37
+ coorpmanager: _style2.default.coorpmanager
38
+ };
39
+ exports.THEMES = THEMES;
33
40
 
34
41
  const ContentTypeInfo = ({
35
42
  mode,
@@ -48,8 +55,7 @@ const ContentTypeInfo = ({
48
55
  return /*#__PURE__*/_react.default.createElement("div", {
49
56
  className: _style2.default.microLearningIcon
50
57
  }, /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionCoorpacademyTimer, {
51
- height: 40,
52
- width: 40
58
+ className: _style2.default.timerIcon
53
59
  }), /*#__PURE__*/_react.default.createElement("span", {
54
60
  className: _style2.default.microLearninglabel
55
61
  }, "5' learning"));
@@ -135,7 +141,8 @@ const ContentInfo = ({
135
141
  title,
136
142
  type,
137
143
  badgeCategory,
138
- badgeLabel
144
+ badgeLabel,
145
+ theme = 'default'
139
146
  }) => {
140
147
  const progressBarColor = '#3EC483';
141
148
  const inlineProgressValueStyle = {
@@ -159,7 +166,7 @@ const ContentInfo = ({
159
166
  })) : null;
160
167
  return /*#__PURE__*/_react.default.createElement("div", {
161
168
  "data-name": "info",
162
- className: (0, _classnames.default)(_style2.default.infoWrapper, mode === MODES.HERO ? _style2.default.hero : _style2.default.card, disabled ? _style2.default.progressBarDisabled : null, externalContent ? _style2.default.externalContent : null)
169
+ className: (0, _classnames.default)(THEMES[theme], _style2.default.infoWrapper, mode === MODES.HERO ? _style2.default.hero : _style2.default.card, disabled ? _style2.default.progressBarDisabled : null, externalContent ? _style2.default.externalContent : null)
163
170
  }, /*#__PURE__*/_react.default.createElement(ContentTypeInfo, {
164
171
  mode: mode,
165
172
  type: type,
@@ -197,7 +204,8 @@ ContentInfo.propTypes = process.env.NODE_ENV !== "production" ? {
197
204
  type: _propTypes.default.string,
198
205
  mode: _propTypes.default.string,
199
206
  badgeCategory: _contentBadge.default.propTypes.category,
200
- badgeLabel: _contentBadge.default.propTypes.label
207
+ badgeLabel: _contentBadge.default.propTypes.label,
208
+ theme: _propTypes.default.oneOf((0, _keys2.default)(THEMES))
201
209
  } : {};
202
210
  var _default = ContentInfo;
203
211
  exports.default = _default;