@coorpacademy/components 10.3.31 → 10.3.32-alpha.14

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 (57) 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 +25 -12
  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 +33 -18
  16. package/es/molecule/card-content/index.js.map +1 -1
  17. package/es/molecule/card-content/style.css +56 -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/test/fixtures/default.js +29 -7
  25. package/es/organism/course-selection/test/fixtures/default.js.map +1 -1
  26. package/es/organism/course-selection/test/fixtures.js +2 -0
  27. package/es/organism/course-selection/test/fixtures.js.map +1 -1
  28. package/es/organism/wizard-contents/style.css +1 -1
  29. package/lib/atom/input-switch/test/fixtures.js +15 -0
  30. package/lib/atom/input-switch/test/fixtures.js.map +1 -1
  31. package/lib/atom/loader/test/fixtures.js +3 -0
  32. package/lib/atom/loader/test/fixtures.js.map +1 -1
  33. package/lib/molecule/card/customer.css +61 -3
  34. package/lib/molecule/card/customer.js +22 -6
  35. package/lib/molecule/card/customer.js.map +1 -1
  36. package/lib/molecule/card/index.js +29 -13
  37. package/lib/molecule/card/index.js.map +1 -1
  38. package/lib/molecule/card/style.css +86 -24
  39. package/lib/molecule/card/test/fixtures/coorpmanager.js +28 -0
  40. package/lib/molecule/card/test/fixtures/coorpmanager.js.map +1 -0
  41. package/lib/molecule/card/test/fixtures.js +3 -0
  42. package/lib/molecule/card/test/fixtures.js.map +1 -1
  43. package/lib/molecule/card-content/index.js +36 -19
  44. package/lib/molecule/card-content/index.js.map +1 -1
  45. package/lib/molecule/card-content/style.css +56 -0
  46. package/lib/molecule/cockpit-popin/test/fixtures.js +28 -0
  47. package/lib/molecule/cockpit-popin/test/fixtures.js.map +1 -0
  48. package/lib/molecule/search/test/fixtures.js +25 -0
  49. package/lib/molecule/search/test/fixtures.js.map +1 -0
  50. package/lib/molecule/vertical-tabs/test/fixtures.js +3 -0
  51. package/lib/molecule/vertical-tabs/test/fixtures.js.map +1 -1
  52. package/lib/organism/course-selection/test/fixtures/default.js +30 -7
  53. package/lib/organism/course-selection/test/fixtures/default.js.map +1 -1
  54. package/lib/organism/course-selection/test/fixtures.js +3 -0
  55. package/lib/organism/course-selection/test/fixtures.js.map +1 -1
  56. package/lib/organism/wizard-contents/style.css +1 -1
  57. 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,10 +45,17 @@ 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,
