@coorpacademy/components 10.3.32-alpha.16 → 10.3.32-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 (59) hide show
  1. package/es/atom/input-switch/test/fixtures.js +0 -10
  2. package/es/atom/input-switch/test/fixtures.js.map +1 -1
  3. package/es/atom/loader/test/fixtures.js +0 -2
  4. package/es/atom/loader/test/fixtures.js.map +1 -1
  5. package/es/molecule/card/customer.css +3 -61
  6. package/es/molecule/card/customer.js +5 -17
  7. package/es/molecule/card/customer.js.map +1 -1
  8. package/es/molecule/card/index.js +5 -15
  9. package/es/molecule/card/index.js.map +1 -1
  10. package/es/molecule/card/style.css +24 -86
  11. package/es/molecule/card/test/fixtures.js +0 -2
  12. package/es/molecule/card/test/fixtures.js.map +1 -1
  13. package/es/molecule/card-content/index.js +5 -11
  14. package/es/molecule/card-content/index.js.map +1 -1
  15. package/es/molecule/card-content/style.css +0 -52
  16. package/es/molecule/vertical-tabs/test/fixtures.js +0 -2
  17. package/es/molecule/vertical-tabs/test/fixtures.js.map +1 -1
  18. package/es/molecule/wizard-summary/style.css +0 -1
  19. package/es/organism/course-selection/test/fixtures/default.js +7 -29
  20. package/es/organism/course-selection/test/fixtures/default.js.map +1 -1
  21. package/es/organism/course-selection/test/fixtures.js +0 -2
  22. package/es/organism/course-selection/test/fixtures.js.map +1 -1
  23. package/es/organism/wizard-contents/style.css +9 -9
  24. package/lib/atom/input-switch/test/fixtures.js +0 -15
  25. package/lib/atom/input-switch/test/fixtures.js.map +1 -1
  26. package/lib/atom/loader/test/fixtures.js +0 -3
  27. package/lib/atom/loader/test/fixtures.js.map +1 -1
  28. package/lib/molecule/card/customer.css +3 -61
  29. package/lib/molecule/card/customer.js +6 -22
  30. package/lib/molecule/card/customer.js.map +1 -1
  31. package/lib/molecule/card/index.js +6 -19
  32. package/lib/molecule/card/index.js.map +1 -1
  33. package/lib/molecule/card/style.css +24 -86
  34. package/lib/molecule/card/test/fixtures.js +0 -3
  35. package/lib/molecule/card/test/fixtures.js.map +1 -1
  36. package/lib/molecule/card-content/index.js +6 -14
  37. package/lib/molecule/card-content/index.js.map +1 -1
  38. package/lib/molecule/card-content/style.css +0 -52
  39. package/lib/molecule/vertical-tabs/test/fixtures.js +0 -3
  40. package/lib/molecule/vertical-tabs/test/fixtures.js.map +1 -1
  41. package/lib/molecule/wizard-summary/style.css +0 -1
  42. package/lib/organism/course-selection/test/fixtures/default.js +7 -30
  43. package/lib/organism/course-selection/test/fixtures/default.js.map +1 -1
  44. package/lib/organism/course-selection/test/fixtures.js +0 -3
  45. package/lib/organism/course-selection/test/fixtures.js.map +1 -1
  46. package/lib/organism/wizard-contents/style.css +9 -9
  47. package/package.json +2 -2
  48. package/es/molecule/card/test/fixtures/coorpmanager.js +0 -18
  49. package/es/molecule/card/test/fixtures/coorpmanager.js.map +0 -1
  50. package/es/molecule/cockpit-popin/test/fixtures.js +0 -17
  51. package/es/molecule/cockpit-popin/test/fixtures.js.map +0 -1
  52. package/es/molecule/search/test/fixtures.js +0 -15
  53. package/es/molecule/search/test/fixtures.js.map +0 -1
  54. package/lib/molecule/card/test/fixtures/coorpmanager.js +0 -28
  55. package/lib/molecule/card/test/fixtures/coorpmanager.js.map +0 -1
  56. package/lib/molecule/cockpit-popin/test/fixtures.js +0 -28
  57. package/lib/molecule/cockpit-popin/test/fixtures.js.map +0 -1
  58. package/lib/molecule/search/test/fixtures.js +0 -25
  59. package/lib/molecule/search/test/fixtures.js.map +0 -1
@@ -3,11 +3,6 @@ import forEach from 'lodash/forEach';
3
3
  import renderComponentMacro from '../../../test/helpers/render-component';
4
4
  import AtomInputSwitch from '..';
5
5
  import fixtureChecked from './fixtures/checked';
6
- import fixtureCmLeft from './fixtures/cm-left';
7
- import fixtureCmRightChecked from './fixtures/cm-right-checked';
8
- import fixtureCmRightDisabled from './fixtures/cm-right-disabled';
9
- import fixtureCmRightModified from './fixtures/cm-right-modified';
10
- import fixtureCmRight from './fixtures/cm-right';
11
6
  import fixtureDisabled from './fixtures/disabled';
12
7
  import fixtureModified from './fixtures/modified';
13
8
  import fixtureNoTitle from './fixtures/no-title';
@@ -20,11 +15,6 @@ test('Atom › AtomInputSwitch > should have valid propTypes', t => {
20
15
  });
21
16
  });
