@coorpacademy/components 10.1.1 → 10.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/atom/bullet-point-menu-button/test/fixtures.js +27 -0
- package/es/atom/bullet-point-menu-button/test/fixtures.js.map +1 -0
- package/es/atom/button/index.js +3 -1
- package/es/atom/button/index.js.map +1 -1
- package/es/atom/content-badge/index.js +4 -4
- package/es/atom/content-badge/index.js.map +1 -1
- package/es/atom/input-checkbox/test/fixtures.js +0 -2
- package/es/atom/input-checkbox/test/fixtures.js.map +1 -1
- package/es/atom/input-text/index.js +1 -1
- package/es/atom/input-text/index.js.map +1 -1
- package/es/atom/input-text/style.css +16 -11
- package/es/atom/input-textarea/index.js +36 -11
- package/es/atom/input-textarea/index.js.map +1 -1
- package/es/atom/input-textarea/style.css +265 -0
- package/es/atom/input-textarea/test/fixtures/cm-default.js +17 -0
- package/es/atom/input-textarea/test/fixtures/cm-default.js.map +1 -0
- package/es/atom/input-textarea/test/fixtures/cm-empty.js +17 -0
- package/es/atom/input-textarea/test/fixtures/cm-empty.js.map +1 -0
- package/es/atom/title/test/fixtures.js +2 -6
- package/es/atom/title/test/fixtures.js.map +1 -1
- package/es/molecule/banner/index.js +46 -0
- package/es/molecule/banner/index.js.map +1 -0
- package/es/molecule/banner/style.css +63 -0
- package/es/molecule/banner/test/fixtures/default.js +11 -0
- package/es/molecule/banner/test/fixtures/default.js.map +1 -0
- package/es/molecule/banner/test/fixtures/error-banner.js +7 -0
- package/es/molecule/banner/test/fixtures/error-banner.js.map +1 -0
- package/es/molecule/brand-form-group/test/fixtures/cm-default.js +51 -0
- package/es/molecule/brand-form-group/test/fixtures/cm-default.js.map +1 -0
- package/es/molecule/brand-form-group/test/fixtures/default.js +12 -3
- package/es/molecule/brand-form-group/test/fixtures/default.js.map +1 -1
- package/es/molecule/card/index.js +16 -5
- package/es/molecule/card/index.js.map +1 -1
- package/es/molecule/card/selectable.css +71 -0
- package/es/molecule/card/selectable.js +32 -0
- package/es/molecule/card/selectable.js.map +1 -0
- package/es/molecule/card/test/fixtures/default.js +1 -0
- package/es/molecule/card/test/fixtures/default.js.map +1 -1
- package/es/molecule/card/test/fixtures/selectable-false.js +16 -0
- package/es/molecule/card/test/fixtures/selectable-false.js.map +1 -0
- package/es/molecule/card/test/fixtures/selectable-true.js +17 -0
- package/es/molecule/card/test/fixtures/selectable-true.js.map +1 -0
- package/es/molecule/card-content/index.js +13 -3
- package/es/molecule/card-content/index.js.map +1 -1
- package/es/molecule/card-content/style.css +13 -3
- package/es/molecule/cm-popin/index.js +76 -0
- package/es/molecule/cm-popin/index.js.map +1 -0
- package/es/molecule/cm-popin/style.css +157 -0
- package/es/molecule/cm-popin/test/fixtures/dangerous.js +16 -0
- package/es/molecule/cm-popin/test/fixtures/dangerous.js.map +1 -0
- package/es/molecule/cm-popin/test/fixtures/default.js +16 -0
- package/es/molecule/cm-popin/test/fixtures/default.js.map +1 -0
- package/es/molecule/cm-popin/test/fixtures/warning-with-close.js +17 -0
- package/es/molecule/cm-popin/test/fixtures/warning-with-close.js.map +1 -0
- package/es/molecule/cockpit-popin/test/fixtures.js +17 -0
- package/es/molecule/cockpit-popin/test/fixtures.js.map +1 -0
- package/es/molecule/wizard-summary/index.js +44 -17
- package/es/molecule/wizard-summary/index.js.map +1 -1
- package/es/molecule/wizard-summary/style.css +104 -7
- package/es/molecule/wizard-summary/test/fixtures/default.js +9 -3
- package/es/molecule/wizard-summary/test/fixtures/default.js.map +1 -1
- package/es/molecule/wizard-summary/test/fixtures/tablet-closed.js +117 -0
- package/es/molecule/wizard-summary/test/fixtures/tablet-closed.js.map +1 -0
- package/es/organism/accordion/coorp-manager/part/test/fixtures.js +0 -4
- package/es/organism/accordion/coorp-manager/part/test/fixtures.js.map +1 -1
- package/es/organism/brand-dashboard/test/fixtures.js +0 -2
- package/es/organism/brand-dashboard/test/fixtures.js.map +1 -1
- package/es/template/back-office/brand-update/test/fixtures.js +2 -2
- package/es/template/back-office/brand-update/test/fixtures.js.map +1 -1
- package/es/variables/colors.css +9 -3
- package/lib/atom/bullet-point-menu-button/test/fixtures.js +43 -0
- package/lib/atom/bullet-point-menu-button/test/fixtures.js.map +1 -0
- package/lib/atom/button/index.js +3 -1
- package/lib/atom/button/index.js.map +1 -1
- package/lib/atom/content-badge/index.js +4 -4
- package/lib/atom/content-badge/index.js.map +1 -1
- package/lib/atom/input-checkbox/test/fixtures.js +0 -3
- package/lib/atom/input-checkbox/test/fixtures.js.map +1 -1
- package/lib/atom/input-text/index.js +1 -1
- package/lib/atom/input-text/index.js.map +1 -1
- package/lib/atom/input-text/style.css +16 -11
- package/lib/atom/input-textarea/index.js +38 -11
- package/lib/atom/input-textarea/index.js.map +1 -1
- package/lib/atom/input-textarea/style.css +265 -0
- package/lib/atom/input-textarea/test/fixtures/cm-default.js +22 -0
- package/lib/atom/input-textarea/test/fixtures/cm-default.js.map +1 -0
- package/lib/atom/input-textarea/test/fixtures/cm-empty.js +22 -0
- package/lib/atom/input-textarea/test/fixtures/cm-empty.js.map +1 -0
- package/lib/atom/title/test/fixtures.js +2 -8
- package/lib/atom/title/test/fixtures.js.map +1 -1
- package/lib/molecule/banner/index.js +59 -0
- package/lib/molecule/banner/index.js.map +1 -0
- package/lib/molecule/banner/style.css +63 -0
- package/lib/molecule/banner/test/fixtures/default.js +16 -0
- package/lib/molecule/banner/test/fixtures/default.js.map +1 -0
- package/lib/molecule/banner/test/fixtures/error-banner.js +12 -0
- package/lib/molecule/banner/test/fixtures/error-banner.js.map +1 -0
- package/lib/molecule/brand-form-group/test/fixtures/cm-default.js +56 -0
- package/lib/molecule/brand-form-group/test/fixtures/cm-default.js.map +1 -0
- package/lib/molecule/brand-form-group/test/fixtures/default.js +12 -3
- package/lib/molecule/brand-form-group/test/fixtures/default.js.map +1 -1
- package/lib/molecule/card/index.js +17 -5
- package/lib/molecule/card/index.js.map +1 -1
- package/lib/molecule/card/selectable.css +71 -0
- package/lib/molecule/card/selectable.js +45 -0
- package/lib/molecule/card/selectable.js.map +1 -0
- package/lib/molecule/card/test/fixtures/default.js +1 -0
- package/lib/molecule/card/test/fixtures/default.js.map +1 -1
- package/lib/molecule/card/test/fixtures/selectable-false.js +26 -0
- package/lib/molecule/card/test/fixtures/selectable-false.js.map +1 -0
- package/lib/molecule/card/test/fixtures/selectable-true.js +27 -0
- package/lib/molecule/card/test/fixtures/selectable-true.js.map +1 -0
- package/lib/molecule/card-content/index.js +14 -3
- package/lib/molecule/card-content/index.js.map +1 -1
- package/lib/molecule/card-content/style.css +13 -3
- package/lib/molecule/cm-popin/index.js +89 -0
- package/lib/molecule/cm-popin/index.js.map +1 -0
- package/lib/molecule/cm-popin/style.css +157 -0
- package/lib/molecule/cm-popin/test/fixtures/dangerous.js +21 -0
- package/lib/molecule/cm-popin/test/fixtures/dangerous.js.map +1 -0
- package/lib/molecule/cm-popin/test/fixtures/default.js +21 -0
- package/lib/molecule/cm-popin/test/fixtures/default.js.map +1 -0
- package/lib/molecule/cm-popin/test/fixtures/warning-with-close.js +22 -0
- package/lib/molecule/cm-popin/test/fixtures/warning-with-close.js.map +1 -0
- package/lib/molecule/cockpit-popin/test/fixtures.js +28 -0
- package/lib/molecule/cockpit-popin/test/fixtures.js.map +1 -0
- package/lib/molecule/wizard-summary/index.js +41 -13
- package/lib/molecule/wizard-summary/index.js.map +1 -1
- package/lib/molecule/wizard-summary/style.css +104 -7
- package/lib/molecule/wizard-summary/test/fixtures/default.js +9 -3
- package/lib/molecule/wizard-summary/test/fixtures/default.js.map +1 -1
- package/lib/molecule/wizard-summary/test/fixtures/tablet-closed.js +122 -0
- package/lib/molecule/wizard-summary/test/fixtures/tablet-closed.js.map +1 -0
- package/lib/organism/accordion/coorp-manager/part/test/fixtures.js +0 -6
- package/lib/organism/accordion/coorp-manager/part/test/fixtures.js.map +1 -1
- package/lib/organism/brand-dashboard/test/fixtures.js +0 -3
- package/lib/organism/brand-dashboard/test/fixtures.js.map +1 -1
- package/lib/template/back-office/brand-update/test/fixtures.js +3 -3
- package/lib/template/back-office/brand-update/test/fixtures.js.map +1 -1
- package/lib/variables/colors.css +9 -3
- package/package.json +3 -3
- package/es/atom/chips/test/fixtures.js +0 -15
- package/es/atom/chips/test/fixtures.js.map +0 -1
- package/es/atom/content-badge/test/fixtures.js +0 -27
- package/es/atom/content-badge/test/fixtures.js.map +0 -1
- package/es/atom/wizard-steps/test/fixtures.js +0 -17
- package/es/atom/wizard-steps/test/fixtures.js.map +0 -1
- package/es/molecule/coorp-manager-roles/test/fixtures.js +0 -13
- package/es/molecule/coorp-manager-roles/test/fixtures.js.map +0 -1
- package/es/molecule/quick-access-card/test/fixtures.js +0 -21
- package/es/molecule/quick-access-card/test/fixtures.js.map +0 -1
- package/es/molecule/quick-access-cards-group/test/fixtures.js +0 -21
- package/es/molecule/quick-access-cards-group/test/fixtures.js.map +0 -1
- package/es/molecule/vertical-tabs/test/fixtures.js +0 -15
- package/es/molecule/vertical-tabs/test/fixtures.js.map +0 -1
- package/es/molecule/wizard-summary/test/fixtures.js +0 -19
- package/es/molecule/wizard-summary/test/fixtures.js.map +0 -1
- package/lib/atom/chips/test/fixtures.js +0 -25
- package/lib/atom/chips/test/fixtures.js.map +0 -1
- package/lib/atom/content-badge/test/fixtures.js +0 -43
- package/lib/atom/content-badge/test/fixtures.js.map +0 -1
- package/lib/atom/wizard-steps/test/fixtures.js +0 -28
- package/lib/atom/wizard-steps/test/fixtures.js.map +0 -1
- package/lib/molecule/coorp-manager-roles/test/fixtures.js +0 -22
- package/lib/molecule/coorp-manager-roles/test/fixtures.js.map +0 -1
- package/lib/molecule/quick-access-card/test/fixtures.js +0 -34
- package/lib/molecule/quick-access-card/test/fixtures.js.map +0 -1
- package/lib/molecule/quick-access-cards-group/test/fixtures.js +0 -34
- package/lib/molecule/quick-access-cards-group/test/fixtures.js.map +0 -1
- package/lib/molecule/vertical-tabs/test/fixtures.js +0 -25
- package/lib/molecule/vertical-tabs/test/fixtures.js.map +0 -1
- package/lib/molecule/wizard-summary/test/fixtures.js +0 -31
- package/lib/molecule/wizard-summary/test/fixtures.js.map +0 -1
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
@value breakpoints: "../../variables/breakpoints.css";
|
|
2
|
+
@value mobile from breakpoints;
|
|
3
|
+
@value colors: "../../variables/colors.css";
|
|
4
|
+
@value white from colors;
|
|
5
|
+
@value medium from colors;
|
|
6
|
+
@value cm_negative_50 from colors;
|
|
7
|
+
@value cm_negative_200 from colors;
|
|
8
|
+
@value cm_warning_50 from colors;
|
|
9
|
+
@value cm_warning_200 from colors;
|
|
10
|
+
|
|
11
|
+
.banner {
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: row;
|
|
14
|
+
justify-content: flex-start;
|
|
15
|
+
align-items: center;
|
|
16
|
+
gap: 8px;
|
|
17
|
+
padding: 16px 24px;
|
|
18
|
+
border-radius: 5px;
|
|
19
|
+
background-color: cm_warning_50;
|
|
20
|
+
color: cm_warning_200;
|
|
21
|
+
border-radius: 5px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.errorBanner {
|
|
25
|
+
background-color: cm_negative_50;
|
|
26
|
+
color: cm_negative_200;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.button {
|
|
30
|
+
flex-grow: 0;
|
|
31
|
+
font-family: Gilroy;
|
|
32
|
+
font-size: 12px;
|
|
33
|
+
font-weight: bold;
|
|
34
|
+
line-height: 1.33;
|
|
35
|
+
background-color: transparent;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.buttonsBar {
|
|
39
|
+
width: 1px;
|
|
40
|
+
align-self: stretch;
|
|
41
|
+
flex-grow: 0;
|
|
42
|
+
opacity: 0.1;
|
|
43
|
+
background-color: cm_warning_200;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.icon {
|
|
47
|
+
height: 22px;
|
|
48
|
+
margin-right: 16px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.message {
|
|
52
|
+
font-family: 'Gilroy';
|
|
53
|
+
font-size: 14px;
|
|
54
|
+
font-weight: 600;
|
|
55
|
+
font-stretch: normal;
|
|
56
|
+
font-style: normal;
|
|
57
|
+
line-height: normal;
|
|
58
|
+
letter-spacing: normal;
|
|
59
|
+
flex: 0 1 100%;
|
|
60
|
+
display: flex;
|
|
61
|
+
align-content: center;
|
|
62
|
+
align-items: center;
|
|
63
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
var _default = {
|
|
6
|
+
props: {
|
|
7
|
+
type: 'information',
|
|
8
|
+
message: 'Changes saved but not published. Do you want to update this custom playlist now? ',
|
|
9
|
+
firstCTALabel: 'Undo',
|
|
10
|
+
firstCTA: () => console.log('first cta'),
|
|
11
|
+
secondCTALabel: 'Update',
|
|
12
|
+
secondCTA: () => console.log('second cta')
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
exports.default = _default;
|
|
16
|
+
//# sourceMappingURL=default.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/banner/test/fixtures/default.js"],"names":["props","type","message","firstCTALabel","firstCTA","console","log","secondCTALabel","secondCTA"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,IAAI,EAAE,aADD;AAELC,IAAAA,OAAO,EAAE,mFAFJ;AAGLC,IAAAA,aAAa,EAAE,MAHV;AAILC,IAAAA,QAAQ,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,WAAZ,CAJX;AAKLC,IAAAA,cAAc,EAAE,QALX;AAMLC,IAAAA,SAAS,EAAE,MAAMH,OAAO,CAACC,GAAR,CAAY,YAAZ;AANZ;AADM,C","sourcesContent":["export default {\n props: {\n type: 'information',\n message: 'Changes saved but not published. Do you want to update this custom playlist now? ',\n firstCTALabel: 'Undo',\n firstCTA: () => console.log('first cta'),\n secondCTALabel: 'Update',\n secondCTA: () => console.log('second cta')\n }\n};\n"],"file":"default.js"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
var _default = {
|
|
6
|
+
props: {
|
|
7
|
+
type: 'error',
|
|
8
|
+
message: 'Unable to publish this custom playlist. You must complete all the creation steps before publishing it. '
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
exports.default = _default;
|
|
12
|
+
//# sourceMappingURL=error-banner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/banner/test/fixtures/error-banner.js"],"names":["props","type","message"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,IAAI,EAAE,OADD;AAELC,IAAAA,OAAO,EACL;AAHG;AADM,C","sourcesContent":["export default {\n props: {\n type: 'error',\n message:\n 'Unable to publish this custom playlist. You must complete all the creation steps before publishing it. '\n }\n};\n"],"file":"error-banner.js"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
var _default = {
|
|
6
|
+
props: {
|
|
7
|
+
title: 'Platform Name',
|
|
8
|
+
fields: [{
|
|
9
|
+
title: 'Domain name',
|
|
10
|
+
value: 'samsung.coorpacademy.com',
|
|
11
|
+
hint: 'Hint <span style="color:red;">10<span>/40',
|
|
12
|
+
placeholder: 'This is an input',
|
|
13
|
+
theme: 'coorpmanager',
|
|
14
|
+
description: 'This is the tooltip text',
|
|
15
|
+
type: 'text',
|
|
16
|
+
disabled: true
|
|
17
|
+
}, {
|
|
18
|
+
title: 'Platform name',
|
|
19
|
+
value: 'Samsung',
|
|
20
|
+
hint: 'Hint <span style="color:red;">10<span>/40',
|
|
21
|
+
placeholder: 'This is an input',
|
|
22
|
+
theme: 'coorpmanager',
|
|
23
|
+
description: 'This is the tooltip text',
|
|
24
|
+
type: 'text',
|
|
25
|
+
disabled: true
|
|
26
|
+
}, {
|
|
27
|
+
title: 'Description',
|
|
28
|
+
value: '',
|
|
29
|
+
theme: 'coorpmanager',
|
|
30
|
+
type: 'html'
|
|
31
|
+
}, {
|
|
32
|
+
title: 'TextArea',
|
|
33
|
+
value: '',
|
|
34
|
+
hint: 'Hint <span style="color:red;">10<span>/40',
|
|
35
|
+
placeholder: 'This is an input',
|
|
36
|
+
theme: 'coorpmanager',
|
|
37
|
+
description: 'This is the tooltip text',
|
|
38
|
+
type: 'textarea'
|
|
39
|
+
}, {
|
|
40
|
+
title: 'Default field',
|
|
41
|
+
value: '',
|
|
42
|
+
hint: 'Hint <span style="color:red;">10<span>/40',
|
|
43
|
+
placeholder: 'This is an input',
|
|
44
|
+
theme: 'coorpmanager',
|
|
45
|
+
description: 'This is the tooltip text',
|
|
46
|
+
type: 'unknow'
|
|
47
|
+
}, {
|
|
48
|
+
title: 'Select Multiple',
|
|
49
|
+
value: '',
|
|
50
|
+
theme: 'coorpmanager',
|
|
51
|
+
type: 'selectMultiple'
|
|
52
|
+
}]
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
exports.default = _default;
|
|
56
|
+
//# sourceMappingURL=cm-default.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/brand-form-group/test/fixtures/cm-default.js"],"names":["props","title","fields","value","hint","placeholder","theme","description","type","disabled"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,eADF;AAELC,IAAAA,MAAM,EAAE,CACN;AACED,MAAAA,KAAK,EAAE,aADT;AAEEE,MAAAA,KAAK,EAAE,0BAFT;AAGEC,MAAAA,IAAI,EAAE,2CAHR;AAIEC,MAAAA,WAAW,EAAE,kBAJf;AAKEC,MAAAA,KAAK,EAAE,cALT;AAMEC,MAAAA,WAAW,EAAE,0BANf;AAOEC,MAAAA,IAAI,EAAE,MAPR;AAQEC,MAAAA,QAAQ,EAAE;AARZ,KADM,EAWN;AACER,MAAAA,KAAK,EAAE,eADT;AAEEE,MAAAA,KAAK,EAAE,SAFT;AAGEC,MAAAA,IAAI,EAAE,2CAHR;AAIEC,MAAAA,WAAW,EAAE,kBAJf;AAKEC,MAAAA,KAAK,EAAE,cALT;AAMEC,MAAAA,WAAW,EAAE,0BANf;AAOEC,MAAAA,IAAI,EAAE,MAPR;AAQEC,MAAAA,QAAQ,EAAE;AARZ,KAXM,EAqBN;AACER,MAAAA,KAAK,EAAE,aADT;AAEEE,MAAAA,KAAK,EAAE,EAFT;AAGEG,MAAAA,KAAK,EAAE,cAHT;AAIEE,MAAAA,IAAI,EAAE;AAJR,KArBM,EA2BN;AACEP,MAAAA,KAAK,EAAE,UADT;AAEEE,MAAAA,KAAK,EAAE,EAFT;AAGEC,MAAAA,IAAI,EAAE,2CAHR;AAIEC,MAAAA,WAAW,EAAE,kBAJf;AAKEC,MAAAA,KAAK,EAAE,cALT;AAMEC,MAAAA,WAAW,EAAE,0BANf;AAOEC,MAAAA,IAAI,EAAE;AAPR,KA3BM,EAoCN;AACEP,MAAAA,KAAK,EAAE,eADT;AAEEE,MAAAA,KAAK,EAAE,EAFT;AAGEC,MAAAA,IAAI,EAAE,2CAHR;AAIEC,MAAAA,WAAW,EAAE,kBAJf;AAKEC,MAAAA,KAAK,EAAE,cALT;AAMEC,MAAAA,WAAW,EAAE,0BANf;AAOEC,MAAAA,IAAI,EAAE;AAPR,KApCM,EA6CN;AACEP,MAAAA,KAAK,EAAE,iBADT;AAEEE,MAAAA,KAAK,EAAE,EAFT;AAGEG,MAAAA,KAAK,EAAE,cAHT;AAIEE,MAAAA,IAAI,EAAE;AAJR,KA7CM;AAFH;AADM,C","sourcesContent":["export default {\n props: {\n title: 'Platform Name',\n fields: [\n {\n title: 'Domain name',\n value: 'samsung.coorpacademy.com',\n hint: 'Hint <span style=\"color:red;\">10<span>/40',\n placeholder: 'This is an input',\n theme: 'coorpmanager',\n description: 'This is the tooltip text',\n type: 'text',\n disabled: true\n },\n {\n title: 'Platform name',\n value: 'Samsung',\n hint: 'Hint <span style=\"color:red;\">10<span>/40',\n placeholder: 'This is an input',\n theme: 'coorpmanager',\n description: 'This is the tooltip text',\n type: 'text',\n disabled: true\n },\n {\n title: 'Description',\n value: '',\n theme: 'coorpmanager',\n type: 'html'\n },\n {\n title: 'TextArea',\n value: '',\n hint: 'Hint <span style=\"color:red;\">10<span>/40',\n placeholder: 'This is an input',\n theme: 'coorpmanager',\n description: 'This is the tooltip text',\n type: 'textarea'\n },\n {\n title: 'Default field',\n value: '',\n hint: 'Hint <span style=\"color:red;\">10<span>/40',\n placeholder: 'This is an input',\n theme: 'coorpmanager',\n description: 'This is the tooltip text',\n type: 'unknow'\n },\n {\n title: 'Select Multiple',\n value: '',\n theme: 'coorpmanager',\n type: 'selectMultiple'\n }\n ]\n }\n};\n"],"file":"cm-default.js"}
|
|
@@ -8,26 +8,35 @@ var _default = {
|
|
|
8
8
|
fields: [{
|
|
9
9
|
title: 'Domain name',
|
|
10
10
|
value: 'samsung.coorpacademy.com',
|
|
11
|
-
|
|
11
|
+
theme: 'coorpmanager',
|
|
12
|
+
type: 'text',
|
|
13
|
+
disabled: true
|
|
12
14
|
}, {
|
|
13
15
|
title: 'Platform name',
|
|
14
16
|
value: 'Samsung',
|
|
15
|
-
|
|
17
|
+
theme: 'coorpmanager',
|
|
18
|
+
type: 'text',
|
|
19
|
+
disabled: true
|
|
16
20
|
}, {
|
|
17
21
|
title: 'Description',
|
|
18
22
|
value: '',
|
|
23
|
+
theme: 'coorpmanager',
|
|
19
24
|
type: 'html'
|
|
20
25
|
}, {
|
|
21
26
|
title: 'TextArea',
|
|
22
27
|
value: '',
|
|
23
|
-
|
|
28
|
+
theme: 'coorpmanager',
|
|
29
|
+
type: 'textarea',
|
|
30
|
+
hint: ''
|
|
24
31
|
}, {
|
|
25
32
|
title: 'Default field',
|
|
26
33
|
value: '',
|
|
34
|
+
theme: 'coorpmanager',
|
|
27
35
|
type: 'unknow'
|
|
28
36
|
}, {
|
|
29
37
|
title: 'Select Multiple',
|
|
30
38
|
value: '',
|
|
39
|
+
theme: 'coorpmanager',
|
|
31
40
|
type: 'selectMultiple'
|
|
32
41
|
}]
|
|
33
42
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/molecule/brand-form-group/test/fixtures/default.js"],"names":["props","title","fields","value","type"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,eADF;AAELC,IAAAA,MAAM,EAAE,CACN;AACED,MAAAA,KAAK,EAAE,aADT;AAEEE,MAAAA,KAAK,EAAE,0BAFT;AAGEC,MAAAA,IAAI,EAAE;
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/brand-form-group/test/fixtures/default.js"],"names":["props","title","fields","value","theme","type","disabled","hint"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,eADF;AAELC,IAAAA,MAAM,EAAE,CACN;AACED,MAAAA,KAAK,EAAE,aADT;AAEEE,MAAAA,KAAK,EAAE,0BAFT;AAGEC,MAAAA,KAAK,EAAE,cAHT;AAIEC,MAAAA,IAAI,EAAE,MAJR;AAKEC,MAAAA,QAAQ,EAAE;AALZ,KADM,EAQN;AACEL,MAAAA,KAAK,EAAE,eADT;AAEEE,MAAAA,KAAK,EAAE,SAFT;AAGEC,MAAAA,KAAK,EAAE,cAHT;AAIEC,MAAAA,IAAI,EAAE,MAJR;AAKEC,MAAAA,QAAQ,EAAE;AALZ,KARM,EAeN;AACEL,MAAAA,KAAK,EAAE,aADT;AAEEE,MAAAA,KAAK,EAAE,EAFT;AAGEC,MAAAA,KAAK,EAAE,cAHT;AAIEC,MAAAA,IAAI,EAAE;AAJR,KAfM,EAqBN;AACEJ,MAAAA,KAAK,EAAE,UADT;AAEEE,MAAAA,KAAK,EAAE,EAFT;AAGEC,MAAAA,KAAK,EAAE,cAHT;AAIEC,MAAAA,IAAI,EAAE,UAJR;AAKEE,MAAAA,IAAI,EAAE;AALR,KArBM,EA4BN;AACEN,MAAAA,KAAK,EAAE,eADT;AAEEE,MAAAA,KAAK,EAAE,EAFT;AAGEC,MAAAA,KAAK,EAAE,cAHT;AAIEC,MAAAA,IAAI,EAAE;AAJR,KA5BM,EAkCN;AACEJ,MAAAA,KAAK,EAAE,iBADT;AAEEE,MAAAA,KAAK,EAAE,EAFT;AAGEC,MAAAA,KAAK,EAAE,cAHT;AAIEC,MAAAA,IAAI,EAAE;AAJR,KAlCM;AAFH;AADM,C","sourcesContent":["export default {\n props: {\n title: 'Platform Name',\n fields: [\n {\n title: 'Domain name',\n value: 'samsung.coorpacademy.com',\n theme: 'coorpmanager',\n type: 'text',\n disabled: true\n },\n {\n title: 'Platform name',\n value: 'Samsung',\n theme: 'coorpmanager',\n type: 'text',\n disabled: true\n },\n {\n title: 'Description',\n value: '',\n theme: 'coorpmanager',\n type: 'html'\n },\n {\n title: 'TextArea',\n value: '',\n theme: 'coorpmanager',\n type: 'textarea',\n hint: ''\n },\n {\n title: 'Default field',\n value: '',\n theme: 'coorpmanager',\n type: 'unknow'\n },\n {\n title: 'Select Multiple',\n value: '',\n theme: 'coorpmanager',\n type: 'selectMultiple'\n }\n ]\n }\n};\n"],"file":"default.js"}
|
|
@@ -29,6 +29,8 @@ var _customer = _interopRequireDefault(require("./customer"));
|
|
|
29
29
|
|
|
30
30
|
var _favorite = _interopRequireDefault(require("./favorite"));
|
|
31
31
|
|
|
32
|
+
var _selectable = _interopRequireDefault(require("./selectable"));
|
|
33
|
+
|
|
32
34
|
var _notification = _interopRequireDefault(require("./notification"));
|
|
33
35
|
|
|
34
36
|
var _style = _interopRequireDefault(require("./style.css"));
|
|
@@ -139,7 +141,10 @@ const Card = (0, _react.memo)(function Card(props, context) {
|
|
|
139
141
|
removeFavoriteToolTip,
|
|
140
142
|
onClick,
|
|
141
143
|
onFavoriteClick,
|
|
142
|
-
|
|
144
|
+
isSelected,
|
|
145
|
+
notification,
|
|
146
|
+
badgeCategory,
|
|
147
|
+
badgeLabel
|
|
143
148
|
} = props;
|
|
144
149
|
const empty = (0, _isEmpty2.default)((0, _pick2.default)(['title', 'type', 'author', 'image'], props));
|
|
145
150
|
const primaryColor = (0, _get2.default)('common.primary', skin);
|
|
@@ -179,14 +184,16 @@ const Card = (0, _react.memo)(function Card(props, context) {
|
|
|
179
184
|
type: type,
|
|
180
185
|
image: image,
|
|
181
186
|
empty: empty
|
|
182
|
-
}), !(0, _isUndefined2.default)(favorite) ? /*#__PURE__*/_react.default.createElement(_favorite.default, {
|
|
187
|
+
}), (0, _isUndefined2.default)(isSelected) && !(0, _isUndefined2.default)(favorite) ? /*#__PURE__*/_react.default.createElement(_favorite.default, {
|
|
183
188
|
className: _style.default.favorite,
|
|
184
189
|
favorite: favorite,
|
|
185
190
|
disabled: disabled,
|
|
186
191
|
onFavoriteClick: onFavoriteClick,
|
|
187
192
|
addFavoriteToolTip: addFavoriteToolTip,
|
|
188
193
|
removeFavoriteToolTip: removeFavoriteToolTip
|
|
189
|
-
}) : null,
|
|
194
|
+
}) : null, /*#__PURE__*/_react.default.createElement(_selectable.default, {
|
|
195
|
+
isSelected: isSelected
|
|
196
|
+
}), notification ? /*#__PURE__*/_react.default.createElement(_notification.default, notification) : null, customer ? /*#__PURE__*/_react.default.createElement(_customer.default, _extends({}, customer, {
|
|
190
197
|
className: (0, _classnames.default)(_style.default.customer, type === 'chapter' ? _style.default.chapterCustomer : null)
|
|
191
198
|
})) : null, /*#__PURE__*/_react.default.createElement(_cardContent.default, {
|
|
192
199
|
mode: _cardContent.MODES.CARD,
|
|
@@ -197,7 +204,9 @@ const Card = (0, _react.memo)(function Card(props, context) {
|
|
|
197
204
|
empty: empty,
|
|
198
205
|
progress: progress,
|
|
199
206
|
title: title,
|
|
200
|
-
type: type
|
|
207
|
+
type: type,
|
|
208
|
+
badgeCategory: badgeCategory,
|
|
209
|
+
badgeLabel: badgeLabel
|
|
201
210
|
}), badge ? /*#__PURE__*/_react.default.createElement("div", {
|
|
202
211
|
className: _style.default.badge,
|
|
203
212
|
style: inlineBadgeStyle
|
|
@@ -224,7 +233,10 @@ Card.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
224
233
|
removeFavoriteToolTip: _propTypes.default.string,
|
|
225
234
|
onClick: _propTypes.default.func,
|
|
226
235
|
onFavoriteClick: _propTypes.default.func,
|
|
227
|
-
|
|
236
|
+
isSelected: _propTypes.default.bool,
|
|
237
|
+
notification: _propTypes.default.shape(_notification.default.propTypes),
|
|
238
|
+
badgeCategory: _cardContent.default.propTypes.badgeCategory,
|
|
239
|
+
badgeLabel: _cardContent.default.propTypes.badgeLabel
|
|
228
240
|
} : {};
|
|
229
241
|
var _default = Card;
|
|
230
242
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/molecule/card/index.js"],"names":["CardBackground","type","image","empty","skin","externalContent","primaryColor","whiteColor","EXTERNAL_CONTENT_ICONS","IconType","icon","iconColor","color","backgroundIcon","style","externalIconCircleWrapper","externalIcon","_backgroundIcon","externalIconCircleWithImageWrapper","backgroundColor","externalIconWithImage","imageWrapper","backgroundImage","externalContentHeader","externalBackground","emptyIcon","chapterImageWrapper","contextTypes","Provider","childContextTypes","propTypes","PropTypes","string","bool","Card","props","context","badge","adaptiv","disabled","title","author","customer","certifiedAuthor","progress","favorite","addFavoriteToolTip","removeFavoriteToolTip","onClick","onFavoriteClick","notification","cardStyle","chapter","course","lazy","grid","handleClick","e","lock","lockIcon","inlineBadgeStyle","getType","contentType","chapterCustomer","MODES","CARD","lockWrapper","shape","Customer","number","func","Notification"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AAIA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,c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,eAAMuB,KAAtB;AAA6B,IAAA,KAAK,EAAEuB;AAApC,KACGvB,KADH,CADI,GAIF,IAzCN,EA0CGE,QAAQ,gBAAG;AAAK,IAAA,SAAS,EAAEzB,eAAMoD;AAAtB,KAAoCR,IAApC,CAAH,GAAqD,IA1ChE,CADF;AA8CD,CA3FY,CAAb;AA6FAxB,IAAI,CAACP,YAAL,GAAoB;AAClBvB,EAAAA,IAAI,EAAEwB,kBAASC,iBAAT,CAA2BzB;AADf,CAApB;AAIA8B,IAAI,CAACJ,SAAL,2CAAiB;AACfO,EAAAA,KAAK,EAAEN,mBAAUC,MADF;AAEf9B,EAAAA,KAAK,EAAE6B,mBAAUC,MAFF;AAGfO,EAAAA,QAAQ,EAAER,mBAAUE,IAHL;AAIfK,EAAAA,OAAO,EAAEP,mBAAUE,IAJJ;AAKfhC,EAAAA,IAAI,EAAE8B,mBAAUC,MALD;AAMfQ,EAAAA,KAAK,EAAET,mBAAUC,MANF;AAOfS,EAAAA,MAAM,EAAEV,mBAAUC,MAPH;AAQfW,EAAAA,eAAe,EAAEZ,mBAAUE,IARZ;AASfS,EAAAA,QAAQ,EAAEX,mBAAUoC,KAAV,CAAgBC,kBAAStC,SAAzB,CATK;AAUfc,EAAAA,QAAQ,EAAEb,mBAAUsC,MAVL;AAWfxB,EAAAA,QAAQ,EAAEd,mBAAUE,IAXL;AAYfa,EAAAA,kBAAkB,EAAEf,mBAAUC,MAZf;AAafe,EAAAA,qBAAqB,EAAEhB,mBAAUC,MAblB;AAcfgB,EAAAA,OAAO,EAAEjB,mBAAUuC,IAdJ;AAefrB,EAAAA,eAAe,EAAElB,mBAAUuC,IAfZ;AAgBfpB,EAAAA,YAAY,EAAEnB,mBAAUoC,KAAV,CAAgBI,sBAAazC,SAA7B;AAhBC,CAAjB;eAkBeI,I","sourcesContent":["import React, {useMemo, memo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {get, isEmpty, isUndefined, pick} from 'lodash/fp';\nimport {\n NovaSolidLoginLocked as LockIcon,\n NovaCompositionCoorpacademyPictures as PicturesIcon\n} from '@coorpacademy/nova-icons';\nimport {isExternalContent, EXTERNAL_CONTENT_ICONS} from '../../util/external-content';\nimport Provider from '../../atom/provider';\nimport CardContentInfo, {MODES} from '../card-content';\nimport Customer from './customer';\nimport Favorite from './favorite';\nimport 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 notification\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), [onClick]);\n\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 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(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 {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 />\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 notification: PropTypes.shape(Notification.propTypes)\n};\nexport default Card;\n"],"file":"index.js"}
|
|
1
|
+
{"version":3,"sources":["../../../src/molecule/card/index.js"],"names":["CardBackground","type","image","empty","skin","externalContent","primaryColor","whiteColor","EXTERNAL_CONTENT_ICONS","IconType","icon","iconColor","color","backgroundIcon","style","externalIconCircleWrapper","externalIcon","_backgroundIcon","externalIconCircleWithImageWrapper","backgroundColor","externalIconWithImage","imageWrapper","backgroundImage","externalContentHeader","externalBackground","emptyIcon","chapterImageWrapper","contextTypes","Provider","childContextTypes","propTypes","PropTypes","string","bool","Card","props","context","badge","adaptiv","disabled","title","author","customer","certifiedAuthor","progress","favorite","addFavoriteToolTip","removeFavoriteToolTip","onClick","onFavoriteClick","isSelected","notification","badgeCategory","badgeLabel","cardStyle","chapter","course","lazy","grid","handleClick","e","lock","lockIcon","inlineBadgeStyle","getType","contentType","chapterCustomer","MODES","CARD","lockWrapper","shape","Customer","number","func","Notification","CardContentInfo"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AAIA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,cAAc,GAAG,CAAC;AAACC,EAAAA,IAAD;AAAOC,EAAAA,KAAP;AAAcC,EAAAA;AAAd,CAAD,EAAuB;AAACC,E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KAAV,CAAgBI,sBAAa5C,SAA7B,CAjBC;AAkBfsB,EAAAA,aAAa,EAAEuB,qBAAgB7C,SAAhB,CAA0BsB,aAlB1B;AAmBfC,EAAAA,UAAU,EAAEsB,qBAAgB7C,SAAhB,CAA0BuB;AAnBvB,CAAjB;eAqBenB,I","sourcesContent":["import React, {useMemo, memo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {get, isEmpty, isUndefined, pick} from 'lodash/fp';\nimport {\n NovaSolidLoginLocked as LockIcon,\n NovaCompositionCoorpacademyPictures as PicturesIcon\n} from '@coorpacademy/nova-icons';\nimport {isExternalContent, EXTERNAL_CONTENT_ICONS} from '../../util/external-content';\nimport Provider from '../../atom/provider';\nimport CardContentInfo, {MODES} from '../card-content';\nimport Customer from './customer';\nimport Favorite from './favorite';\nimport Selectable from './selectable';\nimport Notification from './notification';\nimport style from './style.css';\n\nconst CardBackground = ({type, image, empty}, {skin}) => {\n const externalContent = isExternalContent(type);\n const primaryColor = get('common.primary', skin);\n const whiteColor = get('common.white', skin);\n\n if (externalContent && EXTERNAL_CONTENT_ICONS[type]) {\n const IconType = EXTERNAL_CONTENT_ICONS[type].icon;\n const iconColor = EXTERNAL_CONTENT_ICONS[type].color;\n const backgroundIcon = (\n <div className={style.externalIconCircleWrapper}>\n <IconType className={style.externalIcon} />\n </div>\n );\n\n if (image) {\n const _backgroundIcon = (\n <div\n className={classnames(\n style.externalIconCircleWrapper,\n style.externalIconCircleWithImageWrapper\n )}\n style={{\n backgroundColor: iconColor\n }}\n >\n <IconType className={style.externalIconWithImage} />\n </div>\n );\n\n return (\n <div className={style.imageWrapper}>\n <div\n data-name=\"cover\"\n style={{\n backgroundColor: iconColor,\n backgroundImage: `url('${image}')`\n }}\n className={classnames(style.externalContentHeader, style.externalBackground)}\n >\n {_backgroundIcon}\n </div>\n </div>\n );\n }\n return (\n <div className={style.imageWrapper}>\n <div\n data-name=\"cover\"\n style={{\n backgroundColor: iconColor\n }}\n className={style.externalContentHeader}\n >\n {backgroundIcon}\n </div>\n </div>\n );\n }\n\n const emptyIcon = empty ? <PicturesIcon className={style.emptyIcon} color={whiteColor} /> : null;\n return (\n <div\n className={classnames(\n style.imageWrapper,\n type === 'chapter' ? style.chapterImageWrapper : null\n )}\n >\n <div\n data-name=\"cover\"\n className={style.image}\n style={{\n backgroundColor: primaryColor,\n backgroundImage: image ? `url('${image}')` : 'none'\n }}\n >\n {emptyIcon}\n </div>\n </div>\n );\n};\n\nCardBackground.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nCardBackground.propTypes = {\n type: PropTypes.string,\n image: PropTypes.string,\n empty: PropTypes.bool\n};\n\nconst Card = memo(function Card(props, context) {\n const {skin} = context;\n const {\n image,\n badge,\n adaptiv,\n disabled = false,\n type = 'course',\n title,\n author,\n customer,\n certifiedAuthor,\n progress,\n favorite,\n addFavoriteToolTip,\n removeFavoriteToolTip,\n onClick,\n onFavoriteClick,\n isSelected,\n notification,\n badgeCategory,\n badgeLabel\n } = props;\n const empty = isEmpty(pick(['title', 'type', 'author', 'image'], props));\n const primaryColor = get('common.primary', skin);\n const whiteColor = get('common.white', skin);\n const cardStyle = classnames(\n type === 'chapter' ? style.chapter : style.course,\n title ? null : style.lazy,\n style.grid,\n empty ? style.empty : null\n );\n const handleClick = useMemo(() => e => !disabled && onClick(e), [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"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
@value colors: "../../variables/colors.css";
|
|
2
|
+
@value positive from colors;
|
|
3
|
+
@value negative from colors;
|
|
4
|
+
@value cm_grey_400 from colors;
|
|
5
|
+
|
|
6
|
+
.selectable {
|
|
7
|
+
width: 100%;
|
|
8
|
+
height: 100%;
|
|
9
|
+
display: flex;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
align-items: center;
|
|
12
|
+
background-color: rgba(0, 0, 0, 0.3);
|
|
13
|
+
position: absolute;
|
|
14
|
+
z-index: 1;
|
|
15
|
+
overflow: hidden;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.circle {
|
|
19
|
+
background-color: white;
|
|
20
|
+
width: 38px;
|
|
21
|
+
height: 38px;
|
|
22
|
+
border-radius: 50%;
|
|
23
|
+
display: none;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.iconWrapper {
|
|
27
|
+
position: absolute;
|
|
28
|
+
display: flex;
|
|
29
|
+
justify-content: center;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.icons {
|
|
33
|
+
width: 48px;
|
|
34
|
+
height: 48px;
|
|
35
|
+
display: none;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.checkIcon {
|
|
39
|
+
color: positive;
|
|
40
|
+
composes: icons;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.removeIcon {
|
|
44
|
+
color: negative;
|
|
45
|
+
composes: icons;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.addIcon {
|
|
49
|
+
color: cm_grey_400;
|
|
50
|
+
composes: icons;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.selectable:hover .addIcon,
|
|
54
|
+
.selectable:hover .circle {
|
|
55
|
+
display: block;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.selectable.selected .checkIcon,
|
|
59
|
+
.selectable.selected .circle,
|
|
60
|
+
.selectable.selected:hover .removeIcon {
|
|
61
|
+
display: block;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.selectable.selected:hover .circle {
|
|
65
|
+
display: block;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.selectable.selected:hover .checkIcon,
|
|
69
|
+
.selectable.selected:hover .addIcon {
|
|
70
|
+
display: none;
|
|
71
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
|
|
6
|
+
var _isUndefined2 = _interopRequireDefault(require("lodash/fp/isUndefined"));
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
14
|
+
var _novaIcons = require("@coorpacademy/nova-icons");
|
|
15
|
+
|
|
16
|
+
var _selectable = _interopRequireDefault(require("./selectable.css"));
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
+
|
|
20
|
+
const Selectable = props => {
|
|
21
|
+
const {
|
|
22
|
+
isSelected
|
|
23
|
+
} = props;
|
|
24
|
+
if ((0, _isUndefined2.default)(isSelected)) return null;
|
|
25
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
26
|
+
className: (0, _classnames.default)(_selectable.default.selectable, isSelected && _selectable.default.selected)
|
|
27
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
28
|
+
className: _selectable.default.circle
|
|
29
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
30
|
+
className: _selectable.default.iconWrapper
|
|
31
|
+
}, /*#__PURE__*/_react.default.createElement(_novaIcons.NovaSolidRemoveAddRemoveCircle1, {
|
|
32
|
+
className: _selectable.default.removeIcon
|
|
33
|
+
}), /*#__PURE__*/_react.default.createElement(_novaIcons.NovaSolidRemoveAddAddCircle1, {
|
|
34
|
+
className: _selectable.default.addIcon
|
|
35
|
+
}), /*#__PURE__*/_react.default.createElement(_novaIcons.NovaSolidStatusCheckCircle2, {
|
|
36
|
+
className: _selectable.default.checkIcon
|
|
37
|
+
})));
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
Selectable.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
41
|
+
isSelected: _propTypes.default.bool
|
|
42
|
+
} : {};
|
|
43
|
+
var _default = Selectable;
|
|
44
|
+
exports.default = _default;
|
|
45
|
+
//# sourceMappingURL=selectable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/molecule/card/selectable.js"],"names":["Selectable","props","isSelected","style","selectable","selected","circle","iconWrapper","removeIcon","addIcon","checkIcon","propTypes","PropTypes","bool"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAEA;;AAKA;;;;AAEA,MAAMA,UAAU,GAAGC,KAAK,IAAI;AAC1B,QAAM;AAACC,IAAAA;AAAD,MAAeD,KAArB;AAEA,MAAI,2BAAYC,UAAZ,CAAJ,EAA6B,OAAO,IAAP;AAE7B,sBACE;AAAK,IAAA,SAAS,EAAE,yBAAWC,oBAAMC,UAAjB,EAA6BF,UAAU,IAAIC,oBAAME,QAAjD;AAAhB,kBACE;AAAK,IAAA,SAAS,EAAEF,oBAAMG;AAAtB,IADF,eAEE;AAAK,IAAA,SAAS,EAAEH,oBAAMI;AAAtB,kBACE,6BAAC,0CAAD;AAAY,IAAA,SAAS,EAAEJ,oBAAMK;AAA7B,IADF,eAEE,6BAAC,uCAAD;AAAS,IAAA,SAAS,EAAEL,oBAAMM;AAA1B,IAFF,eAGE,6BAAC,sCAAD;AAAW,IAAA,SAAS,EAAEN,oBAAMO;AAA5B,IAHF,CAFF,CADF;AAUD,CAfD;;AAiBAV,UAAU,CAACW,SAAX,2CAAuB;AACrBT,EAAAA,UAAU,EAAEU,mBAAUC;AADD,CAAvB;eAIeb,U","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {isUndefined} from 'lodash/fp';\nimport {\n NovaSolidStatusCheckCircle2 as CheckIcon,\n NovaSolidRemoveAddRemoveCircle1 as RemoveIcon,\n NovaSolidRemoveAddAddCircle1 as AddIcon\n} from '@coorpacademy/nova-icons';\nimport style from './selectable.css';\n\nconst Selectable = props => {\n const {isSelected} = props;\n\n if (isUndefined(isSelected)) return null;\n\n return (\n <div className={classnames(style.selectable, isSelected && style.selected)}>\n <div className={style.circle} />\n <div className={style.iconWrapper}>\n <RemoveIcon className={style.removeIcon} />\n <AddIcon className={style.addIcon} />\n <CheckIcon className={style.checkIcon} />\n </div>\n </div>\n );\n};\n\nSelectable.propTypes = {\n isSelected: PropTypes.bool\n};\n\nexport default Selectable;\n"],"file":"selectable.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/molecule/card/test/fixtures/default.js"],"names":["props","image","adaptiv","certification","type","title","author","certifiedAuthor","progress","badge","favorite","addFavoriteToolTip","removeFavoriteToolTip","customer","coorpOriginal","name","onClick","console","log","onFavoriteClick"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EACH,4LAFG;AAGLC,IAAAA,OAAO,EAAE,KAHJ;AAILC,IAAAA,aAAa,EAAE,KAJV;AAKLC,IAAAA,IAAI,EAAE,QALD;AAMLC,IAAAA,KAAK,EAAE,sDANF;AAOLC,IAAAA,MAAM,EAAE,cAPH;AAQLC,IAAAA,eAAe,EAAE,IARZ;AASLC,IAAAA,QAAQ,EAAE,IATL;AAULC,IAAAA,KAAK,EAAE,KAVF;AAWLC,IAAAA,QAAQ,EAAE,IAXL;AAYLC,IAAAA,kBAAkB,EAAE,gBAZf;AAaLC,IAAAA,qBAAqB,EAAE,qBAblB;AAcLC,IAAAA,QAAQ,EAAE;AACRC,MAAAA,aAAa,EAAE,IADP;AAERC,MAAAA,IAAI,EAAE;AAFE,
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/card/test/fixtures/default.js"],"names":["props","image","adaptiv","certification","type","title","author","certifiedAuthor","progress","badge","favorite","addFavoriteToolTip","removeFavoriteToolTip","isSelected","undefined","customer","coorpOriginal","name","onClick","console","log","onFavoriteClick"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EACH,4LAFG;AAGLC,IAAAA,OAAO,EAAE,KAHJ;AAILC,IAAAA,aAAa,EAAE,KAJV;AAKLC,IAAAA,IAAI,EAAE,QALD;AAMLC,IAAAA,KAAK,EAAE,sDANF;AAOLC,IAAAA,MAAM,EAAE,cAPH;AAQLC,IAAAA,eAAe,EAAE,IARZ;AASLC,IAAAA,QAAQ,EAAE,IATL;AAULC,IAAAA,KAAK,EAAE,KAVF;AAWLC,IAAAA,QAAQ,EAAE,IAXL;AAYLC,IAAAA,kBAAkB,EAAE,gBAZf;AAaLC,IAAAA,qBAAqB,EAAE,qBAblB;AAcLC,IAAAA,UAAU,EAAEC,SAdP;AAeLC,IAAAA,QAAQ,EAAE;AACRC,MAAAA,aAAa,EAAE,IADP;AAERC,MAAAA,IAAI,EAAE;AAFE,KAfL;AAmBLC,IAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,kBAAZ,CAnBV;AAoBLC,IAAAA,eAAe,EAAE,MAAMF,OAAO,CAACC,GAAR,CAAY,gBAAZ;AApBlB;AADM,C","sourcesContent":["export default {\n props: {\n image:\n 'https://api.coorpacademy.com/api-service/medias?url=https://static.coorpacademy.com/content/partner-wedemain/fr/medias/img/cover/shutterstock_248741149-1470302136299.jpg&h=500&w=500&q=90',\n adaptiv: false,\n certification: false,\n type: 'course',\n title: 'From Mass Market to One to One targeting Lorem ipsum',\n author: 'Coorpacademy',\n certifiedAuthor: true,\n progress: 0.65,\n badge: 'new',\n favorite: true,\n addFavoriteToolTip: 'Add to my list',\n removeFavoriteToolTip: 'Remove from my list',\n isSelected: undefined,\n customer: {\n coorpOriginal: true,\n name: 'Decathlon creation'\n },\n onClick: () => console.log('click everywhere'),\n onFavoriteClick: () => console.log('click Favorite')\n }\n};\n"],"file":"default.js"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
|
|
6
|
+
var _defaultsDeep2 = _interopRequireDefault(require("lodash/fp/defaultsDeep"));
|
|
7
|
+
|
|
8
|
+
var _default2 = _interopRequireDefault(require("./default"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
const {
|
|
13
|
+
props
|
|
14
|
+
} = _default2.default;
|
|
15
|
+
var _default = {
|
|
16
|
+
props: (0, _defaultsDeep2.default)(props, {
|
|
17
|
+
disabled: false,
|
|
18
|
+
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',
|
|
19
|
+
progress: 0.1,
|
|
20
|
+
isSelected: false,
|
|
21
|
+
badgeCategory: 'coach',
|
|
22
|
+
badgeLabel: 'Coach'
|
|
23
|
+
})
|
|
24
|
+
};
|
|
25
|
+
exports.default = _default;
|
|
26
|
+
//# sourceMappingURL=selectable-false.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/card/test/fixtures/selectable-false.js"],"names":["props","Default","disabled","image","progress","isSelected","badgeCategory","badgeLabel"],"mappings":";;;;;;;AACA;;;;AAEA,MAAM;AAACA,EAAAA;AAAD,IAAUC,iBAAhB;eAEe;AACbD,EAAAA,KAAK,EAAE,4BAAaA,KAAb,EAAoB;AACzBE,IAAAA,QAAQ,EAAE,KADe;AAEzBC,IAAAA,KAAK,EACH,4MAHuB;AAIzBC,IAAAA,QAAQ,EAAE,GAJe;AAKzBC,IAAAA,UAAU,EAAE,KALa;AAMzBC,IAAAA,aAAa,EAAE,OANU;AAOzBC,IAAAA,UAAU,EAAE;AAPa,GAApB;AADM,C","sourcesContent":["import {defaultsDeep} from 'lodash/fp';\nimport Default from './default';\n\nconst {props} = Default;\n\nexport default {\n props: defaultsDeep(props, {\n disabled: false,\n 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: 'coach',\n badgeLabel: 'Coach'\n })\n};\n"],"file":"selectable-false.js"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
|
|
6
|
+
var _defaultsDeep2 = _interopRequireDefault(require("lodash/fp/defaultsDeep"));
|
|
7
|
+
|
|
8
|
+
var _default2 = _interopRequireDefault(require("./default"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
const {
|
|
13
|
+
props
|
|
14
|
+
} = _default2.default;
|
|
15
|
+
var _default = {
|
|
16
|
+
props: (0, _defaultsDeep2.default)(props, {
|
|
17
|
+
disabled: false,
|
|
18
|
+
type: 'course',
|
|
19
|
+
image: 'https://api.coorpacademy.com/api-service/medias?url=https://static.coorpacademy.com/content/CoorpAcademy/content-marmiton/cockpit-marmiton/cover/shutterstock_520965634-1491986518210.jpg&h=500&w=500&q=90',
|
|
20
|
+
progress: 0.1,
|
|
21
|
+
isSelected: true,
|
|
22
|
+
badgeCategory: 'base',
|
|
23
|
+
badgeLabel: 'basic'
|
|
24
|
+
})
|
|
25
|
+
};
|
|
26
|
+
exports.default = _default;
|
|
27
|
+
//# sourceMappingURL=selectable-true.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/card/test/fixtures/selectable-true.js"],"names":["props","Default","disabled","type","image","progress","isSelected","badgeCategory","badgeLabel"],"mappings":";;;;;;;AACA;;;;AAEA,MAAM;AAACA,EAAAA;AAAD,IAAUC,iBAAhB;eAEe;AACbD,EAAAA,KAAK,EAAE,4BAAaA,KAAb,EAAoB;AACzBE,IAAAA,QAAQ,EAAE,KADe;AAEzBC,IAAAA,IAAI,EAAE,QAFmB;AAGzBC,IAAAA,KAAK,EACH,4MAJuB;AAKzBC,IAAAA,QAAQ,EAAE,GALe;AAMzBC,IAAAA,UAAU,EAAE,IANa;AAOzBC,IAAAA,aAAa,EAAE,MAPU;AAQzBC,IAAAA,UAAU,EAAE;AARa,GAApB;AADM,C","sourcesContent":["import {defaultsDeep} from 'lodash/fp';\nimport Default from './default';\n\nconst {props} = Default;\n\nexport default {\n props: defaultsDeep(props, {\n disabled: false,\n type: 'course',\n image:\n 'https://api.coorpacademy.com/api-service/medias?url=https://static.coorpacademy.com/content/CoorpAcademy/content-marmiton/cockpit-marmiton/cover/shutterstock_520965634-1491986518210.jpg&h=500&w=500&q=90',\n progress: 0.1,\n isSelected: true,\n badgeCategory: 'base',\n badgeLabel: 'basic'\n })\n};\n"],"file":"selectable-true.js"}
|
|
@@ -17,6 +17,8 @@ var _externalContent = require("../../util/external-content");
|
|
|
17
17
|
|
|
18
18
|
var _provider = _interopRequireDefault(require("../../atom/provider"));
|
|
19
19
|
|
|
20
|
+
var _contentBadge = _interopRequireDefault(require("../../atom/content-badge"));
|
|
21
|
+
|
|
20
22
|
var _style = require("../../atom/label/style.css");
|
|
21
23
|
|
|
22
24
|
var _style2 = _interopRequireDefault(require("./style.css"));
|
|
@@ -131,7 +133,9 @@ const ContentInfo = ({
|
|
|
131
133
|
mode = MODES.CARD,
|
|
132
134
|
progress,
|
|
133
135
|
title,
|
|
134
|
-
type
|
|
136
|
+
type,
|
|
137
|
+
badgeCategory,
|
|
138
|
+
badgeLabel
|
|
135
139
|
}) => {
|
|
136
140
|
const progressBarColor = '#3EC483';
|
|
137
141
|
const inlineProgressValueStyle = {
|
|
@@ -162,7 +166,12 @@ const ContentInfo = ({
|
|
|
162
166
|
externalContent: externalContent
|
|
163
167
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
164
168
|
className: (0, _classnames.default)(_style2.default.cardInfo, chapterContent ? _style2.default.microLearningCardInfo : null)
|
|
165
|
-
},
|
|
169
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
170
|
+
className: _style2.default.iconWrapper
|
|
171
|
+
}, adaptiveIcon, !empty && badgeLabel && badgeCategory && courseContent ? /*#__PURE__*/_react.default.createElement(_contentBadge.default, {
|
|
172
|
+
category: badgeCategory,
|
|
173
|
+
label: badgeLabel
|
|
174
|
+
}) : null), /*#__PURE__*/_react.default.createElement(CardTitle, {
|
|
166
175
|
title: title,
|
|
167
176
|
empty: empty,
|
|
168
177
|
courseContent: courseContent
|
|
@@ -186,7 +195,9 @@ ContentInfo.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
186
195
|
progress: _propTypes.default.number,
|
|
187
196
|
title: _propTypes.default.string,
|
|
188
197
|
type: _propTypes.default.string,
|
|
189
|
-
mode: _propTypes.default.string
|
|
198
|
+
mode: _propTypes.default.string,
|
|
199
|
+
badgeCategory: _contentBadge.default.propTypes.category,
|
|
200
|
+
badgeLabel: _contentBadge.default.propTypes.label
|
|
190
201
|
} : {};
|
|
191
202
|
var _default = ContentInfo;
|
|
192
203
|
exports.default = _default;
|