@coorpacademy/components 11.38.6-alpha.27 → 11.38.6-alpha.29

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 (161) hide show
  1. package/es/atom/input-search/index.d.ts +0 -2
  2. package/es/atom/input-search/index.d.ts.map +1 -1
  3. package/es/atom/input-search/index.js +13 -46
  4. package/es/atom/input-search/index.js.map +1 -1
  5. package/es/atom/input-search/style.css +0 -96
  6. package/es/molecule/card/customer.css +0 -3
  7. package/es/molecule/card/favorite.css +3 -3
  8. package/es/molecule/card/index.d.ts.map +1 -1
  9. package/es/molecule/card/index.js +27 -11
  10. package/es/molecule/card/index.js.map +1 -1
  11. package/es/molecule/card/notification.css +28 -12
  12. package/es/molecule/card/notification.d.ts.map +1 -1
  13. package/es/molecule/card/notification.js +24 -4
  14. package/es/molecule/card/notification.js.map +1 -1
  15. package/es/molecule/card/style.css +4 -53
  16. package/es/molecule/card-content/index.d.ts.map +1 -1
  17. package/es/molecule/card-content/index.js +59 -37
  18. package/es/molecule/card-content/index.js.map +1 -1
  19. package/es/molecule/card-content/style.css +27 -72
  20. package/es/molecule/cm-popin/types.d.ts +0 -2
  21. package/es/molecule/cm-popin/types.d.ts.map +1 -1
  22. package/es/molecule/external-content-button/style.css +1 -0
  23. package/es/molecule/multi-filter-panel/index.d.ts +0 -2
  24. package/es/molecule/multi-filter-panel/index.d.ts.map +1 -1
  25. package/es/molecule/multi-filter-panel/prop-types.d.ts +0 -2
  26. package/es/molecule/multi-filter-panel/prop-types.d.ts.map +1 -1
  27. package/es/molecule/search-form/index.d.ts +0 -5
  28. package/es/molecule/search-form/index.d.ts.map +1 -1
  29. package/es/molecule/search-form/index.js +16 -26
  30. package/es/molecule/search-form/index.js.map +1 -1
  31. package/es/molecule/search-form/style.css +6 -21
  32. package/es/organism/brand-table/index.d.ts +0 -2
  33. package/es/organism/content-skill-modal/index.d.ts +0 -4
  34. package/es/organism/content-skill-modal/index.d.ts.map +1 -1
  35. package/es/organism/content-skill-modal/types.d.ts +0 -4
  36. package/es/organism/content-skill-modal/types.d.ts.map +1 -1
  37. package/es/organism/filter-checkbox-and-search/index.d.ts +0 -2
  38. package/es/organism/filter-checkbox-and-search/index.d.ts.map +1 -1
  39. package/es/organism/filter-checkbox-and-search/props-types.d.ts +0 -2
  40. package/es/organism/filter-checkbox-and-search/props-types.d.ts.map +1 -1
  41. package/es/organism/list-items/index.d.ts +0 -2
  42. package/es/organism/mooc-header/index.d.ts +0 -14
  43. package/es/organism/mooc-header/index.d.ts.map +1 -1
  44. package/es/organism/mooc-header/index.js +12 -123
  45. package/es/organism/mooc-header/index.js.map +1 -1
  46. package/es/organism/mooc-header/style.css +8 -181
  47. package/es/template/app-player/loading/index.d.ts +0 -2
  48. package/es/template/app-player/player/index.d.ts +0 -4
  49. package/es/template/app-player/player/slides/index.d.ts +0 -2
  50. package/es/template/app-player/player/slides/index.d.ts.map +1 -1
  51. package/es/template/app-player/popin-correction/index.d.ts +0 -2
  52. package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
  53. package/es/template/app-player/popin-end/index.d.ts +0 -2
  54. package/es/template/app-review/index.d.ts +0 -2
  55. package/es/template/app-review/index.d.ts.map +1 -1
  56. package/es/template/app-review/player/prop-types.d.ts +0 -2
  57. package/es/template/app-review/player/prop-types.d.ts.map +1 -1
  58. package/es/template/app-review/prop-types.d.ts +0 -2
  59. package/es/template/app-review/prop-types.d.ts.map +1 -1
  60. package/es/template/back-office/brand-update/index.d.ts +0 -12
  61. package/es/template/common/dashboard/index.d.ts +0 -4
  62. package/es/template/common/search-page/index.d.ts +0 -2
  63. package/es/template/external-course/index.d.ts +0 -2
  64. package/es/util/check-is-mobile.d.ts +1 -1
  65. package/es/util/check-is-mobile.d.ts.map +1 -1
  66. package/es/util/check-is-mobile.js +2 -4
  67. package/es/util/check-is-mobile.js.map +1 -1
  68. package/es/util/external-content.d.ts +38 -4
  69. package/es/util/external-content.d.ts.map +1 -1
  70. package/es/util/external-content.js +27 -4
  71. package/es/util/external-content.js.map +1 -1
  72. package/es/util/icons.d.ts +8 -0
  73. package/es/util/icons.d.ts.map +1 -0
  74. package/es/util/icons.js +8 -0
  75. package/es/util/icons.js.map +1 -0
  76. package/es/variables/colors.d.ts +5 -0
  77. package/es/variables/colors.d.ts.map +1 -1
  78. package/es/variables/colors.js +6 -1
  79. package/es/variables/colors.js.map +1 -1
  80. package/lib/atom/input-search/index.d.ts +0 -2
  81. package/lib/atom/input-search/index.d.ts.map +1 -1
  82. package/lib/atom/input-search/index.js +13 -46
  83. package/lib/atom/input-search/index.js.map +1 -1
  84. package/lib/atom/input-search/style.css +0 -96
  85. package/lib/molecule/card/customer.css +0 -3
  86. package/lib/molecule/card/favorite.css +3 -3
  87. package/lib/molecule/card/index.d.ts.map +1 -1
  88. package/lib/molecule/card/index.js +26 -10
  89. package/lib/molecule/card/index.js.map +1 -1
  90. package/lib/molecule/card/notification.css +28 -12
  91. package/lib/molecule/card/notification.d.ts.map +1 -1
  92. package/lib/molecule/card/notification.js +23 -3
  93. package/lib/molecule/card/notification.js.map +1 -1
  94. package/lib/molecule/card/style.css +4 -53
  95. package/lib/molecule/card-content/index.d.ts.map +1 -1
  96. package/lib/molecule/card-content/index.js +58 -36
  97. package/lib/molecule/card-content/index.js.map +1 -1
  98. package/lib/molecule/card-content/style.css +27 -72
  99. package/lib/molecule/cm-popin/types.d.ts +0 -2
  100. package/lib/molecule/cm-popin/types.d.ts.map +1 -1
  101. package/lib/molecule/external-content-button/style.css +1 -0
  102. package/lib/molecule/multi-filter-panel/index.d.ts +0 -2
  103. package/lib/molecule/multi-filter-panel/index.d.ts.map +1 -1
  104. package/lib/molecule/multi-filter-panel/prop-types.d.ts +0 -2
  105. package/lib/molecule/multi-filter-panel/prop-types.d.ts.map +1 -1
  106. package/lib/molecule/search-form/index.d.ts +0 -5
  107. package/lib/molecule/search-form/index.d.ts.map +1 -1
  108. package/lib/molecule/search-form/index.js +17 -27
  109. package/lib/molecule/search-form/index.js.map +1 -1
  110. package/lib/molecule/search-form/style.css +6 -21
  111. package/lib/organism/brand-table/index.d.ts +0 -2
  112. package/lib/organism/content-skill-modal/index.d.ts +0 -4
  113. package/lib/organism/content-skill-modal/index.d.ts.map +1 -1
  114. package/lib/organism/content-skill-modal/types.d.ts +0 -4
  115. package/lib/organism/content-skill-modal/types.d.ts.map +1 -1
  116. package/lib/organism/filter-checkbox-and-search/index.d.ts +0 -2
  117. package/lib/organism/filter-checkbox-and-search/index.d.ts.map +1 -1
  118. package/lib/organism/filter-checkbox-and-search/props-types.d.ts +0 -2
  119. package/lib/organism/filter-checkbox-and-search/props-types.d.ts.map +1 -1
  120. package/lib/organism/list-items/index.d.ts +0 -2
  121. package/lib/organism/mooc-header/index.d.ts +0 -14
  122. package/lib/organism/mooc-header/index.d.ts.map +1 -1
  123. package/lib/organism/mooc-header/index.js +12 -123
  124. package/lib/organism/mooc-header/index.js.map +1 -1
  125. package/lib/organism/mooc-header/style.css +8 -181
  126. package/lib/template/app-player/loading/index.d.ts +0 -2
  127. package/lib/template/app-player/player/index.d.ts +0 -4
  128. package/lib/template/app-player/player/slides/index.d.ts +0 -2
  129. package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
  130. package/lib/template/app-player/popin-correction/index.d.ts +0 -2
  131. package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
  132. package/lib/template/app-player/popin-end/index.d.ts +0 -2
  133. package/lib/template/app-review/index.d.ts +0 -2
  134. package/lib/template/app-review/index.d.ts.map +1 -1
  135. package/lib/template/app-review/player/prop-types.d.ts +0 -2
  136. package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
  137. package/lib/template/app-review/prop-types.d.ts +0 -2
  138. package/lib/template/app-review/prop-types.d.ts.map +1 -1
  139. package/lib/template/back-office/brand-update/index.d.ts +0 -12
  140. package/lib/template/common/dashboard/index.d.ts +0 -4
  141. package/lib/template/common/search-page/index.d.ts +0 -2
  142. package/lib/template/external-course/index.d.ts +0 -2
  143. package/lib/util/check-is-mobile.d.ts +1 -1
  144. package/lib/util/check-is-mobile.d.ts.map +1 -1
  145. package/lib/util/check-is-mobile.js +2 -4
  146. package/lib/util/check-is-mobile.js.map +1 -1
  147. package/lib/util/external-content.d.ts +38 -4
  148. package/lib/util/external-content.d.ts.map +1 -1
  149. package/lib/util/external-content.js +28 -5
  150. package/lib/util/external-content.js.map +1 -1
  151. package/lib/util/icons.d.ts +8 -0
  152. package/lib/util/icons.d.ts.map +1 -0
  153. package/lib/util/icons.js +12 -0
  154. package/lib/util/icons.js.map +1 -0
  155. package/lib/variables/colors.d.ts +5 -0
  156. package/lib/variables/colors.d.ts.map +1 -1
  157. package/lib/variables/colors.js +6 -1
  158. package/lib/variables/colors.js.map +1 -1
  159. package/locales/en/global.json +5 -0
  160. package/locales/lt/global.json +24 -24
  161. package/package.json +2 -2