22
17
  test('Atom › AtomInputSwitch › Checked › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureChecked);
23
- test('Atom › AtomInputSwitch › CmLeft › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureCmLeft);
24
- test('Atom › AtomInputSwitch › CmRightChecked › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureCmRightChecked);
25
- test('Atom › AtomInputSwitch › CmRightDisabled › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureCmRightDisabled);
26
- test('Atom › AtomInputSwitch › CmRightModified › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureCmRightModified);
27
- test('Atom › AtomInputSwitch › CmRight › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureCmRight);
28
18
  test('Atom › AtomInputSwitch › Disabled › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureDisabled);
29
19
  test('Atom › AtomInputSwitch › Modified › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureModified);
30
20
  test('Atom › AtomInputSwitch › NoTitle › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureNoTitle);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/atom/input-switch/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomInputSwitch","fixtureChecked","fixtureCmLeft","fixtureCmRightChecked","fixtureCmRightDisabled","fixtureCmRightModified","fixtureCmRight","fixtureDisabled","fixtureModified","fixtureNoTitle","fixtureSso","fixtureUnchecked","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,eAAP,MAA4B,IAA5B;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AJ;AACAV,IAAI,CAAC,wDAAD,EAA2DE,oBAA3D,EAAiFC,eAAjF,EAAkGQ,eAAlG,CAAJ;AACAX,IAAI,CAAC,uDAAD,EAA0DE,oBAA1D,EAAgFC,eAAhF,EAAiGS,cAAjG,CAAJ;AACAZ,IAAI,CAAC,mDAAD,EAAsDE,oBAAtD,EAA4EC,eAA5E,EAA6FU,UAA7F,CAAJ;AACAb,IAAI,CAAC,yDAAD,EAA4DE,oBAA5D,EAAkFC,eAAlF,EAAmGW,gBAAnG,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomInputSwitch from '..';\nimport fixtureChecked from './fixtures/checked';\nimport fixtureCmLeft from './fixtures/cm-left';\nimport fixtureCmRightChecked from './fixtures/cm-right-checked';\nimport fixtureCmRightDisabled from './fixtures/cm-right-disabled';\nimport fixtureCmRightModified from './fixtures/cm-right-modified';\nimport fixtureCmRight from './fixtures/cm-right';\nimport fixtureDisabled from './fixtures/disabled';\nimport fixtureModified from './fixtures/modified';\nimport fixtureNoTitle from './fixtures/no-title';\nimport fixtureSso from './fixtures/sso';\nimport fixtureUnchecked from './fixtures/unchecked';\n\ntest('Atom › AtomInputSwitch > should have valid propTypes', t => {\n t.pass();\n forEach(AtomInputSwitch.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomInputSwitch.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomInputSwitch › Checked › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureChecked);\ntest('Atom › AtomInputSwitch › CmLeft › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureCmLeft);\ntest('Atom › AtomInputSwitch › CmRightChecked › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureCmRightChecked);\ntest('Atom › AtomInputSwitch › CmRightDisabled › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureCmRightDisabled);\ntest('Atom › AtomInputSwitch › CmRightModified › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureCmRightModified);\ntest('Atom › AtomInputSwitch › CmRight › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureCmRight);\ntest('Atom › AtomInputSwitch › Disabled › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureDisabled);\ntest('Atom › AtomInputSwitch › Modified › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureModified);\ntest('Atom › AtomInputSwitch › NoTitle › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureNoTitle);\ntest('Atom › AtomInputSwitch › Sso › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureSso);\ntest('Atom › AtomInputSwitch › Unchecked › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureUnchecked);\n"],"file":"fixtures.js"}
1
+ {"version":3,"sources":["../../../../src/atom/input-switch/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomInputSwitch","fixtureChecked","fixtureDisabled","fixtureModified","fixtureNoTitle","fixtureSso","fixtureUnchecked","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,eAAP,MAA4B,IAA5B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,cAAP,MAA2B,qBAA3B;AACA,OAAOC,UAAP,MAAuB,gBAAvB;AACA,OAAOC,gBAAP,MAA6B,sBAA7B;AAEAT,IAAI,CAAC,sDAAD,EAAyDU,CAAC,IAAI;AAChEA,EAAAA,CAAC,CAACC,IAAF;AACAV,EAAAA,OAAO,CAACE,eAAe,CAACS,SAAjB,EAA4B,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACjDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,gDAA+CF,GAAI,mEAA5E;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAd,IAAI,CAAC,uDAAD,EAA0DE,oBAA1D,EAAgFC,eAAhF,EAAiGC,cAAjG,CAAJ;AACAJ,IAAI,CAAC,wDAAD,EAA2DE,oBAA3D,EAAiFC,eAAjF,EAAkGE,eAAlG,CAAJ;AACAL,IAAI,CAAC,wDAAD,EAA2DE,oBAA3D,EAAiFC,eAAjF,EAAkGG,eAAlG,CAAJ;AACAN,IAAI,CAAC,uDAAD,EAA0DE,oBAA1D,EAAgFC,eAAhF,EAAiGI,cAAjG,CAAJ;AACAP,IAAI,CAAC,mDAAD,EAAsDE,oBAAtD,EAA4EC,eAA5E,EAA6FK,UAA7F,CAAJ;AACAR,IAAI,CAAC,yDAAD,EAA4DE,oBAA5D,EAAkFC,eAAlF,EAAmGM,gBAAnG,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomInputSwitch from '..';\nimport fixtureChecked from './fixtures/checked';\nimport fixtureDisabled from './fixtures/disabled';\nimport fixtureModified from './fixtures/modified';\nimport fixtureNoTitle from './fixtures/no-title';\nimport fixtureSso from './fixtures/sso';\nimport fixtureUnchecked from './fixtures/unchecked';\n\ntest('Atom › AtomInputSwitch > should have valid propTypes', t => {\n t.pass();\n forEach(AtomInputSwitch.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomInputSwitch.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomInputSwitch › Checked › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureChecked);\ntest('Atom › AtomInputSwitch › Disabled › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureDisabled);\ntest('Atom › AtomInputSwitch › Modified › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureModified);\ntest('Atom › AtomInputSwitch › NoTitle › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureNoTitle);\ntest('Atom › AtomInputSwitch › Sso › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureSso);\ntest('Atom › AtomInputSwitch › Unchecked › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureUnchecked);\n"],"file":"fixtures.js"}
@@ -2,7 +2,6 @@ import test from 'ava';
2
2
  import forEach from 'lodash/forEach';
3
3
  import renderComponentMacro from '../../../test/helpers/render-component';
4
4
  import AtomLoader from '..';
5
- import fixtureCoorpmanager from './fixtures/coorpmanager';
6
5
  import fixtureDefault from './fixtures/default';
7
6
  test('Atom › AtomLoader > should have valid propTypes', t => {
8
7
  t.pass();
@@ -10,6 +9,5 @@ test('Atom › AtomLoader > should have valid propTypes', t => {
10
9
  t.not(value, undefined, `PropType for "Atom.AtomLoader.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
11
10
  });
12
11
  });
13
- test('Atom › AtomLoader › Coorpmanager › should be rendered', renderComponentMacro, AtomLoader, fixtureCoorpmanager);
14
12
  test('Atom › AtomLoader › Default › should be rendered', renderComponentMacro, AtomLoader, fixtureDefault);
15
13
  //# sourceMappingURL=fixtures.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/atom/loader/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomLoader","fixtureCoorpmanager","fixtureDefault","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,UAAP,MAAuB,IAAvB;AACA,OAAOC,mBAAP,MAAgC,yBAAhC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AAEAL,IAAI,CAAC,iDAAD,EAAoDM,CAAC,IAAI;AAC3DA,EAAAA,CAAC,CAACC,IAAF;AACAN,EAAAA,OAAO,CAACE,UAAU,CAACK,SAAZ,EAAuB,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC5CJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,2CAA0CF,GAAI,mEAAvE;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAV,IAAI,CAAC,uDAAD,EAA0DE,oBAA1D,EAAgFC,UAAhF,EAA4FC,mBAA5F,CAAJ;AACAJ,IAAI,CAAC,kDAAD,EAAqDE,oBAArD,EAA2EC,UAA3E,EAAuFE,cAAvF,CAAJ","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"}
1
+ {"version":3,"sources":["../../../../src/atom/loader/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomLoader","fixtureDefault","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,UAAP,MAAuB,IAAvB;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AAEAJ,IAAI,CAAC,iDAAD,EAAoDK,CAAC,IAAI;AAC3DA,EAAAA,CAAC,CAACC,IAAF;AACAL,EAAAA,OAAO,CAACE,UAAU,CAACI,SAAZ,EAAuB,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC5CJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,2CAA0CF,GAAI,mEAAvE;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAT,IAAI,CAAC,kDAAD,EAAqDE,oBAArD,EAA2EC,UAA3E,EAAuFC,cAAvF,CAAJ","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"}
@@ -3,91 +3,33 @@
3
3
  @value colors: "../../variables/colors.css";
4
4
  @value white from colors;
5
5
 
6
- .default {
6
+ .content {
7
7
  display: flex;
8
8
  flex-wrap: wrap;
9
9
  justify-content: center;
10
+ padding: 12px 12px 0;
10
11
  width: 100%;
11
12
  font-family: 'Open Sans';
12
13
  box-sizing: border-box;
13
14
  text-align: center;
14
15
  color: white;
15
16
  text-transform: uppercase;
17
+ font-size: 12px;
16
18
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.75);
17
19
  user-select: none;
18
20
  }
19
21
 
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
-
58
22
  .coorp,
59
23
  .original {
60
24
  letter-spacing: 3px;
61
25
  }
62
26
 
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
-
79
27
  .coorp {
80
28
  font-weight: 100;
81
29
  margin-right: 5px;
82
30
  letter-spacing: 4px;
83
31
  }
84
32
 
85
- .coorpmanager .coorp {
86
- font-weight: 100;
87
- margin-right: 5px;
88
- letter-spacing: 2px;
89
- }
90
-
91
33
  .original {
92
34
  font-weight: 600;
93
35
  }
@@ -1,25 +1,15 @@
1
- import _keys from "lodash/fp/keys";
2
1
  import React from 'react';
3
2
  import PropTypes from 'prop-types';
4
- import classnames from 'classnames';
5
3
  import style from './customer.css';
6
- export const THEMES = {
7
- default: null,
8
- coorpmanager: style.coorpmanager
9
- };
10
4
 
11
5
  const Customer = props => {
12
6
  const {
13
7
  name,
14
- type,
15
- coorpOriginal,
16
- theme,
17
- disabled = false
8
+ className,
9
+ coorpOriginal
18
10
  } = props;
19
- const className = classnames(THEMES[theme], style.customer, type === 'chapter' ? style.chapterCustomer : null);
20
11
  return /*#__PURE__*/React.createElement("div", {
21
- className: className,
22
- disabled: disabled
12
+ className: className
23
13
  }, /*#__PURE__*/React.createElement("div", {
24
14
  className: style.content
25
15
  }, coorpOriginal ? /*#__PURE__*/React.createElement("span", {
@@ -30,11 +20,9 @@ const Customer = props => {
30
20
  };
31
21
 
32
22
  Customer.propTypes = process.env.NODE_ENV !== "production" ? {
33
- theme: PropTypes.oneOf(_keys(THEMES)),
34
- type: PropTypes.string,
23
+ className: PropTypes.string,
35
24
  name: PropTypes.string,
36
- coorpOriginal: PropTypes.bool.isRequired,
37
- disabled: PropTypes.bool
25
+ coorpOriginal: PropTypes.bool.isRequired
38
26
  } : {};
39
27
  export default Customer;
40
28
  //# sourceMappingURL=customer.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/molecule/card/customer.js"],"names":["React","PropTypes","classnames","style","THEMES","default","coorpmanager","Customer","props","name","type","coorpOriginal","theme","disabled","className","customer","chapterCustomer","content","coorp","original","propTypes","oneOf","string","bool","isRequired"],"mappings":";AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,OAAOC,KAAP,MAAkB,gBAAlB;AAEA,OAAO,MAAMC,MAAM,GAAG;AACpBC,EAAAA,OAAO,EAAE,IADW;AAEpBC,EAAAA,YAAY,EAAEH,KAAK,CAACG;AAFA,CAAf;;AAKP,MAAMC,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,GAAGZ,UAAU,CAC1BE,MAAM,CAACQ,KAAD,CADoB,EAE1BT,KAAK,CAACY,QAFoB,EAG1BL,IAAI,KAAK,SAAT,GAAqBP,KAAK,CAACa,eAA3B,GAA6C,IAHnB,CAA5B;AAMA,sBACE;AAAK,IAAA,SAAS,EAAEF,SAAhB;AAA2B,IAAA,QAAQ,EAAED;AAArC,kBACE;AAAK,IAAA,SAAS,EAAEV,KAAK,CAACc;AAAtB,KACGN,aAAa,gBAAG;AAAM,IAAA,SAAS,EAAER,KAAK,CAACe;AAAvB,cAAH,GAAiD,IADjE,EAEGP,aAAa,gBAAG;AAAM,IAAA,SAAS,EAAER,KAAK,CAACgB;AAAvB,iBAAH,GAAuD,IAFvE,EAGG,CAACR,aAAD,IAAkBF,IAHrB,CADF,CADF;AASD,CAjBD;;AAmBAF,QAAQ,CAACa,SAAT,2CAAqB;AACnBR,EAAAA,KAAK,EAAEX,SAAS,CAACoB,KAAV,CAAgB,MAAKjB,MAAL,CAAhB,CADY;AAEnBM,EAAAA,IAAI,EAAET,SAAS,CAACqB,MAFG;AAGnBb,EAAAA,IAAI,EAAER,SAAS,CAACqB,MAHG;AAInBX,EAAAA,aAAa,EAAEV,SAAS,CAACsB,IAAV,CAAeC,UAJX;AAKnBX,EAAAA,QAAQ,EAAEZ,SAAS,CAACsB;AALD,CAArB;AAQA,eAAehB,QAAf","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
+ {"version":3,"sources":["../../../src/molecule/card/customer.js"],"names":["React","PropTypes","style","Customer","props","name","className","coorpOriginal","content","coorp","original","propTypes","string","bool","isRequired"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,KAAP,MAAkB,gBAAlB;;AAEA,MAAMC,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,EAAEJ,KAAK,CAACM;AAAtB,KACGD,aAAa,gBAAG;AAAM,IAAA,SAAS,EAAEL,KAAK,CAACO;AAAvB,cAAH,GAAiD,IADjE,EAEGF,aAAa,gBAAG;AAAM,IAAA,SAAS,EAAEL,KAAK,CAACQ;AAAvB,iBAAH,GAAuD,IAFvE,EAGG,CAACH,aAAD,IAAkBF,IAHrB,CADF,CADF;AASD,CAZD;;AAcAF,QAAQ,CAACQ,SAAT,2CAAqB;AACnBL,EAAAA,SAAS,EAAEL,SAAS,CAACW,MADF;AAEnBP,EAAAA,IAAI,EAAEJ,SAAS,CAACW,MAFG;AAGnBL,EAAAA,aAAa,EAAEN,SAAS,CAACY,IAAV,CAAeC;AAHX,CAArB;AAMA,eAAeX,QAAf","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,4 +1,3 @@
1
- import _keys from "lodash/fp/keys";
2
1
  import _pick from "lodash/fp/pick";
3
2
  import _isUndefined from "lodash/fp/isUndefined";
4
3
  import _isEmpty from "lodash/fp/isEmpty";
@@ -18,10 +17,6 @@ import Favorite from './favorite';
18
17
  import Selectable from './selectable';
19
18
  import Notification from './notification';
20
19
  import style from './style.css';
21
- export const THEMES = {
22
- default: null,
23
- coorpmanager: style.coorpmanager
24
- };
25
20
 
26
21
  const CardBackground = ({
27
22
  type,
@@ -125,8 +120,7 @@ const Card = memo(function Card(props, context) {
125
120
  isSelected,
126
121
  notification,
127
122
  badgeCategory,
128
- badgeLabel,
129
- theme = 'default'
123
+ badgeLabel
130
124
  } = props;
131
125
 
132
126
  const empty = _isEmpty(_pick(['title', 'type', 'author', 'image'], props));
@@ -135,7 +129,7 @@ const Card = memo(function Card(props, context) {
135
129
 
136
130
  const whiteColor = _get('common.white', skin);
137
131
 
138
- const cardStyle = classnames(THEMES[theme], type === 'chapter' ? style.chapter : style.course, title ? null : style.lazy, style.grid, empty ? style.empty : null);
132
+ const cardStyle = classnames(type === 'chapter' ? style.chapter : style.course, title ? null : style.lazy, style.grid, empty ? style.empty : null);
139
133
  const handleClick = useMemo(() => e => !disabled && onClick(e), [disabled, onClick]);
140
134
  const lock = disabled ? /*#__PURE__*/React.createElement(LockIcon, {
141
135
  className: style.lockIcon,
@@ -180,9 +174,7 @@ const Card = memo(function Card(props, context) {
180
174
  }) : null, /*#__PURE__*/React.createElement(Selectable, {
181
175
  isSelected: isSelected
182
176
  }), notification ? /*#__PURE__*/React.createElement(Notification, notification) : null, customer ? /*#__PURE__*/React.createElement(Customer, _extends({}, customer, {
183
- theme: theme,
184
- type: type,
185
- disabled: disabled
177
+ className: classnames(style.customer, type === 'chapter' ? style.chapterCustomer : null)
186
178
  })) : null, /*#__PURE__*/React.createElement(CardContentInfo, {
187
179
  mode: MODES.CARD,
188
180
  adaptiv: adaptiv,
@@ -194,8 +186,7 @@ const Card = memo(function Card(props, context) {
194
186
  title: title,
195
187
  type: type,
196
188
  badgeCategory: badgeCategory,
197
- badgeLabel: badgeLabel,
198
- theme: theme
189
+ badgeLabel: badgeLabel
199
190
  }), badge ? /*#__PURE__*/React.createElement("div", {
200
191
  className: style.badge,
201
192
  style: inlineBadgeStyle
@@ -225,8 +216,7 @@ Card.propTypes = process.env.NODE_ENV !== "production" ? {
225
216
  isSelected: PropTypes.bool,
226
217
  notification: PropTypes.shape(Notification.propTypes),
227
218
  badgeCategory: CardContentInfo.propTypes.badgeCategory,
228
- badgeLabel: CardContentInfo.propTypes.badgeLabel,
229
- theme: PropTypes.oneOf(_keys(THEMES))
219
+ badgeLabel: CardContentInfo.propTypes.badgeLabel
230
220
  } : {};
231
221
  export default Card;
232
222
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/molecule/card/index.js"],"names":["React","useMemo","memo","PropTypes","classnames","NovaSolidLoginLocked","LockIcon","NovaCompositionCoorpacademyPictures","PicturesIcon","isExternalContent","EXTERNAL_CONTENT_ICONS","Provider","CardContentInfo","MODES","Customer","Favorite","Selectable","Notification","style","THEMES","default","coorpmanager","CardBackground","type","image","empty","skin","externalContent","primaryColor","whiteColor","IconType","icon","iconColor","color","backgroundIcon","externalIconCircleWrapper","externalIcon","_backgroundIcon","externalIconCircleWithImageWrapper","backgroundColor","externalIconWithImage","imageWrapper","backgroundImage","externalContentHeader","externalBackground","emptyIcon","chapterImageWrapper","contextTypes","childContextTypes","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","CARD","lockWrapper","shape","number","func","oneOf"],"mappings":";;;;;;;;AAAA,OAAOA,KAAP,IAAeC,OAAf,EAAwBC,IAAxB,QAAmC,OAAnC;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,SACEC,oBAAoB,IAAIC,QAD1B,EAEEC,mCAAmC,IAAIC,YAFzC,QAGO,0BAHP;AAIA,SAAQC,iBAAR,EAA2BC,sBAA3B,QAAwD,6BAAxD;AACA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,eAAP,IAAyBC,KAAzB,QAAqC,iBAArC;AACA,OAAOC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AAS,CAAC+C,MADF;AAEf1B,EAAAA,KAAK,EAAErB,SAAS,CAAC+C,MAFF;AAGfO,EAAAA,QAAQ,EAAEtD,SAAS,CAACgD,IAHL;AAIfK,EAAAA,OAAO,EAAErD,SAAS,CAACgD,IAJJ;AAKf5B,EAAAA,IAAI,EAAEpB,SAAS,CAAC+C,MALD;AAMfQ,EAAAA,KAAK,EAAEvD,SAAS,CAAC+C,MANF;AAOfS,EAAAA,MAAM,EAAExD,SAAS,CAAC+C,MAPH;AAQfW,EAAAA,eAAe,EAAE1D,SAAS,CAACgD,IARZ;AASfS,EAAAA,QAAQ,EAAEzD,SAAS,CAACoF,KAAV,CAAgBzE,QAAQ,CAACmC,SAAzB,CATK;AAUfa,EAAAA,QAAQ,EAAE3D,SAAS,CAACqF,MAVL;AAWfzB,EAAAA,QAAQ,EAAE5D,SAAS,CAACgD,IAXL;AAYfa,EAAAA,kBAAkB,EAAE7D,SAAS,CAAC+C,MAZf;AAafe,EAAAA,qBAAqB,EAAE9D,SAAS,CAAC+C,MAblB;AAcfgB,EAAAA,OAAO,EAAE/D,SAAS,CAACsF,IAdJ;AAeftB,EAAAA,eAAe,EAAEhE,SAAS,CAACsF,IAfZ;AAgBfrB,EAAAA,UAAU,EAAEjE,SAAS,CAACgD,IAhBP;AAiBfkB,EAAAA,YAAY,EAAElE,SAAS,CAACoF,KAAV,CAAgBtE,YAAY,CAACgC,SAA7B,CAjBC;AAkBfqB,EAAAA,aAAa,EAAE1D,eAAe,CAACqC,SAAhB,CAA0BqB,aAlB1B;AAmBfC,EAAAA,UAAU,EAAE3D,eAAe,CAACqC,SAAhB,CAA0BsB,UAnBvB;AAoBfC,EAAAA,KAAK,EAAErE,SAAS,CAACuF,KAAV,CAAgB,MAAKvE,MAAL,CAAhB;AApBQ,CAAjB;AAsBA,eAAeiC,IAAf","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"}
1
+ {"version":3,"sources":["../../../src/molecule/card/index.js"],"names":["React","useMemo","memo","PropTypes","classnames","NovaSolidLoginLocked","LockIcon","NovaCompositionCoorpacademyPictures","PicturesIcon","isExternalContent","EXTERNAL_CONTENT_ICONS","Provider","CardContentInfo","MODES","Customer","Favorite","Selectable","Notification","style","CardBackground","type","image","empty","skin","externalContent","primaryColor","whiteColor","IconType","icon","iconColor","color","backgroundIcon","externalIconCircleWrapper","externalIcon","_backgroundIcon","externalIconCircleWithImageWrapper","backgroundColor","externalIconWithImage","imageWrapper","backgroundImage","externalContentHeader","externalBackground","emptyIcon","chapterImageWrapper","contextTypes","childContextTypes","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","CARD","lockWrapper","shape","number","func"],"mappings":";;;;;;;AAAA,OAAOA,KAAP,IAAeC,OAAf,EAAwBC,IAAxB,QAAmC,OAAnC;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,SACEC,oBAAoB,IAAIC,QAD1B,EAEEC,mCAAmC,IAAIC,YAFzC,QAGO,0BAHP;AAIA,SAAQC,iBAAR,EAA2BC,sBAA3B,QAAwD,6BAAxD;AACA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,eAAP,IAAyBC,KAAzB,QAAqC,iBAArC;AACA,OAAOC,QAAP,MAAqB,YAArB;AACA,OAAOC,QAAP,MAAqB,YAArB;AACA,OAAOC,UAAP,MAAuB,cAAvB;AACA,OAAOC,YAAP,MAAyB,gBAAzB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,cAAc,GAAG,CAAC;AAACC,EAAAA,IAAD;AAAOC,EAAAA,KAAP;AAAcC,EAAAA;AAAd,CAAD,EAAuB;AAACC,EAAAA;AAAD,CAAvB,KAAkC;AACvD,QAAMC,eAAe,GAAGf,iBAAiB,CAACW,IAAD,CAAzC;;AACA,QAAMK,YAAY,GAAG,KAAI,gBAAJ,EAAsBF,IAAtB,CAArB;;AACA,QAAMG,UAAU,GAAG,KAAI,cAAJ,EAAoBH,IAApB,CAAnB;;AAEA,MAAIC,eAAe,IAAId,sBAAsB,CAACU,IAAD,CAA7C,EAAqD;AACnD,UAAMO,QAAQ,GAAGjB,sBAAsB,CAACU,IAAD,CAAtB,CAA6BQ,IAA9C;AACA,UAAMC,SAAS,GAAGnB,sBAAsB,CAACU,IAAD,CAAtB,CAA6BU,KAA/C;AACA,UAAMC,cAAc,gBA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AAkBfqB,EAAAA,aAAa,EAAEvD,eAAe,CAACkC,SAAhB,CAA0BqB,aAlB1B;AAmBfC,EAAAA,UAAU,EAAExD,eAAe,CAACkC,SAAhB,CAA0BsB;AAnBvB,CAAjB;AAqBA,eAAenB,IAAf","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"}
@@ -36,6 +36,25 @@
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
+
39
58
  .grid.empty {
40
59
  padding-bottom: 25px;
41
60
  opacity: 0.6;
@@ -47,7 +66,6 @@
47
66
  width: 256px;
48
67
  height: 297px;
49
68
  }
50
-
51
69
  .chapter {
52
70
  composes: default;
53
71
  border-radius: 8px;
@@ -55,18 +73,6 @@
55
73
  height: 297px;
56
74
  }
57
75
 
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
-
70
76
  .course .imageWrapper {
71
77
  width: 100%;
72
78
  height: 100%;
@@ -83,10 +89,6 @@
83
89
  left: 0;
84
90
  }
85
91
 
86
- .coorpmanager.chapter .chapterImageWrapper {
87
- max-height: 52px;
88
- }
89
-
90
92
  .default .image {
91
93
  overflow: hidden;
92
94
  background-position: 50%;
@@ -216,6 +218,10 @@
216
218
  left: 0;
217
219
  }
218
220
 
221
+ .default[disabled] .customer {
222
+ background: none;
223
+ }
224
+
219
225
  .badge {
220
226
  position: absolute;
221
227
  width: auto;
@@ -233,11 +239,6 @@
233
239
  user-select: none;
234
240
  }
235
241
 
236
- .coorpmanager .badge {
237
- padding: 2px 5px;
238
- font-size: 7px;
239
- }
240
-
241
242
  .emptyIcon {
242
243
  vertical-align: middle;
243
244
  width: 80px;
@@ -294,24 +295,11 @@
294
295
  }
295
296
 
296
297
  .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;
304
298
  width: 80px;
305
299
  height: 80px;
306
300
  margin-top: 20px;
307
- }
308
-
309
- .coorpmanager .externalIconCircleWrapper {
310
- width: 50px;
311
- height: 50px;
312
- margin-top: 12px;
313
- padding: 13px;
314
301
  border-radius: 50%;
302
+ padding: 17px;
315
303
  box-sizing: border-box;
316
304
  background-color: rgba(255, 255, 255, 0.3);
317
305
  justify-content: center;
@@ -325,12 +313,6 @@
325
313
  height: 45px;
326
314
  }
327
315
 
328
- .coorpmanager .externalIcon {
329
- color: white;
330
- width: 23px;
331
- height: 23px;
332
- }
333
-
334
316
  .externalIconCircleWrapper::after {
335
317
  animation: pulse 3s linear 0s infinite;
336
318
  animation-play-state: paused;
@@ -361,18 +343,6 @@
361
343
  transition: box-shadow 0.25s linear;
362
344
  }
363
345
 
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
-
376
346
  .externalIconCircleWithImageWrapper {
377
347
  width: 60px;
378
348
  height: 60px;
@@ -380,22 +350,6 @@
380
350
  z-index: 1;
381
351
  }
382
352
 
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
-
399
353
  .externalIconWithImage {
400
354
  color: white;
401
355
  width: 28px;
@@ -418,22 +372,6 @@
418
372
  transition: box-shadow 0.25s linear;
419
373
  }
420
374
 
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
-
437
375
  @keyframes pulse {
438
376
  0% {
439
377
  transform: scale(1);
@@ -6,7 +6,6 @@ import fixtureAdaptivAndDisabled from './fixtures/adaptiv-and-disabled';
6
6
  import fixtureAdaptiv from './fixtures/adaptiv';
7
7
  import fixtureArabic from './fixtures/arabic';
8
8
  import fixtureArticle from './fixtures/article';
9
- import fixtureCoorpmanager from './fixtures/coorpmanager';
10
9
  import fixtureDefault from './fixtures/default';
11
10
  import fixtureDisabled from './fixtures/disabled';
12
11
  import fixtureEmpty from './fixtures/empty';
@@ -29,7 +28,6 @@ test('Molecule › MoleculeCard › AdaptivAndDisabled › should be rendered',
29
28
  test('Molecule › MoleculeCard › Adaptiv › should be rendered', renderComponentMacro, MoleculeCard, fixtureAdaptiv);
30
29
  test('Molecule › MoleculeCard › Arabic › should be rendered', renderComponentMacro, MoleculeCard, fixtureArabic);
31
30
  test('Molecule › MoleculeCard › Article › should be rendered', renderComponentMacro, MoleculeCard, fixtureArticle);
32
- test('Molecule › MoleculeCard › Coorpmanager › should be rendered', renderComponentMacro, MoleculeCard, fixtureCoorpmanager);
33
31
  test('Molecule › MoleculeCard › Default › should be rendered', renderComponentMacro, MoleculeCard, fixtureDefault);
34
32
  test('Molecule › MoleculeCard › Disabled › should be rendered', renderComponentMacro, MoleculeCard, fixtureDisabled);
35
33
  test('Molecule › MoleculeCard › Empty › should be rendered', renderComponentMacro, MoleculeCard, fixtureEmpty);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/molecule/card/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeCard","fixtureAdaptivAndDisabled","fixtureAdaptiv","fixtureArabic","fixtureArticle","fixtureCoorpmanager","fixtureDefault","fixtureDisabled","fixtureEmpty","fixtureExternalContent","fixtureFavorite","fixtureFreerunAndDisabled","fixtureFreerun","fixturePodcast","fixtureScorm","fixtureSelectableFalse","fixtureSelectableTrue","fixtureVideo","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAo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AA3D,EAAiFC,YAAjF,EAA+FI,cAA/F,CAAJ;AACAP,IAAI,CAAC,6DAAD,EAAgEE,oBAAhE,EAAsFC,YAAtF,EAAoGK,mBAApG,CAAJ;AACAR,IAAI,CAAC,wDAAD,EAA2DE,oBAA3D,EAAiFC,YAAjF,EAA+FM,cAA/F,CAAJ;AACAT,IAAI,CAAC,yDAAD,EAA4DE,oBAA5D,EAAkFC,YAAlF,EAAgGO,eAAhG,CAAJ;AACAV,IAAI,CAAC,sDAAD,EAAyDE,oBAAzD,EAA+EC,YAA/E,EAA6FQ,YAA7F,CAAJ;AACAX,IAAI,CAAC,gEAAD,EAAmEE,oBAAnE,EAAyFC,YAAzF,EAAuGS,sBAAvG,CAAJ;AACAZ,IAAI,CAAC,yDAAD,EAA4DE,oBAA5D,EAAkFC,YAAlF,EAAgGU,eAAhG,CAAJ;AACAb,IAAI,CAAC,mEAAD,EAAsEE,oBAAtE,EAA4FC,YAA5F,EAA0GW,yBAA1G,CAAJ;AACAd,IAAI,CAAC,wDAAD,EAA2DE,oBAA3D,EAAiFC,YAAjF,EAA+FY,cAA/F,CAAJ;AACAf,IAAI,CAAC,wDAAD,EAA2DE,oBAA3D,EAAiFC,YAAjF,EAA+Fa,cAA/F,CAAJ;AACAhB,IAAI,CAAC,sDAAD,EAAyDE,oBAAzD,EAA+EC,YAA/E,EAA6Fc,YAA7F,CAAJ;AACAjB,IAAI,CAAC,gEAAD,EAAmEE,oBAAnE,EAAyFC,YAAzF,EAAuGe,sBAAvG,CAAJ;AACAlB,IAAI,CAAC,+DAAD,EAAkEE,oBAAlE,EAAwFC,YAAxF,EAAsGgB,qBAAtG,CAAJ;AACAnB,IAAI,CAAC,sDAAD,EAAyDE,oBAAzD,EAA+EC,YAA/E,EAA6FiB,YAA7F,CAAJ","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
+ {"version":3,"sources":["../../../../src/molecule/card/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeCard","fixtureAdaptivAndDisabled","fixtureAdaptiv","fixtureArabic","fixtureArticle","fixtureDefault","fixtureDisabled","fixtureEmpty","fixtureExternalContent","fixtureFavorite","fixtureFreerunAndDisabled","fixtureFreerun","fixturePodcast","fixtureScorm","fixtureSelectableFalse","fixtureSelectableTrue","fixtureVideo","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,YAAP,MAAyB,IAAzB;AACA,OAAOC,yBAAP,MAAsC,iCAAtC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,eAAP,MA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AC,gEAAD,EAAmEE,oBAAnE,EAAyFC,YAAzF,EAAuGQ,sBAAvG,CAAJ;AACAX,IAAI,CAAC,yDAAD,EAA4DE,oBAA5D,EAAkFC,YAAlF,EAAgGS,eAAhG,CAAJ;AACAZ,IAAI,CAAC,mEAAD,EAAsEE,oBAAtE,EAA4FC,YAA5F,EAA0GU,yBAA1G,CAAJ;AACAb,IAAI,CAAC,wDAAD,EAA2DE,oBAA3D,EAAiFC,YAAjF,EAA+FW,cAA/F,CAAJ;AACAd,IAAI,CAAC,wDAAD,EAA2DE,oBAA3D,EAAiFC,YAAjF,EAA+FY,cAA/F,CAAJ;AACAf,IAAI,CAAC,sDAAD,EAAyDE,oBAAzD,EAA+EC,YAA/E,EAA6Fa,YAA7F,CAAJ;AACAhB,IAAI,CAAC,gEAAD,EAAmEE,oBAAnE,EAAyFC,YAAzF,EAAuGc,sBAAvG,CAAJ;AACAjB,IAAI,CAAC,+DAAD,EAAkEE,oBAAlE,EAAwFC,YAAxF,EAAsGe,qBAAtG,CAAJ;AACAlB,IAAI,CAAC,sDAAD,EAAyDE,oBAAzD,EAA+EC,YAA/E,EAA6FgB,YAA7F,CAAJ","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,4 +1,3 @@
1
- import _keys from "lodash/fp/keys";
2
1
  import _isNil from "lodash/fp/isNil";
3
2
  import React from 'react';
4
3
  import PropTypes from 'prop-types';
@@ -13,10 +12,6 @@ export const MODES = {
13
12
  HERO: 'hero',
14
13
  CARD: 'card'
15
14
  };
16
- export const THEMES = {
17
- default: null,
18
- coorpmanager: style.coorpmanager
19
- };
20
15
 
21
16
  const ContentTypeInfo = ({
22
17
  mode,
@@ -35,7 +30,8 @@ const ContentTypeInfo = ({
35
30
  return /*#__PURE__*/React.createElement("div", {
36
31
  className: style.microLearningIcon
37
32
  }, /*#__PURE__*/React.createElement(TimerIcon, {
38
- className: style.timerIcon
33
+ height: 40,
34
+ width: 40
39
35
  }), /*#__PURE__*/React.createElement("span", {
40
36
  className: style.microLearninglabel
41
37
  }, "5' learning"));
@@ -121,8 +117,7 @@ const ContentInfo = ({
121
117
  title,
122
118
  type,
123
119
  badgeCategory,
124
- badgeLabel,
125
- theme = 'default'
120
+ badgeLabel
126
121
  }) => {
127
122
  const progressBarColor = '#3EC483';
128
123
  const inlineProgressValueStyle = {
@@ -146,7 +141,7 @@ const ContentInfo = ({
146
141
  })) : null;
147
142
  return /*#__PURE__*/React.createElement("div", {
148
143
  "data-name": "info",
149
- className: classnames(THEMES[theme], style.infoWrapper, mode === MODES.HERO ? style.hero : style.card, disabled ? style.progressBarDisabled : null, externalContent ? style.externalContent : null)
144
+ className: classnames(style.infoWrapper, mode === MODES.HERO ? style.hero : style.card, disabled ? style.progressBarDisabled : null, externalContent ? style.externalContent : null)
150
145
  }, /*#__PURE__*/React.createElement(ContentTypeInfo, {
151
146
  mode: mode,
152
147
  type: type,
@@ -184,8 +179,7 @@ ContentInfo.propTypes = process.env.NODE_ENV !== "production" ? {
184
179
  type: PropTypes.string,
185
180
  mode: PropTypes.string,
186
181
  badgeCategory: ContentBadge.propTypes.category,
187
- badgeLabel: ContentBadge.propTypes.label,
188
- theme: PropTypes.oneOf(_keys(THEMES))
182
+ badgeLabel: ContentBadge.propTypes.label
189
183
  } : {};
190
184
  export default ContentInfo;
191
185
  //# sourceMappingURL=index.js.map