49
- empty
57
+ empty,
58
+ theme
50
59
  }, {
51
60
  skin
52
61
  }) => {
@@ -59,19 +68,19 @@ const CardBackground = ({
59
68
  const iconColor = _externalContent.EXTERNAL_CONTENT_ICONS[type].color;
60
69
 
61
70
  const backgroundIcon = /*#__PURE__*/_react.default.createElement("div", {
62
- className: _style.default.externalIconCircleWrapper
71
+ className: (0, _classnames.default)(THEMES[theme], _style.default.externalIconCircleWrapper)
63
72
  }, /*#__PURE__*/_react.default.createElement(IconType, {
64
- className: _style.default.externalIcon
73
+ className: (0, _classnames.default)(THEMES[theme], _style.default.externalIcon)
65
74
  }));
66
75
 
67
76
  if (image) {
68
77
  const _backgroundIcon = /*#__PURE__*/_react.default.createElement("div", {
69
- className: (0, _classnames.default)(_style.default.externalIconCircleWrapper, _style.default.externalIconCircleWithImageWrapper),
78
+ className: (0, _classnames.default)(THEMES[theme], _style.default.externalIconCircleWrapper, _style.default.externalIconCircleWithImageWrapper),
70
79
  style: {
71
80
  backgroundColor: iconColor
72
81
  }
73
82
  }, /*#__PURE__*/_react.default.createElement(IconType, {
74
- className: _style.default.externalIconWithImage
83
+ className: (0, _classnames.default)(THEMES[theme], _style.default.externalIconWithImage)
75
84
  }));
76
85
 
77
86
  return /*#__PURE__*/_react.default.createElement("div", {
@@ -117,6 +126,7 @@ CardBackground.contextTypes = {
117
126
  skin: _provider.default.childContextTypes.skin
118
127
  };
119
128
  CardBackground.propTypes = process.env.NODE_ENV !== "production" ? {
129
+ theme: _propTypes.default.oneOf((0, _keys2.default)(THEMES)),
120
130
  type: _propTypes.default.string,
121
131
  image: _propTypes.default.string,
122
132
  empty: _propTypes.default.bool
@@ -144,12 +154,13 @@ const Card = (0, _react.memo)(function Card(props, context) {
144
154
  isSelected,
145
155
  notification,
146
156
  badgeCategory,
147
- badgeLabel
157
+ badgeLabel,
158
+ theme = 'default'
148
159
  } = props;
149
160
  const empty = (0, _isEmpty2.default)((0, _pick2.default)(['title', 'type', 'author', 'image'], props));
150
161
  const primaryColor = (0, _get2.default)('common.primary', skin);
151
162
  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);
163
+ 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
164
  const handleClick = (0, _react.useMemo)(() => e => !disabled && onClick(e), [disabled, onClick]);
154
165
  const lock = disabled ? /*#__PURE__*/_react.default.createElement(_novaIcons.NovaSolidLoginLocked, {
155
166
  className: _style.default.lockIcon,
@@ -183,7 +194,8 @@ const Card = (0, _react.memo)(function Card(props, context) {
183
194
  }, /*#__PURE__*/_react.default.createElement(CardBackground, {
184
195
  type: type,
185
196
  image: image,
186
- empty: empty
197
+ empty: empty,
198
+ theme: theme
187
199
  }), (0, _isUndefined2.default)(isSelected) && !(0, _isUndefined2.default)(favorite) ? /*#__PURE__*/_react.default.createElement(_favorite.default, {
188
200
  className: _style.default.favorite,
189
201
  favorite: favorite,
@@ -194,7 +206,9 @@ const Card = (0, _react.memo)(function Card(props, context) {
194
206
  }) : null, /*#__PURE__*/_react.default.createElement(_selectable.default, {
195
207
  isSelected: isSelected
196
208
  }), 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)
209
+ theme: theme,
210
+ type: type,
211
+ disabled: disabled
198
212
  })) : null, /*#__PURE__*/_react.default.createElement(_cardContent.default, {
199
213
  mode: _cardContent.MODES.CARD,
200
214
  adaptiv: adaptiv,
@@ -206,9 +220,10 @@ const Card = (0, _react.memo)(function Card(props, context) {
206
220
  title: title,
207
221
  type: type,
208
222
  badgeCategory: badgeCategory,
209
- badgeLabel: badgeLabel
223
+ badgeLabel: badgeLabel,
224
+ theme: theme
210
225
  }), badge ? /*#__PURE__*/_react.default.createElement("div", {
211
- className: _style.default.badge,
226
+ className: (0, _classnames.default)(THEMES[theme], _style.default.badge),
212
227
  style: inlineBadgeStyle
213
228
  }, badge) : null, disabled ? /*#__PURE__*/_react.default.createElement("div", {
214
229
  className: _style.default.lockWrapper
@@ -236,7 +251,8 @@ Card.propTypes = process.env.NODE_ENV !== "production" ? {
236
251
  isSelected: _propTypes.default.bool,
237
252
  notification: _propTypes.default.shape(_notification.default.propTypes),
238
253
  badgeCategory: _cardContent.default.propTypes.badgeCategory,
239
- badgeLabel: _cardContent.default.propTypes.badgeLabel
254
+ badgeLabel: _cardContent.default.propTypes.badgeLabel,
255
+ theme: _propTypes.default.oneOf((0, _keys2.default)(THEMES))
240
256
  } : {};
241
257
  var _default = Card;
242
258
  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,wCAAuBP,IAAvB,EAA6BW,KAA/C;;AACA,UAAMC,cAAc,gBAClB;AAAK,MAAA,SAAS,EAAEC,eAAMC;AAAtB,oBACE,6BAAC,QAAD;AA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AL,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","theme","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","oneOf","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","MODES","CARD","lockWrapper","shape","Customer","number","func","Notification","CardContentInfo"],"mappings":";;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AAIA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEO,MAAMA,MAAM,GAAG;AACpBC,EA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EAAAA,QAAQ,EAAET,mBAAUG,IAHL;AAIfK,EAAAA,OAAO,EAAER,mBAAUG,IAJJ;AAKfjC,EAAAA,IAAI,EAAE8B,mBAAUE,MALD;AAMfQ,EAAAA,KAAK,EAAEV,mBAAUE,MANF;AAOfS,EAAAA,MAAM,EAAEX,mBAAUE,MAPH;AAQfW,EAAAA,eAAe,EAAEb,mBAAUG,IARZ;AASfS,EAAAA,QAAQ,EAAEZ,mBAAUuC,KAAV,CAAgBC,kBAASzC,SAAzB,CATK;AAUfe,EAAAA,QAAQ,EAAEd,mBAAUyC,MAVL;AAWf1B,EAAAA,QAAQ,EAAEf,mBAAUG,IAXL;AAYfa,EAAAA,kBAAkB,EAAEhB,mBAAUE,MAZf;AAafe,EAAAA,qBAAqB,EAAEjB,mBAAUE,MAblB;AAcfgB,EAAAA,OAAO,EAAElB,mBAAU0C,IAdJ;AAefvB,EAAAA,eAAe,EAAEnB,mBAAU0C,IAfZ;AAgBftB,EAAAA,UAAU,EAAEpB,mBAAUG,IAhBP;AAiBfkB,EAAAA,YAAY,EAAErB,mBAAUuC,KAAV,CAAgBI,sBAAa5C,SAA7B,CAjBC;AAkBfuB,EAAAA,aAAa,EAAEsB,qBAAgB7C,SAAhB,CAA0BuB,aAlB1B;AAmBfC,EAAAA,UAAU,EAAEqB,qBAAgB7C,SAAhB,CAA0BwB,UAnBvB;AAoBflD,EAAAA,KAAK,EAAE2B,mBAAUC,KAAV,CAAgB,oBAAKpC,MAAL,CAAhB;AApBQ,CAAjB;eAsBeuC,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, theme}, {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={classnames(THEMES[theme], style.externalIconCircleWrapper)}>\n <IconType className={classnames(THEMES[theme], style.externalIcon)} />\n </div>\n );\n\n if (image) {\n const _backgroundIcon = (\n <div\n className={classnames(\n THEMES[theme],\n style.externalIconCircleWrapper,\n style.externalIconCircleWithImageWrapper\n )}\n style={{\n backgroundColor: iconColor\n }}\n >\n <IconType className={classnames(THEMES[theme], 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 theme: PropTypes.oneOf(keys(THEMES)),\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} theme={theme} />\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={classnames(THEMES[theme], 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;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K,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;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jG;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"}