@@ -8,13 +8,11 @@
8
8
  @value white from colors;
9
9
  @value dark from colors;
10
10
  @value black from colors;
11
- @value cm_grey_75 from colors;
12
11
  @value cm_grey_100 from colors;
13
12
  @value cm_grey_150 from colors;
14
13
  @value cm_grey_400 from colors;
15
14
  @value cm_grey_500 from colors;
16
15
  @value cm_grey_700 from colors;
17
- @value brand from colors;
18
16
 
19
17
  .wrapperSearch {
20
18
  display: flex;
@@ -68,7 +66,6 @@
68
66
  color: medium;
69
67
  }
70
68
 
71
- /* Theme: coorpmanager */
72
69
  .coorpmanager {
73
70
  position: relative;
74
71
  }
@@ -180,65 +177,6 @@
180
177
  line-height: 16px;
181
178
  }
182
179
 
183
- /* Theme: mooc */
184
- .wrapperMooc {
185
- display: flex;
186
- flex-flow: nowrap;
187
- flex-direction: row;
188
- align-items: center;
189
- overflow: hidden;
190
- border-radius: 12px;
191
- transition: box-shadow 0.3s ease-in-out;
192
- background: cm_grey_100;
193
- padding: 2px;
194
- width: 100%;
195
- flex: 1;
196
- }
197
-
198
- .wrapperMoocParent {
199
- width: 100%;
200
- flex: 1;
201
- border-radius: 12px;
202
- transition: box-shadow 0.3s ease-in-out;
203
- background: transparent;
204
- }
205
-
206
- .moocSearch {
207
- background-color: cm_grey_100;
208
- border-radius: 12px;
209
- height: 44px;
210
- margin: 0;
211
- font-family: Gilroy;
212
- font-size: 14px;
213
- font-weight: 500;
214
- color: cm_grey_700;
215
- padding: 0 0 0 45px;
216
- padding-right: 48px;
217
- outline: none;
218
- }
219
-
220
- .moocSearch:focus-within {
221
- background-color: cm_grey_75;
222
- }
223
-
224
- .wrapperMoocParent:focus-within .wrapperMooc {
225
- background: transparent;
226
- box-shadow: 0 0 0 2px rgba(255,255,255,0), 0 0 0 2px brand;
227
- }
228
-
229
- .wrapperMooc:hover {
230
- box-shadow: 0 0 0 2px brand;
231
- }
232
-
233
- .wrapperMooc .clearIcon {
234
- position: relative;
235
- right: 26px;
236
- color: cm_grey_400;
237
- width: 14px;
238
- height: 14px;
239
- cursor: pointer;
240
- }
241
-
242
180
  input:-webkit-autofill,
243
181
  input:-webkit-autofill:hover,
244
182
  input:-webkit-autofill:focus,
@@ -246,20 +184,6 @@ input:-webkit-autofill:active{
246
184
  -webkit-background-clip: text;
247
185
  }
248
186
 
