@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
@@ -3,6 +3,11 @@ 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';
6
11
  import fixtureDisabled from './fixtures/disabled';
7
12
  import fixtureModified from './fixtures/modified';
8
13
  import fixtureNoTitle from './fixtures/no-title';
@@ -15,6 +20,11 @@ test('Atom › AtomInputSwitch > should have valid propTypes', t => {
15
20
  });
16
21
  });
17
22
  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);
18
28
  test('Atom › AtomInputSwitch › Disabled › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureDisabled);
19
29
  test('Atom › AtomInputSwitch › Modified › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureModified);
20
30
  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","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"}
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;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,aAAP,MAA0B,oBAA1B;AACA,OAAOC,qBAAP,MAAkC,6BAAlC;AACA,OAAOC,sBAAP,MAAmC,8BAAnC;AACA,OAAOC,sBAAP,MAAmC,8BAAnC;AACA,OAAOC,cAAP,MAA2B,qBAA3B;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;A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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"}
@@ -2,6 +2,7 @@ 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';
5
6
  import fixtureDefault from './fixtures/default';
6
7
  test('Atom › AtomLoader > should have valid propTypes', t => {
7
8
  t.pass();
@@ -9,5 +10,6 @@ test('Atom › AtomLoader > should have valid propTypes', t => {
9
10
  t.not(value, undefined, `PropType for "Atom.AtomLoader.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
10
11
  });
11
12
  });
13
+ test('Atom › AtomLoader › Coorpmanager › should be rendered', renderComponentMacro, AtomLoader, fixtureCoorpmanager);
12
14
  test('Atom › AtomLoader › Default › should be rendered', renderComponentMacro, AtomLoader, fixtureDefault);
13
15
  //# sourceMappingURL=fixtures.js.map
@@ -1 +1 @@
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"}
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"}
@@ -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,15 +1,25 @@
1
+ import _keys from "lodash/fp/keys";
1
2
  import React from 'react';
2
3
  import PropTypes from 'prop-types';
4
+ import classnames from 'classnames';
3
5
  import style from './customer.css';
6
+ export const THEMES = {
7
+ default: null,
8
+ coorpmanager: style.coorpmanager
9
+ };
4
10
 
5
11
  const Customer = props => {
6
12
  const {
7
13
  name,
8
- className,
9
- coorpOriginal
14
+ type,
15
+ coorpOriginal,
16
+ theme,
17
+ disabled = false
10
18
  } = props;
19
+ const className = classnames(THEMES[theme], style.customer, type === 'chapter' ? style.chapterCustomer : null);
11
20
  return /*#__PURE__*/React.createElement("div", {
12
- className: className
21
+ className: className,
22
+ disabled: disabled
13
23
  }, /*#__PURE__*/React.createElement("div", {
14
24
  className: style.content
15
25
  }, coorpOriginal ? /*#__PURE__*/React.createElement("span", {
@@ -20,9 +30,11 @@ const Customer = props => {
20
30
  };
21
31
 
22
32
  Customer.propTypes = process.env.NODE_ENV !== "production" ? {
23
- className: PropTypes.string,
33
+ theme: PropTypes.oneOf(_keys(THEMES)),
34
+ type: PropTypes.string,
24
35
  name: PropTypes.string,
25
- coorpOriginal: PropTypes.bool.isRequired
36
+ coorpOriginal: PropTypes.bool.isRequired,
37
+ disabled: PropTypes.bool
26
38
  } : {};
27
39
  export default Customer;
28
40
  //# sourceMappingURL=customer.js.map
@@ -1 +1 @@
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
+ {"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,3 +1,4 @@
1
+ import _keys from "lodash/fp/keys";
1
2
  import _pick from "lodash/fp/pick";
2
3
  import _isUndefined from "lodash/fp/isUndefined";
3
4
  import _isEmpty from "lodash/fp/isEmpty";
@@ -17,11 +18,16 @@ import Favorite from './favorite';
17
18
  import Selectable from './selectable';
18
19
  import Notification from './notification';
19
20
  import style from './style.css';
21
+ export const THEMES = {
22
+ default: null,
23
+ coorpmanager: style.coorpmanager
24
+ };
20
25
 
21
26
  const CardBackground = ({
22
27
  type,
23
28
  image,
24
- empty
29
+ empty,
30
+ theme
25
31
  }, {
26
32
  skin
27
33
  }) => {
@@ -35,19 +41,19 @@ const CardBackground = ({
35
41
  const IconType = EXTERNAL_CONTENT_ICONS[type].icon;
36
42
  const iconColor = EXTERNAL_CONTENT_ICONS[type].color;
37
43
  const backgroundIcon = /*#__PURE__*/React.createElement("div", {
38
- className: style.externalIconCircleWrapper
44
+ className: classnames(THEMES[theme], style.externalIconCircleWrapper)
39
45
  }, /*#__PURE__*/React.createElement(IconType, {
40
- className: style.externalIcon
46
+ className: classnames(THEMES[theme], style.externalIcon)
41
47
  }));
42
48
 
43
49
  if (image) {
44
50
  const _backgroundIcon = /*#__PURE__*/React.createElement("div", {
45
- className: classnames(style.externalIconCircleWrapper, style.externalIconCircleWithImageWrapper),
51
+ className: classnames(THEMES[theme], style.externalIconCircleWrapper, style.externalIconCircleWithImageWrapper),
46
52
  style: {
47
53
  backgroundColor: iconColor
48
54
  }
49
55
  }, /*#__PURE__*/React.createElement(IconType, {
50
- className: style.externalIconWithImage
56
+ className: classnames(THEMES[theme], style.externalIconWithImage)
51
57
  }));
52
58
 
53
59
  return /*#__PURE__*/React.createElement("div", {
@@ -93,6 +99,7 @@ CardBackground.contextTypes = {
93
99
  skin: Provider.childContextTypes.skin
94
100
  };
95
101
  CardBackground.propTypes = process.env.NODE_ENV !== "production" ? {
102
+ theme: PropTypes.oneOf(_keys(THEMES)),
96
103
  type: PropTypes.string,
97
104
  image: PropTypes.string,
98
105
  empty: PropTypes.bool
@@ -120,7 +127,8 @@ const Card = memo(function Card(props, context) {
120
127
  isSelected,
121
128
  notification,
122
129
  badgeCategory,
123
- badgeLabel
130
+ badgeLabel,
131
+ theme = 'default'
124
132
  } = props;
125
133
 
126
134
  const empty = _isEmpty(_pick(['title', 'type', 'author', 'image'], props));
@@ -129,7 +137,7 @@ const Card = memo(function Card(props, context) {
129
137
 
130
138
  const whiteColor = _get('common.white', skin);
131
139
 
132
- const cardStyle = classnames(type === 'chapter' ? style.chapter : style.course, title ? null : style.lazy, style.grid, empty ? style.empty : null);
140
+ const cardStyle = classnames(THEMES[theme], type === 'chapter' ? style.chapter : style.course, title ? null : style.lazy, style.grid, empty ? style.empty : null);
133
141
  const handleClick = useMemo(() => e => !disabled && onClick(e), [disabled, onClick]);
134
142
  const lock = disabled ? /*#__PURE__*/React.createElement(LockIcon, {
135
143
  className: style.lockIcon,
@@ -163,7 +171,8 @@ const Card = memo(function Card(props, context) {
163
171
  }, /*#__PURE__*/React.createElement(CardBackground, {
164
172
  type: type,
165
173
  image: image,
166
- empty: empty
174
+ empty: empty,
175
+ theme: theme
167
176
  }), _isUndefined(isSelected) && !_isUndefined(favorite) ? /*#__PURE__*/React.createElement(Favorite, {
168
177
  className: style.favorite,
169
178
  favorite: favorite,
@@ -174,7 +183,9 @@ const Card = memo(function Card(props, context) {
174
183
  }) : null, /*#__PURE__*/React.createElement(Selectable, {
175
184
  isSelected: isSelected
176
185
  }), notification ? /*#__PURE__*/React.createElement(Notification, notification) : null, customer ? /*#__PURE__*/React.createElement(Customer, _extends({}, customer, {
177
- className: classnames(style.customer, type === 'chapter' ? style.chapterCustomer : null)
186
+ theme: theme,
187
+ type: type,
188
+ disabled: disabled
178
189
  })) : null, /*#__PURE__*/React.createElement(CardContentInfo, {
179
190
  mode: MODES.CARD,
180
191
  adaptiv: adaptiv,
@@ -186,9 +197,10 @@ const Card = memo(function Card(props, context) {
186
197
  title: title,
187
198
  type: type,
188
199
  badgeCategory: badgeCategory,
189
- badgeLabel: badgeLabel
200
+ badgeLabel: badgeLabel,
201
+ theme: theme
190
202
  }), badge ? /*#__PURE__*/React.createElement("div", {
191
- className: style.badge,
203
+ className: classnames(THEMES[theme], style.badge),
192
204
  style: inlineBadgeStyle
193
205
  }, badge) : null, disabled ? /*#__PURE__*/React.createElement("div", {
194
206
  className: style.lockWrapper
@@ -216,7 +228,8 @@ Card.propTypes = process.env.NODE_ENV !== "production" ? {
216
228
  isSelected: PropTypes.bool,
217
229
  notification: PropTypes.shape(Notification.propTypes),
218
230
  badgeCategory: CardContentInfo.propTypes.badgeCategory,
219
- badgeLabel: CardContentInfo.propTypes.badgeLabel
231
+ badgeLabel: CardContentInfo.propTypes.badgeLabel,
232
+ theme: PropTypes.oneOf(_keys(THEMES))
220
233
  } : {};
221
234
  export default Card;
222
235
  //# 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","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,eA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C6C,IAJJ;AAKf5B,EAAAA,IAAI,EAAEjB,SAAS,CAAC4C,MALD;AAMfQ,EAAAA,KAAK,EAAEpD,SAAS,CAAC4C,MANF;AAOfS,EAAAA,MAAM,EAAErD,SAAS,CAAC4C,MAPH;AAQfW,EAAAA,eAAe,EAAEvD,SAAS,CAAC6C,IARZ;AASfS,EAAAA,QAAQ,EAAEtD,SAAS,CAACiF,KAAV,CAAgBtE,QAAQ,CAACgC,SAAzB,CATK;AAUfa,EAAAA,QAAQ,EAAExD,SAAS,CAACkF,MAVL;AAWfzB,EAAAA,QAAQ,EAAEzD,SAAS,CAAC6C,IAXL;AAYfa,EAAAA,kBAAkB,EAAE1D,SAAS,CAAC4C,MAZf;AAafe,EAAAA,qBAAqB,EAAE3D,SAAS,CAAC4C,MAblB;AAcfgB,EAAAA,OAAO,EAAE5D,SAAS,CAACmF,IAdJ;AAeftB,EAAAA,eAAe,EAAE7D,SAAS,CAACmF,IAfZ;AAgBfrB,EAAAA,UAAU,EAAE9D,SAAS,CAAC6C,IAhBP;AAiBfkB,EAAAA,YAAY,EAAE/D,SAAS,CAACiF,KAAV,CAAgBnE,YAAY,CAAC6B,SAA7B,CAjBC;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"}
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","theme","skin","externalContent","primaryColor","whiteColor","IconType","icon","iconColor","color","backgroundIcon","externalIconCircleWrapper","externalIcon","_backgroundIcon","externalIconCircleWithImageWrapper","backgroundColor","externalIconWithImage","imageWrapper","backgroundImage","externalContentHeader","externalBackground","emptyIcon","chapterImageWrapper","contextTypes","childContextTypes","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","CARD","lockWrapper","shape","number","func"],"mappings":";;;;;;;;AAAA,OAAOA,KAAP,IAAeC,OAAf,EAAwBC,IAAxB,QAAmC,OAAnC;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,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BAAqB,EAAEhE,SAAS,CAACiD,MAblB;AAcfgB,EAAAA,OAAO,EAAEjE,SAAS,CAACuF,IAdJ;AAefrB,EAAAA,eAAe,EAAElE,SAAS,CAACuF,IAfZ;AAgBfpB,EAAAA,UAAU,EAAEnE,SAAS,CAACkD,IAhBP;AAiBfkB,EAAAA,YAAY,EAAEpE,SAAS,CAACqF,KAAV,CAAgBvE,YAAY,CAACiC,SAA7B,CAjBC;AAkBfsB,EAAAA,aAAa,EAAE5D,eAAe,CAACsC,SAAhB,CAA0BsB,aAlB1B;AAmBfC,EAAAA,UAAU,EAAE7D,eAAe,CAACsC,SAAhB,CAA0BuB,UAnBvB;AAoBf/C,EAAAA,KAAK,EAAEvB,SAAS,CAACgD,KAAV,CAAgB,MAAKhC,MAAL,CAAhB;AApBQ,CAAjB;AAsBA,eAAemC,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, 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,18 @@
1
+ import _defaultsDeep from "lodash/fp/defaultsDeep";
2
+ import Default from './default';
3
+ const {
4
+ props
5
+ } = Default;
6
+ export default {
7
+ props: _defaultsDeep(props, {
8
+ disabled: false,
9
+ type: 'course',
10
+ 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',
11
+ progress: 0.1,
12
+ isSelected: false,
13
+ badgeCategory: 'base',
14
+ badgeLabel: 'basic',
15
+ theme: 'coorpmanager'
16
+ })
17
+ };
18
+ //# sourceMappingURL=coorpmanager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/molecule/card/test/fixtures/coorpmanager.js"],"names":["Default","props","disabled","type","image","progress","isSelected","badgeCategory","badgeLabel","theme"],"mappings":";AACA,OAAOA,OAAP,MAAoB,WAApB;AAEA,MAAM;AAACC,EAAAA;AAAD,IAAUD,OAAhB;AAEA,eAAe;AACbC,EAAAA,KAAK,EAAE,cAAaA,KAAb,EAAoB;AACzBC,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,CAAf","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"}
@@ -6,6 +6,7 @@ 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';
9
10
  import fixtureDefault from './fixtures/default';
10
11
  import fixtureDisabled from './fixtures/disabled';
11
12
  import fixtureEmpty from './fixtures/empty';
@@ -28,6 +29,7 @@ test('Molecule › MoleculeCard › AdaptivAndDisabled › should be rendered',
28
29
  test('Molecule › MoleculeCard › Adaptiv › should be rendered', renderComponentMacro, MoleculeCard, fixtureAdaptiv);
29
30
  test('Molecule › MoleculeCard › Arabic › should be rendered', renderComponentMacro, MoleculeCard, fixtureArabic);
30
31
  test('Molecule › MoleculeCard › Article › should be rendered', renderComponentMacro, MoleculeCard, fixtureArticle);
32
+ test('Molecule › MoleculeCard › Coorpmanager › should be rendered', renderComponentMacro, MoleculeCard, fixtureCoorpmanager);
31
33
  test('Molecule › MoleculeCard › Default › should be rendered', renderComponentMacro, MoleculeCard, fixtureDefault);
32
34
  test('Molecule › MoleculeCard › Disabled › should be rendered', renderComponentMacro, MoleculeCard, fixtureDisabled);
33
35
  test('Molecule › MoleculeCard › Empty › should be rendered', renderComponentMacro, MoleculeCard, fixtureEmpty);