249
- .moocSearch:-webkit-autofill,
250
- .moocSearch:-webkit-autofill:hover,
251
- .moocSearch:-webkit-autofill:focus,
252
- .moocSearch:-webkit-autofill:active {
253
- -webkit-box-shadow: 0 0 0 1000px cm_grey_100 inset !important;
254
- -webkit-text-fill-color: cm_grey_700 !important;
255
- background-color: cm_grey_100 !important;
256
- }
257
-
258
- .wrapperMoocParent:focus-within .moocSearch:-webkit-autofill {
259
- -webkit-box-shadow: 0 0 0 1000px cm_grey_75 inset !important;
260
- background-color: cm_grey_75 !important;
261
- }
262
-
263
187
  @media tablet {
264
188
  .search,
265
189
  input {
@@ -270,16 +194,6 @@ input:-webkit-autofill:active{
270
194
  font-size: 12px;
271
195
  color: medium;
272
196
  }
273
-
274
- .wrapperMoocParent {
275
- max-width: 100%;
276
- box-sizing: border-box;
277
- }
278
-
279
- .wrapperMooc {
280
- max-width: 100%;
281
- box-sizing: border-box;
282
- }
283
197
  }
284
198
 
285
199
  @media mobile {
@@ -290,14 +204,4 @@ input:-webkit-autofill:active{
290
204
  .search::placeholder {
291
205
  font-size: 12px;
292
206
  }
293
-
294
- .wrapperMoocParent {
295
- max-width: 100%;
296
- box-sizing: border-box;
297
- }
298
-
299
- .wrapperMooc {
300
- max-width: 100%;
301
- box-sizing: border-box;
302
- }
303
207
  }
@@ -47,9 +47,6 @@
47
47
  rgba(0, 0, 0, 0) 20%
48
48
  );
49
49
  }
50
- .chapterCustomer {
51
- padding-top: 10px;
52
- }
53
50
 
54
51
  .coorpmanager.customer.chapterCustomer {
55
52
  padding-top: 0px;
@@ -8,8 +8,8 @@
8
8
  @value black from colors;
9
9
 
10
10
  .favorite {
11
- width: 24px;
12
- height: 24px;
11
+ width: 36px;
12
+ height: 36px;
13
13
  position: absolute;
14
14
  right: 8px;
15
15
  top: 8px;
@@ -19,7 +19,7 @@
19
19
  line-height: 0px;
20
20
  box-shadow: 0 0 13px 0 rgba(0, 0, 0, 0.11);
21
21
  background-color: #ffffff;
22
- border-radius: 100%;
22
+ border-radius: 8px;
23
23
  border: none;
24
24
  padding: 0;
25
25
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/card/index.js"],"names":[],"mappings":";;;;;AA2PA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BE;;;AAlKF,uDA8HG"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/card/index.js"],"names":[],"mappings":";;;;;AA4QA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BE;;;AAjKF,uDA6HG"}
@@ -14,6 +14,8 @@ var _novaIcons = require("@coorpacademy/nova-icons");
14
14
  var _externalContent = require("../../util/external-content");
15
15
  var _provider = _interopRequireDefault(require("../../atom/provider"));
16
16
  var _cardContent = _interopRequireWildcard(require("../card-content"));
17
+ var _icon = _interopRequireDefault(require("../../atom/icon"));
18
+ var _colors = require("../../variables/colors");
17
19
  var _customer = _interopRequireDefault(require("./customer"));
18
20
  var _favorite = _interopRequireDefault(require("./favorite"));
19
21
  var _selectable = _interopRequireDefault(require("./selectable"));
@@ -27,6 +29,7 @@ const THEMES = exports.THEMES = {
27
29
  default: null,
28
30
  coorpmanager: _style.default.coorpmanager
29
31
  };
32
+ const ICON_SIZE = '28px';
30
33
  const CardBackground = ({
31
34
  type,
32
35
  image,
@@ -38,22 +41,35 @@ const CardBackground = ({
38
41
  const externalContent = (0, _externalContent.isExternalContent)(type);
39
42
  const primaryColor = (0, _get2.default)('common.primary', skin);
40
43
  const whiteColor = (0, _get2.default)('common.white', skin);
41
- if (externalContent && _externalContent.EXTERNAL_CONTENT_ICONS[type]) {
42
- const IconType = _externalContent.EXTERNAL_CONTENT_ICONS[type].icon;
43
- const iconColor = _externalContent.EXTERNAL_CONTENT_ICONS[type].color;
44
+ if (externalContent && _externalContent.EXTERNAL_CONTENT_ICONS[type] || type === 'chapter') {
45
+ const {
46
+ iconName,
47
+ iconColor
48
+ } = _externalContent.ICONS_TYPES[type];
44
49
  const backgroundIcon = /*#__PURE__*/_react.default.createElement("div", {
45
- className: _style.default.externalIconCircleWrapper
46
- }, /*#__PURE__*/_react.default.createElement(IconType, {
47
- className: _style.default.externalIcon
50
+ className: (0, _classnames.default)(_style.default.externalIconCircleWrapper, _style.default.externalIconCircleWithImageWrapper)
51
+ }, /*#__PURE__*/_react.default.createElement(_icon.default, {
52
+ iconName: iconName,
53
+ customStyle: {
54
+ color: _colors.COLORS.white,
55
+ height: ICON_SIZE,
56
+ width: ICON_SIZE
57
+ }
48
58
  }));
49
59
  if (image) {
50
60
  const _backgroundIcon = /*#__PURE__*/_react.default.createElement("div", {
51
61
  className: (0, _classnames.default)(_style.default.externalIconCircleWrapper, _style.default.externalIconCircleWithImageWrapper),
52
62
  style: {
53
63
  backgroundColor: iconColor
64
+ },
65
+ "data-testid": "card-background-image"
66
+ }, /*#__PURE__*/_react.default.createElement(_icon.default, {
67
+ iconName: iconName,
68
+ customStyle: {
69
+ color: _colors.COLORS.white,
70
+ height: ICON_SIZE,
71
+ width: ICON_SIZE
54
72
  }
55
- }, /*#__PURE__*/_react.default.createElement(IconType, {
56
- className: _style.default.externalIconWithImage
57
73
  }));
58
74
  return /*#__PURE__*/_react.default.createElement("div", {
59
75
  className: _style.default.imageWrapper
@@ -85,7 +101,7 @@ const CardBackground = ({
85
101
  }
86
102
  }) : null;
87
103
  return /*#__PURE__*/_react.default.createElement("div", {
88
- className: (0, _classnames.default)(_style.default.imageWrapper, type === 'chapter' ? _style.default.chapterImageWrapper : null)
104
+ className: _style.default.imageWrapper
89
105
  }, /*#__PURE__*/_react.default.createElement("div", {
90
106
  "data-name": "cover",
91
107
  "aria-label": ariaLabel,
@@ -142,7 +158,7 @@ const Card = /*#__PURE__*/(0, _react.memo)(function Card(props, context) {
142
158
  } = props;
143
159
  const empty = (0, _isEmpty2.default)((0, _pick2.default)(['title', 'type', 'author', 'image'], props));
144
160
  const primaryColor = (0, _get2.default)('common.primary', skin);
145
- const cardStyle = (0, _classnames.default)(THEMES[theme], type === 'chapter' ? _style.default.chapter : _style.default.course, title ? null : _style.default.lazy, _style.default.grid, empty ? _style.default.empty : null);
161
+ const cardStyle = (0, _classnames.default)(THEMES[theme], _style.default.course, title ? null : _style.default.lazy, _style.default.grid, empty ? _style.default.empty : null);
146
162
  const disabled = hidden && (!isSelected || (0, _isUndefined2.default)(isSelected));
147
163
  const handleClick = (0, _react.useMemo)(() => e => onClick(e), [onClick]);
148
164
  const lock = disabled ? /*#__PURE__*/_react.default.createElement("div", {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_classnames","_novaIcons","_externalContent","_provider","_cardContent","_customer","_favorite","_selectable","_notification","_style","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","THEMES","exports","coorpmanager","style","CardBackground","type","image","empty","ariaLabel","skin","externalContent","isExternalContent","primaryColor","_get2","whiteColor","EXTERNAL_CONTENT_ICONS","IconType","icon","iconColor","color","backgroundIcon","createElement","className","externalIconCircleWrapper","externalIcon","_backgroundIcon","classnames","externalIconCircleWithImageWrapper","backgroundColor","externalIconWithImage","imageWrapper","backgroundImage","externalContentHeader","externalBackground","emptyIcon","NovaCompositionCoorpacademyPictures","chapterImageWrapper","contextTypes","Provider","childContextTypes","propTypes","process","env","NODE_ENV","PropTypes","string","bool","Card","memo","props","context","badge","adaptiv","disabled","hidden","title","author","customer","certifiedAuthor","progress","favorite","addFavoriteToolTip","removeFavoriteToolTip","onClick","onFavoriteClick","isSelected","notification","badgeCategory","badgeLabel","theme","disabledContent","cardArialabel","backgroundAriaLabel","favoriteAriaLabel","selectableAriaLabel","customerAriaLabel","badgeAriaLabel","disabledArialabel","cardContentLabelAriaLabel","_isEmpty2","_pick2","cardStyle","chapter","course","lazy","grid","_isUndefined2","handleClick","useMemo","lock","lockContent","NovaCompositionCoorpacademyPadlock","lockIcon","height","dangerouslySetInnerHTML","__html","inlineBadgeStyle","getType","contentType","mode","MODES","CARD","lockWrapper","cardPropTypes","shape","Customer","number","func","Notification","CardContentInfo","oneOf","_keys2","Favorite","Selectable","_default"],"sources":["../../../src/molecule/card/index.js"],"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 NovaCompositionCoorpacademyPadlock 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, 'aria-label': ariaLabel}, {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 aria-label={ariaLabel}\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 aria-label={ariaLabel}\n style={{\n backgroundColor: iconColor\n }}\n className={style.externalContentHeader}\n >\n {backgroundIcon}\n </div>\n </div>\n );\n }\n\n const emptyIcon = empty ? (\n <PicturesIcon className={style.emptyIcon} style={{color: whiteColor}} />\n ) : 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 aria-label={ariaLabel}\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 'aria-label': PropTypes.string\n};\n\nconst Card = memo(function Card(props, context) {\n const {skin} = context;\n const {\n image,\n badge,\n adaptiv,\n disabled: hidden = 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 disabledContent,\n 'aria-label': cardArialabel,\n 'background-aria-label': backgroundAriaLabel,\n 'favorite-aria-label': favoriteAriaLabel,\n 'selectable-aria-label': selectableAriaLabel,\n 'customer-aria-label': customerAriaLabel,\n 'badge-aria-label': badgeAriaLabel,\n 'disabled-aria-label': disabledArialabel,\n 'card-content-aria-label': cardContentLabelAriaLabel\n } = props;\n const empty = isEmpty(pick(['title', 'type', 'author', 'image'], props));\n const primaryColor = get('common.primary', 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 disabled = hidden && (!isSelected || isUndefined(isSelected));\n const handleClick = useMemo(() => e => onClick(e), [onClick]);\n const lock = disabled ? (\n <div className={style.lockContent}>\n <LockIcon className={style.lockIcon} height={48} />\n <span\n aria-label={disabledArialabel}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: disabledContent}}\n />\n </div>\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 aria-label={cardArialabel}\n >\n <CardBackground type={type} image={image} empty={empty} aria-label={backgroundAriaLabel} />\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 aria-label={favoriteAriaLabel}\n />\n ) : null}\n <Selectable isSelected={isSelected} hidden={hidden} aria-label={selectableAriaLabel} />\n {notification ? <Notification {...notification} /> : null}\n {customer ? (\n <Customer\n {...customer}\n theme={theme}\n type={type}\n disabled={disabled}\n aria-label={customerAriaLabel}\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 theme={theme}\n aria-label={cardContentLabelAriaLabel}\n />\n {badge ? (\n <div className={style.badge} style={inlineBadgeStyle} aria-label={badgeAriaLabel}>\n {badge}\n </div>\n ) : null}\n {disabled ? (\n <div className={style.lockWrapper} aria-label={disabledArialabel}>\n {lock}\n </div>\n ) : null}\n </div>\n );\n});\n\nCard.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nexport const cardPropTypes = {\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 disabledContent: PropTypes.string,\n 'aria-label': PropTypes.string,\n 'background-aria-label': PropTypes.string,\n 'favorite-aria-label': Favorite.propTypes['aria-label'],\n 'selectable-aria-label': Selectable.propTypes['aria-label'],\n 'customer-aria-label': Customer.propTypes['aria-label'],\n 'badge-aria-label': PropTypes.string,\n 'disabled-aria-label': PropTypes.string,\n 'card-content-aria-label': CardContentInfo.propTypes['aria-label']\n};\n\nCard.propTypes = cardPropTypes;\n\nexport default Card;\n"],"mappings":";;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,WAAA,GAAAD,sBAAA,CAAAF,OAAA;AAEA,IAAAI,UAAA,GAAAJ,OAAA;AAIA,IAAAK,gBAAA,GAAAL,OAAA;AACA,IAAAM,SAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,YAAA,GAAAR,uBAAA,CAAAC,OAAA;AACA,IAAAQ,SAAA,GAAAN,sBAAA,CAAAF,OAAA;AACA,IAAAS,SAAA,GAAAP,sBAAA,CAAAF,OAAA;AACA,IAAAU,WAAA,GAAAR,sBAAA,CAAAF,OAAA;AACA,IAAAW,aAAA,GAAAT,sBAAA,CAAAF,OAAA;AACA,IAAAY,MAAA,GAAAV,sBAAA,CAAAF,OAAA;AAAgC,SAAAa,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAf,wBAAAe,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,C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EAAEiE,iBAAQ,CAACjE,SAAS,CAAC,YAAY,CAAC;EACvD,kBAAkB,EAAEI,kBAAS,CAACC,MAAM;EACpC,qBAAqB,EAAED,kBAAS,CAACC,MAAM;EACvC,yBAAyB,EAAEgE,oBAAe,CAACrE,SAAS,CAAC,YAAY;AACnE,CAAC;AAEDO,IAAI,CAACP,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAG4D,aAAa;AAAC,IAAAW,QAAA,GAAAjH,OAAA,CAAArB,OAAA,GAEhBmE,IAAI","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_classnames","_novaIcons","_externalContent","_provider","_cardContent","_icon","_colors","_customer","_favorite","_selectable","_notification","_style","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","THEMES","exports","coorpmanager","style","ICON_SIZE","CardBackground","type","image","empty","ariaLabel","skin","externalContent","isExternalContent","primaryColor","_get2","whiteColor","EXTERNAL_CONTENT_ICONS","iconName","iconColor","ICONS_TYPES","backgroundIcon","createElement","className","classnames","externalIconCircleWrapper","externalIconCircleWithImageWrapper","customStyle","color","COLORS","white","height","width","_backgroundIcon","backgroundColor","imageWrapper","backgroundImage","externalContentHeader","externalBackground","emptyIcon","NovaCompositionCoorpacademyPictures","contextTypes","Provider","childContextTypes","propTypes","process","env","NODE_ENV","PropTypes","string","bool","Card","memo","props","context","badge","adaptiv","disabled","hidden","title","author","customer","certifiedAuthor","progress","favorite","addFavoriteToolTip","removeFavoriteToolTip","onClick","onFavoriteClick","isSelected","notification","badgeCategory","badgeLabel","theme","disabledContent","cardArialabel","backgroundAriaLabel","favoriteAriaLabel","selectableAriaLabel","customerAriaLabel","badgeAriaLabel","disabledArialabel","cardContentLabelAriaLabel","_isEmpty2","_pick2","cardStyle","course","lazy","grid","_isUndefined2","handleClick","useMemo","lock","lockContent","NovaCompositionCoorpacademyPadlock","lockIcon","dangerouslySetInnerHTML","__html","inlineBadgeStyle","getType","contentType","mode","MODES","CARD","lockWrapper","cardPropTypes","shape","Customer","number","func","Notification","CardContentInfo","oneOf","_keys2","Favorite","Selectable","_default"],"sources":["../../../src/molecule/card/index.js"],"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 NovaCompositionCoorpacademyPadlock as LockIcon,\n NovaCompositionCoorpacademyPictures as PicturesIcon\n} from '@coorpacademy/nova-icons';\nimport {isExternalContent, ICONS_TYPES, EXTERNAL_CONTENT_ICONS} from '../../util/external-content';\nimport Provider from '../../atom/provider';\nimport CardContentInfo, {MODES} from '../card-content';\nimport FaIcon from '../../atom/icon';\nimport {COLORS} from '../../variables/colors';\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 ICON_SIZE = '28px';\n\nconst CardBackground = ({type, image, empty, 'aria-label': ariaLabel}, {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]) || type === 'chapter') {\n const {iconName, iconColor} = ICONS_TYPES[type];\n const backgroundIcon = (\n <div\n className={classnames(\n style.externalIconCircleWrapper,\n style.externalIconCircleWithImageWrapper\n )}\n >\n <FaIcon\n iconName={iconName}\n customStyle={{\n color: COLORS.white,\n height: ICON_SIZE,\n width: ICON_SIZE\n }}\n />\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 data-testid=\"card-background-image\"\n >\n <FaIcon\n iconName={iconName}\n customStyle={{\n color: COLORS.white,\n height: ICON_SIZE,\n width: ICON_SIZE\n }}\n />\n </div>\n );\n\n return (\n <div className={style.imageWrapper}>\n <div\n data-name=\"cover\"\n aria-label={ariaLabel}\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 aria-label={ariaLabel}\n style={{\n backgroundColor: iconColor\n }}\n className={style.externalContentHeader}\n >\n {backgroundIcon}\n </div>\n </div>\n );\n }\n\n const emptyIcon = empty ? (\n <PicturesIcon className={style.emptyIcon} style={{color: whiteColor}} />\n ) : null;\n return (\n <div className={style.imageWrapper}>\n <div\n data-name=\"cover\"\n aria-label={ariaLabel}\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 'aria-label': PropTypes.string\n};\n\nconst Card = memo(function Card(props, context) {\n const {skin} = context;\n const {\n image,\n badge,\n adaptiv,\n disabled: hidden = 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 disabledContent,\n 'aria-label': cardArialabel,\n 'background-aria-label': backgroundAriaLabel,\n 'favorite-aria-label': favoriteAriaLabel,\n 'selectable-aria-label': selectableAriaLabel,\n 'customer-aria-label': customerAriaLabel,\n 'badge-aria-label': badgeAriaLabel,\n 'disabled-aria-label': disabledArialabel,\n 'card-content-aria-label': cardContentLabelAriaLabel\n } = props;\n const empty = isEmpty(pick(['title', 'type', 'author', 'image'], props));\n const primaryColor = get('common.primary', skin);\n const cardStyle = classnames(\n THEMES[theme],\n style.course,\n title ? null : style.lazy,\n style.grid,\n empty ? style.empty : null\n );\n const disabled = hidden && (!isSelected || isUndefined(isSelected));\n const handleClick = useMemo(() => e => onClick(e), [onClick]);\n const lock = disabled ? (\n <div className={style.lockContent}>\n <LockIcon className={style.lockIcon} height={48} />\n <span\n aria-label={disabledArialabel}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: disabledContent}}\n />\n </div>\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 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 aria-label={cardArialabel}\n >\n <CardBackground type={type} image={image} empty={empty} aria-label={backgroundAriaLabel} />\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 aria-label={favoriteAriaLabel}\n />\n ) : null}\n <Selectable isSelected={isSelected} hidden={hidden} aria-label={selectableAriaLabel} />\n {notification ? <Notification {...notification} /> : null}\n {customer ? (\n <Customer\n {...customer}\n theme={theme}\n type={type}\n disabled={disabled}\n aria-label={customerAriaLabel}\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 theme={theme}\n aria-label={cardContentLabelAriaLabel}\n />\n {badge ? (\n <div className={style.badge} style={inlineBadgeStyle} aria-label={badgeAriaLabel}>\n {badge}\n </div>\n ) : null}\n {disabled ? (\n <div className={style.lockWrapper} aria-label={disabledArialabel}>\n {lock}\n </div>\n ) : null}\n </div>\n );\n});\n\nCard.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nexport const cardPropTypes = {\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 disabledContent: PropTypes.string,\n 'aria-label': PropTypes.string,\n 'background-aria-label': PropTypes.string,\n 'favorite-aria-label': Favorite.propTypes['aria-label'],\n 'selectable-aria-label': Selectable.propTypes['aria-label'],\n 'customer-aria-label': Customer.propTypes['aria-label'],\n 'badge-aria-label': PropTypes.string,\n 'disabled-aria-label': PropTypes.string,\n 'card-content-aria-label': CardContentInfo.propTypes['aria-label']\n};\n\nCard.propTypes = cardPropTypes;\n\nexport default Card;\n"],"mappings":";;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,WAAA,GAAAD,sBAAA,CAAAF,OAAA;AAEA,IAAAI,UAAA,GAAAJ,OAAA;AAIA,IAAAK,gBAAA,GAAAL,OAAA;AACA,IAAAM,SAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,YAAA,GAAAR,uBAAA,CAAAC,OAAA;A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AAA,CAAArB,OAAA,GAEhBsE,IAAI","ignoreList":[]}
@@ -5,13 +5,16 @@
5
5
  @value grey from colors;
6
6
  @value dark from colors;
7
7
  @value white from colors;
8
+ @value cm_blue_700 from colors;
9
+ @value primary_100 from colors;
10
+ @value cm_grey_75 from colors;
8
11
 
9
12
  .notificationWrapper {
10
13
  width: 100%;
11
14
  height: 100%;
12
15
  top: 0;
13
16
  left: 0;
14
- background: color(dark a(75%));
17
+ background: rgba(29, 29, 43, 0.5);
15
18
  position: absolute;
16
19
  z-index: 0;
17
20
  opacity: 0;
@@ -19,17 +22,22 @@
19
22
  }
20
23
 
21
24
  .notification {
22
- width: 100px;
23
- height: 100px;
25
+ width: 156px;
24
26
  background: light;
25
27
  position: absolute;
26
28
  top: 50%;
27
29
  left: 50%;
28
- margin: -50px 0 0 -50px;
29
- border-radius: 7px;
30
- padding: 12px 7px 7px;
30
+ margin: -78px 0 0 -78px;
31
+ border-radius: 12px;
32
+ padding: 16px;
31
33
  box-sizing: border-box;
32
34
  color: grey;
35
+ background: cm_grey_75;
36
+ align-items: center;
37
+ display: flex;
38
+ gap: 12px;
39
+ justify-content: center;
40
+ flex-direction: column;
33
41
  }
34
42
 
35
43
  .showOverlay .notification {
@@ -42,21 +50,29 @@
42
50
 
43
51
  .notification .icon {
44
52
  font-size: 30px;
45
- height: 30px;
46
- width: 100%;
53
+ height: 20px;
54
+ width: 15px;
55
+ }
56
+
57
+ .iconWrapper {
58
+ width: 32px;
59
+ height: 32px;
60
+ padding: 8px;
61
+ display: flex;
62
+ justify-content: center;
63
+ align-items: center;
64
+ border-radius: 12px;
47
65
  }
48
66
 
49
67
  .message {
50
- width: 100%;
51
- height: 50px;
52
- line-height: 50px;
68
+ line-height: 20px;
53
69
  }
54
70
 
55
71
  .message span {
56
72
  display: inline-block;
57
73
  vertical-align: middle;
58
74
  user-select: none;
59
- line-height: 16px;
75
+ line-height: 20px;
60
76
  font-size: 14px;
61
77
  font-family: 'Gilroy';
62
78
  text-align: center;
@@ -1 +1 @@
1
- {"version":3,"file":"notification.d.ts","sourceRoot":"","sources":["../../../src/molecule/card/notification.js"],"names":[],"mappings":";AAyBA,uDAmBC"}
1
+ {"version":3,"file":"notification.d.ts","sourceRoot":"","sources":["../../../src/molecule/card/notification.js"],"names":[],"mappings":";AA+BA,uDAqBC"}
@@ -8,14 +8,25 @@ var _react = _interopRequireDefault(require("react"));
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
  var _classnames = _interopRequireDefault(require("classnames"));
10
10
  var _novaIcons = require("@coorpacademy/nova-icons");
11
+ var _colors = require("../../variables/colors");
11
12
  var _notification = _interopRequireDefault(require("./notification.css"));
12
13
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
14
  const NOTIFICATION_ICON = {
14
15
  addFavorite: _novaIcons.NovaCompositionCoorpacademyCheck,
15
- removeFavorite: _novaIcons.NovaCompositionNavigationMore,
16
+ removeFavorite: _novaIcons.NovaSolidStatusClose,
16
17
  lock: _novaIcons.NovaSolidLoginLocked,
17
18
  unlock: _novaIcons.NovaSolidLocksLockUnlock1
18
19
  };
20
+ const NOTIFICATIONS_COLORS = {
21
+ addFavorite: {
22
+ color: _colors.COLORS.cm_blue_700,
23
+ backgroundColor: _colors.COLORS.primary_100
24
+ },
25
+ removeFavorite: {
26
+ color: _colors.COLORS.neutral_500,
27
+ backgroundColor: _colors.COLORS.cm_grey_100
28
+ }
29
+ };
19
30
  const handleOverlayClick = e => {
20
31
  e.stopPropagation();
21
32
  e.preventDefault();
@@ -27,6 +38,10 @@ const Notification = props => {
27
38
  icon
28
39
  } = props;
29
40
  const IconType = (0, _get2.default)(icon, NOTIFICATION_ICON);
41
+ const {
42
+ color,
43
+ backgroundColor
44
+ } = (0, _get2.default)(icon, NOTIFICATIONS_COLORS);
30
45
  return /*#__PURE__*/_react.default.createElement("div", {
31
46
  "data-name": "notification",
32
47
  "data-type": icon,
@@ -34,13 +49,18 @@ const Notification = props => {
34
49
  className: (0, _classnames.default)(_notification.default.showOverlay, _notification.default.notificationWrapper)
35
50
  }, /*#__PURE__*/_react.default.createElement("div", {
36
51
  className: _notification.default.notification
52
+ }, /*#__PURE__*/_react.default.createElement("div", {
53
+ className: _notification.default.iconWrapper,
54
+ style: {
55
+ backgroundColor
56
+ }
37
57
  }, /*#__PURE__*/_react.default.createElement(IconType, {
38
58
  className: _notification.default.icon,
39
59
  style: {
40
- color: null
60
+ color
41
61
  },
42
62
  stroke: null
43
- }), /*#__PURE__*/_react.default.createElement("div", {
63
+ })), /*#__PURE__*/_react.default.createElement("div", {
44
64
  className: _notification.default.message
45
65
  }, /*#__PURE__*/_react.default.createElement("span", {
46
66
  role: "status"
@@ -1 +1 @@
1
- {"version":3,"file":"notification.js","names":["_react","_interopRequireDefault","require","_propTypes","_classnames","_novaIcons","_notification","e","__esModule","default","NOTIFICATION_ICON","addFavorite","CheckIcon","removeFavorite","MoreIcon","lock","LockIcon","unlock","UnlockIcon","handleOverlayClick","stopPropagation","preventDefault","Notification","props","message","icon","IconType","_get2","createElement","onClick","className","classnames","style","showOverlay","notificationWrapper","notification","color","stroke","role","propTypes","process","env","NODE_ENV","PropTypes","string","isRequired","oneOf","_keys2","_default","exports"],"sources":["../../../src/molecule/card/notification.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {get, keys} from 'lodash/fp';\nimport {\n NovaCompositionNavigationMore as MoreIcon,\n NovaSolidLoginLocked as LockIcon,\n NovaSolidLocksLockUnlock1 as UnlockIcon,\n NovaCompositionCoorpacademyCheck as CheckIcon\n} from '@coorpacademy/nova-icons';\nimport style from './notification.css';\n\nconst NOTIFICATION_ICON = {\n addFavorite: CheckIcon,\n removeFavorite: MoreIcon,\n lock: LockIcon,\n unlock: UnlockIcon\n};\n\nconst handleOverlayClick = e => {\n e.stopPropagation();\n e.preventDefault();\n return false;\n};\n\nconst Notification = props => {\n const {message, icon} = props;\n\n const IconType = get(icon, NOTIFICATION_ICON);\n return (\n <div\n data-name=\"notification\"\n data-type={icon}\n onClick={handleOverlayClick}\n className={classnames(style.showOverlay, style.notificationWrapper)}\n >\n <div className={style.notification}>\n <IconType className={style.icon} style={{color: null}} stroke={null} />\n <div className={style.message}>\n <span role=\"status\">{message}</span>\n </div>\n </div>\n </div>\n );\n};\nNotification.propTypes = {\n message: PropTypes.string.isRequired,\n icon: PropTypes.oneOf(keys(NOTIFICATION_ICON)).isRequired\n};\n\nexport default Notification;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,WAAA,GAAAH,sBAAA,CAAAC,OAAA;AAEA,IAAAG,UAAA,GAAAH,OAAA;AAMA,IAAAI,aAAA,GAAAL,sBAAA,CAAAC,OAAA;AAAuC,SAAAD,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEvC,MAAMG,iBAAiB,GAAG;EACxBC,WAAW,EAAEC,2CAAS;EACtBC,cAAc,EAAEC,wCAAQ;EACxBC,IAAI,EAAEC,+BAAQ;EACdC,MAAM,EAAEC;AACV,CAAC;AAED,MAAMC,kBAAkB,GAAGZ,CAAC,IAAI;EAC9BA,CAAC,CAACa,eAAe,CAAC,CAAC;EACnBb,CAAC,CAACc,cAAc,CAAC,CAAC;EAClB,OAAO,KAAK;AACd,CAAC;AAED,MAAMC,YAAY,GAAGC,KAAK,IAAI;EAC5B,MAAM;IAACC,OAAO;IAAEC;EAAI,CAAC,GAAGF,KAAK;EAE7B,MAAMG,QAAQ,GAAG,IAAAC,KAAA,CAAAlB,OAAA,EAAIgB,IAAI,EAAEf,iBAAiB,CAAC;EAC7C,oBACEV,MAAA,CAAAS,OAAA,CAAAmB,aAAA;IACE,aAAU,cAAc;IACxB,aAAWH,IAAK;IAChBI,OAAO,EAAEV,kBAAmB;IAC5BW,SAAS,EAAE,IAAAC,mBAAU,EAACC,qBAAK,CAACC,WAAW,EAAED,qBAAK,CAACE,mBAAmB;EAAE,gBAEpElC,MAAA,CAAAS,OAAA,CAAAmB,aAAA;IAAKE,SAAS,EAAEE,qBAAK,CAACG;EAAa,gBACjCnC,MAAA,CAAAS,OAAA,CAAAmB,aAAA,CAACF,QAAQ;IAACI,SAAS,EAAEE,qBAAK,CAACP,IAAK;IAACO,KAAK,EAAE;MAACI,KAAK,EAAE;IAAI,CAAE;IAACC,MAAM,EAAE;EAAK,CAAE,CAAC,eACvErC,MAAA,CAAAS,OAAA,CAAAmB,aAAA;IAAKE,SAAS,EAAEE,qBAAK,CAACR;EAAQ,gBAC5BxB,MAAA,CAAAS,OAAA,CAAAmB,aAAA;IAAMU,IAAI,EAAC;EAAQ,GAAEd,OAAc,CAChC,CACF,CACF,CAAC;AAEV,CAAC;AACDF,YAAY,CAACiB,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAG;EACvBlB,OAAO,EAAEmB,kBAAS,CAACC,MAAM,CAACC,UAAU;EACpCpB,IAAI,EAAEkB,kBAAS,CAACG,KAAK,CAAC,IAAAC,MAAA,CAAAtC,OAAA,EAAKC,iBAAiB,CAAC,CAAC,CAACmC;AACjD,CAAC;AAAC,IAAAG,QAAA,GAAAC,OAAA,CAAAxC,OAAA,GAEaa,YAAY","ignoreList":[]}
1
+ {"version":3,"file":"notification.js","names":["_react","_interopRequireDefault","require","_propTypes","_classnames","_novaIcons","_colors","_notification","e","__esModule","default","NOTIFICATION_ICON","addFavorite","CheckIcon","removeFavorite","CloseIcon","lock","LockIcon","unlock","UnlockIcon","NOTIFICATIONS_COLORS","color","COLORS","cm_blue_700","backgroundColor","primary_100","neutral_500","cm_grey_100","handleOverlayClick","stopPropagation","preventDefault","Notification","props","message","icon","IconType","_get2","createElement","onClick","className","classnames","style","showOverlay","notificationWrapper","notification","iconWrapper","stroke","role","propTypes","process","env","NODE_ENV","PropTypes","string","isRequired","oneOf","_keys2","_default","exports"],"sources":["../../../src/molecule/card/notification.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {get, keys} from 'lodash/fp';\nimport {\n NovaSolidLoginLocked as LockIcon,\n NovaSolidLocksLockUnlock1 as UnlockIcon,\n NovaCompositionCoorpacademyCheck as CheckIcon,\n NovaSolidStatusClose as CloseIcon\n} from '@coorpacademy/nova-icons';\nimport {COLORS} from '../../variables/colors';\nimport style from './notification.css';\n\nconst NOTIFICATION_ICON = {\n addFavorite: CheckIcon,\n removeFavorite: CloseIcon,\n lock: LockIcon,\n unlock: UnlockIcon\n};\n\nconst NOTIFICATIONS_COLORS = {\n addFavorite: {color: COLORS.cm_blue_700, backgroundColor: COLORS.primary_100},\n removeFavorite: {color: COLORS.neutral_500, backgroundColor: COLORS.cm_grey_100}\n};\n\nconst handleOverlayClick = e => {\n e.stopPropagation();\n e.preventDefault();\n return false;\n};\n\nconst Notification = props => {\n const {message, icon} = props;\n const IconType = get(icon, NOTIFICATION_ICON);\n const {color, backgroundColor} = get(icon, NOTIFICATIONS_COLORS);\n return (\n <div\n data-name=\"notification\"\n data-type={icon}\n onClick={handleOverlayClick}\n className={classnames(style.showOverlay, style.notificationWrapper)}\n >\n <div className={style.notification}>\n <div className={style.iconWrapper} style={{backgroundColor}}>\n <IconType className={style.icon} style={{color}} stroke={null} />\n </div>\n <div className={style.message}>\n <span role=\"status\">{message}</span>\n </div>\n </div>\n </div>\n );\n};\nNotification.propTypes = {\n message: PropTypes.string.isRequired,\n icon: PropTypes.oneOf(keys(NOTIFICATION_ICON)).isRequired\n};\n\nexport default Notification;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,WAAA,GAAAH,sBAAA,CAAAC,OAAA;AAEA,IAAAG,UAAA,GAAAH,OAAA;AAMA,IAA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,CAAAU,OAAA,CAAA2B,aAAA;IAAKE,SAAS,EAAEE,qBAAK,CAACG;EAAa,gBACjC5C,MAAA,CAAAU,OAAA,CAAA2B,aAAA;IAAKE,SAAS,EAAEE,qBAAK,CAACI,WAAY;IAACJ,KAAK,EAAE;MAACjB;IAAe;EAAE,gBAC1DxB,MAAA,CAAAU,OAAA,CAAA2B,aAAA,CAACF,QAAQ;IAACI,SAAS,EAAEE,qBAAK,CAACP,IAAK;IAACO,KAAK,EAAE;MAACpB;IAAK,CAAE;IAACyB,MAAM,EAAE;EAAK,CAAE,CAC7D,CAAC,eACN9C,MAAA,CAAAU,OAAA,CAAA2B,aAAA;IAAKE,SAAS,EAAEE,qBAAK,CAACR;EAAQ,gBAC5BjC,MAAA,CAAAU,OAAA,CAAA2B,aAAA;IAAMU,IAAI,EAAC;EAAQ,GAAEd,OAAc,CAChC,CACF,CACF,CAAC;AAEV,CAAC;AACDF,YAAY,CAACiB,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAG;EACvBlB,OAAO,EAAEmB,kBAAS,CAACC,MAAM,CAACC,UAAU;EACpCpB,IAAI,EAAEkB,kBAAS,CAACG,KAAK,CAAC,IAAAC,MAAA,CAAA9C,OAAA,EAAKC,iBAAiB,CAAC,CAAC,CAAC2C;AACjD,CAAC;AAAC,IAAAG,QAAA,GAAAC,OAAA,CAAAhD,OAAA,GAEaqB,YAAY","ignoreList":[]}
@@ -31,12 +31,14 @@
31
31
  animation: fadeIn 1s ease-out forwards;
32
32
  cursor: pointer;
33
33
  box-shadow: 0 0 13px 0 rgba(0, 0, 0, 0.11);
34
+ border: 2px solid white;
34
35
  }
35
36
 
36
37
  .defaultStyle[disabled] .favorite {
37
38
  z-index: 0;
38
39
  }
39
40
 
41
+
40
42
  .grid.empty {
41
43
  padding-bottom: 25px;
42
44
  opacity: 0.6;
@@ -44,17 +46,11 @@
44
46
 
45
47
  .course {
46
48
  composes: defaultStyle;
47
- border-radius: 8px;
49
+ border-radius: 12px;
48
50
  width: 256px;
49
51
  height: 297px;
50
52
  }
51
53
 
52
- .chapter {
53
- composes: defaultStyle;
54
- border-radius: 8px;
55
- width: 203px;
56
- height: 297px;
57
- }
58
54
 
59
55
  .coorpmanager.course {
60
56
  border-radius: 5px;
@@ -62,12 +58,6 @@
62
58
  height: 201px;
63
59
  }
64
60
 
65
- .coorpmanager.chapter {
66
- border-radius: 5px;
67
- width: 138px;
68
- height: 201px;
69
- }
70
-
71
61
  .course .imageWrapper {
72
62
  width: 100%;
73
63
  height: 100%;
@@ -76,18 +66,6 @@
76
66
  left: 0;
77
67
  }
78
68
 
79
- .chapter .chapterImageWrapper {
80
- max-height: 77px;
81
- width: 100%;
82
- position: absolute;
83
- top: 0;
84
- left: 0;
85
- }
86
-
87
- .coorpmanager.chapter .chapterImageWrapper {
88
- max-height: 52px;
89
- }
90
-
91
69
  .defaultStyle .image {
92
70
  overflow: hidden;
93
71
  background-position: 50%;
@@ -157,8 +135,7 @@
157
135
  }
158
136
 
159
137
  .course .defaultStyle:hover,
160
- .chapter .defaultStyle:hover {
161
- background: light;
138
+ .defaultStyle:hover {
162
139
  cursor: pointer;
163
140
  transition: background 0.25s ease-in-out;
164
141
  }
@@ -361,18 +338,6 @@
361
338
  transition: transform 0.25s ease-in-out;
362
339
  }
363
340
 
364
- .externalIcon {
365
- color: white;
366
- width: 45px;
367
- height: 45px;
368
- }
369
-
370
- .coorpmanager .externalIcon {
371
- color: white;
372
- width: 23px;
373
- height: 23px;
374
- }
375
-
376
341
  .externalIconCircleWrapper::after {
377
342
  animation: pulse 3s linear 0s infinite;
378
343
  animation-play-state: paused;
@@ -431,19 +396,6 @@
431
396
  margin-top: 20px;
432
397
  }
433
398
 
434
- .coorpmanager .externalIconWithImage {
435
- color: white;
436
- width: 25px;
437
- height: 25px;
438
- padding: 0 0 0 1px;
439
- }
440
-
441
- .externalIconWithImage {
442
- color: white;
443
- width: 28px;
444
- height: 28px;
445
- }
446
-
447
399
  .externalIconCircleWithImageWrapper::after,
448
400
  .externalIconCircleWithImageWrapper::before {
449
401
  content: '';
@@ -452,7 +404,6 @@
452
404
  top: 0;
453
405
  left: 0;
454
406
  position: absolute;
455
-
456
407
  border-radius: 50%;
457
408
  transform: scale(1);
458
409
  opacity: 0;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/card-content/index.js"],"names":[],"mappings":";;;;;;;;;;AAsHA;;;;;;;;;;;;;;gBA8EC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/card-content/index.js"],"names":[],"mappings":";;;;;;;;;;AAiIA;;;;;;;;;;;;;;gBA0EC"}