@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,157 @@
|
|
|
1
|
+
@value colors: "../../variables/colors.css";
|
|
2
|
+
@value dark from colors;
|
|
3
|
+
@value brand from colors;
|
|
4
|
+
@value light from colors;
|
|
5
|
+
@value black from colors;
|
|
6
|
+
@value cm_grey_800 from colors;
|
|
7
|
+
@value negative from colors;
|
|
8
|
+
@value lightGreen from colors;
|
|
9
|
+
@value cm_grey_50 from colors;
|
|
10
|
+
@value cm_negative_100 from colors;
|
|
11
|
+
@value cm_negative_200 from colors;
|
|
12
|
+
@value cm_primary_blue from colors;
|
|
13
|
+
@value cm_grey_100 from colors;
|
|
14
|
+
@value cm_grey_200 from colors;
|
|
15
|
+
@value cm_blue_600 from colors;
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
.background {
|
|
19
|
+
top: 0px;
|
|
20
|
+
width: 100%;
|
|
21
|
+
height: 100%;
|
|
22
|
+
margin: 0;
|
|
23
|
+
padding: 15% 25%;
|
|
24
|
+
background-color: rgba(0, 0, 0, 0.2);
|
|
25
|
+
align-items: center;
|
|
26
|
+
justify-content: center;
|
|
27
|
+
box-sizing: border-box;
|
|
28
|
+
overflow: hidden;
|
|
29
|
+
display: flex;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.popin {
|
|
33
|
+
position: absolute;
|
|
34
|
+
overflow: auto;
|
|
35
|
+
width: 500px;
|
|
36
|
+
height: 414px;
|
|
37
|
+
flex-grow: 0;
|
|
38
|
+
margin: 16px;
|
|
39
|
+
padding: 16px 16px 20px 16px;
|
|
40
|
+
border-radius: 20px;
|
|
41
|
+
background-color: cm_grey_50;
|
|
42
|
+
display: flex;
|
|
43
|
+
flex-direction: column;
|
|
44
|
+
align-items: center;
|
|
45
|
+
justify-content: space-between;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.contentSection {
|
|
49
|
+
display: flex;
|
|
50
|
+
flex-direction: column;
|
|
51
|
+
align-items: center;
|
|
52
|
+
justify-content: center;
|
|
53
|
+
width: 65%;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.content {
|
|
57
|
+
font-family: Gilroy;
|
|
58
|
+
font-size: 20px;
|
|
59
|
+
font-weight: bold;
|
|
60
|
+
font-stretch: normal;
|
|
61
|
+
font-style: normal;
|
|
62
|
+
line-height: 1.4;
|
|
63
|
+
letter-spacing: normal;
|
|
64
|
+
text-align: center;
|
|
65
|
+
color: cm_grey_800;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.buttonContainer {
|
|
69
|
+
width: 100%;
|
|
70
|
+
height: 80px;
|
|
71
|
+
display: flex;
|
|
72
|
+
align-items: center;
|
|
73
|
+
justify-content: center;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.button {
|
|
77
|
+
min-width: auto;
|
|
78
|
+
margin: 0px 8px;
|
|
79
|
+
border-radius: 7px;
|
|
80
|
+
transform: none;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.dangerousButton {
|
|
84
|
+
background-color: cm_negative_100;
|
|
85
|
+
color: white;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.coloredButton {
|
|
89
|
+
background-color: cm_primary_blue;
|
|
90
|
+
color: white;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.dangerousButton:hover {
|
|
94
|
+
background-color: cm_negative_200;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.coloredButton:hover {
|
|
98
|
+
background-color: cm_blue_600;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.button::after,
|
|
102
|
+
.button:hover::after,
|
|
103
|
+
.button:focus::after,
|
|
104
|
+
.button:active::after {
|
|
105
|
+
transform: none;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
.buttonContent {
|
|
110
|
+
width: 180px;
|
|
111
|
+
padding: 12px 24px;
|
|
112
|
+
line-height: 1.43;
|
|
113
|
+
font-size: 14px;
|
|
114
|
+
font-weight: bold;
|
|
115
|
+
display: block;
|
|
116
|
+
text-transform: inherit;
|
|
117
|
+
font-family: Gilroy;
|
|
118
|
+
text-align: center;
|
|
119
|
+
box-sizing: border-box;
|
|
120
|
+
border: none;
|
|
121
|
+
cursor: pointer;
|
|
122
|
+
}
|
|
123
|
+
.icon {
|
|
124
|
+
width: 60px;
|
|
125
|
+
height: 60px;
|
|
126
|
+
color: cm_grey_800;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.headerCloseIconContainer {
|
|
130
|
+
width: 44px;
|
|
131
|
+
height: 44px;
|
|
132
|
+
display: flex;
|
|
133
|
+
flex-direction: row;
|
|
134
|
+
justify-content: center;
|
|
135
|
+
align-items: center;
|
|
136
|
+
margin-top: 16px;
|
|
137
|
+
margin-right: 16px;
|
|
138
|
+
border-radius: 7px;
|
|
139
|
+
cursor: pointer;
|
|
140
|
+
background-color: cm_grey_100;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.headerCloseIconContainer:hover {
|
|
144
|
+
background-color: cm_grey_200;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.headerCloseIcon {
|
|
148
|
+
width: 18px;
|
|
149
|
+
height: 18px;
|
|
150
|
+
color: cm_grey_800;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.popinHeader {
|
|
154
|
+
width: 100%;
|
|
155
|
+
display: flex;
|
|
156
|
+
justify-content: flex-end;
|
|
157
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
props: {
|
|
3
|
+
content: 'Are you sure to undo this changes? This will be permanent',
|
|
4
|
+
icon: 'AlertDiamond',
|
|
5
|
+
firstButton: {
|
|
6
|
+
label: 'Cancel',
|
|
7
|
+
handleOnClick: () => {}
|
|
8
|
+
},
|
|
9
|
+
secondButton: {
|
|
10
|
+
label: 'Undo',
|
|
11
|
+
type: 'dangerous',
|
|
12
|
+
handleOnClick: () => {}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=dangerous.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/cm-popin/test/fixtures/dangerous.js"],"names":["props","content","icon","firstButton","label","handleOnClick","secondButton","type"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,OAAO,EAAE,2DADJ;AAELC,IAAAA,IAAI,EAAE,cAFD;AAGLC,IAAAA,WAAW,EAAE;AACXC,MAAAA,KAAK,EAAE,QADI;AAEXC,MAAAA,aAAa,EAAE,MAAM,CAAE;AAFZ,KAHR;AAOLC,IAAAA,YAAY,EAAE;AACZF,MAAAA,KAAK,EAAE,MADK;AAEZG,MAAAA,IAAI,EAAE,WAFM;AAGZF,MAAAA,aAAa,EAAE,MAAM,CAAE;AAHX;AAPT;AADM,CAAf","sourcesContent":["export default {\n props: {\n content: 'Are you sure to undo this changes? This will be permanent',\n icon: 'AlertDiamond',\n firstButton: {\n label: 'Cancel',\n handleOnClick: () => {}\n },\n secondButton: {\n label: 'Undo',\n type: 'dangerous',\n handleOnClick: () => {}\n }\n }\n};\n"],"file":"dangerous.js"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
props: {
|
|
3
|
+
content: 'Do you want to publish the custom playlist?',
|
|
4
|
+
icon: 'WindowUpload',
|
|
5
|
+
firstButton: {
|
|
6
|
+
label: 'Cancel',
|
|
7
|
+
handleOnClick: () => {}
|
|
8
|
+
},
|
|
9
|
+
secondButton: {
|
|
10
|
+
label: 'Undo',
|
|
11
|
+
type: 'warning',
|
|
12
|
+
handleOnClick: () => {}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=default.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/cm-popin/test/fixtures/default.js"],"names":["props","content","icon","firstButton","label","handleOnClick","secondButton","type"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,OAAO,EAAE,6CADJ;AAELC,IAAAA,IAAI,EAAE,cAFD;AAGLC,IAAAA,WAAW,EAAE;AACXC,MAAAA,KAAK,EAAE,QADI;AAEXC,MAAAA,aAAa,EAAE,MAAM,CAAE;AAFZ,KAHR;AAOLC,IAAAA,YAAY,EAAE;AACZF,MAAAA,KAAK,EAAE,MADK;AAEZG,MAAAA,IAAI,EAAE,SAFM;AAGZF,MAAAA,aAAa,EAAE,MAAM,CAAE;AAHX;AAPT;AADM,CAAf","sourcesContent":["export default {\n props: {\n content: 'Do you want to publish the custom playlist?',\n icon: 'WindowUpload',\n firstButton: {\n label: 'Cancel',\n handleOnClick: () => {}\n },\n secondButton: {\n label: 'Undo',\n type: 'warning',\n handleOnClick: () => {}\n }\n }\n};\n"],"file":"default.js"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
props: {
|
|
3
|
+
content: 'Do you want to save changes before quiting?',
|
|
4
|
+
icon: 'AlertDiamond',
|
|
5
|
+
firstButton: {
|
|
6
|
+
label: 'Quit without saving',
|
|
7
|
+
handleOnClick: () => {}
|
|
8
|
+
},
|
|
9
|
+
secondButton: {
|
|
10
|
+
label: 'Save & Quit',
|
|
11
|
+
type: 'warningWithClose',
|
|
12
|
+
handleOnClick: () => {}
|
|
13
|
+
},
|
|
14
|
+
onClose: () => console.log('onClose')
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=warning-with-close.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/cm-popin/test/fixtures/warning-with-close.js"],"names":["props","content","icon","firstButton","label","handleOnClick","secondButton","type","onClose","console","log"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,OAAO,EAAE,6CADJ;AAELC,IAAAA,IAAI,EAAE,cAFD;AAGLC,IAAAA,WAAW,EAAE;AACXC,MAAAA,KAAK,EAAE,qBADI;AAEXC,MAAAA,aAAa,EAAE,MAAM,CAAE;AAFZ,KAHR;AAOLC,IAAAA,YAAY,EAAE;AACZF,MAAAA,KAAK,EAAE,aADK;AAEZG,MAAAA,IAAI,EAAE,kBAFM;AAGZF,MAAAA,aAAa,EAAE,MAAM,CAAE;AAHX,KAPT;AAYLG,IAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,SAAZ;AAZV;AADM,CAAf","sourcesContent":["export default {\n props: {\n content: 'Do you want to save changes before quiting?',\n icon: 'AlertDiamond',\n firstButton: {\n label: 'Quit without saving',\n handleOnClick: () => {}\n },\n secondButton: {\n label: 'Save & Quit',\n type: 'warningWithClose',\n handleOnClick: () => {}\n },\n onClose: () => console.log('onClose')\n }\n};\n"],"file":"warning-with-close.js"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import test from 'ava';
|
|
2
|
+
import forEach from 'lodash/forEach';
|
|
3
|
+
import renderComponentMacro from '../../../test/helpers/render-component';
|
|
4
|
+
import MoleculeCockpitPopin from '..';
|
|
5
|
+
import fixtureDefault from './fixtures/default';
|
|
6
|
+
import fixtureLoading from './fixtures/loading';
|
|
7
|
+
import fixtureVideoTranslate from './fixtures/video-translate';
|
|
8
|
+
test('Molecule › MoleculeCockpitPopin > should have valid propTypes', t => {
|
|
9
|
+
t.pass();
|
|
10
|
+
forEach(MoleculeCockpitPopin.propTypes, (value, key) => {
|
|
11
|
+
t.not(value, undefined, `PropType for "Molecule.MoleculeCockpitPopin.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
test('Molecule › MoleculeCockpitPopin › Default › should be rendered', renderComponentMacro, MoleculeCockpitPopin, fixtureDefault);
|
|
15
|
+
test('Molecule › MoleculeCockpitPopin › Loading › should be rendered', renderComponentMacro, MoleculeCockpitPopin, fixtureLoading);
|
|
16
|
+
test('Molecule › MoleculeCockpitPopin › VideoTranslate › should be rendered', renderComponentMacro, MoleculeCockpitPopin, fixtureVideoTranslate);
|
|
17
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/cockpit-popin/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeCockpitPopin","fixtureDefault","fixtureLoading","fixtureVideoTranslate","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,oBAAP,MAAiC,IAAjC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,qBAAP,MAAkC,4BAAlC;AAEAN,IAAI,CAAC,+DAAD,EAAkEO,CAAC,IAAI;AACzEA,EAAAA,CAAC,CAACC,IAAF;AACAP,EAAAA,OAAO,CAACE,oBAAoB,CAACM,SAAtB,EAAiC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACtDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,yDAAwDF,GAAI,mEAArF;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAX,IAAI,CAAC,gEAAD,EAAmEE,oBAAnE,EAAyFC,oBAAzF,EAA+GC,cAA/G,CAAJ;AACAJ,IAAI,CAAC,gEAAD,EAAmEE,oBAAnE,EAAyFC,oBAAzF,EAA+GE,cAA/G,CAAJ;AACAL,IAAI,CAAC,uEAAD,EAA0EE,oBAA1E,EAAgGC,oBAAhG,EAAsHG,qBAAtH,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeCockpitPopin from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureLoading from './fixtures/loading';\nimport fixtureVideoTranslate from './fixtures/video-translate';\n\ntest('Molecule › MoleculeCockpitPopin > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeCockpitPopin.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeCockpitPopin.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeCockpitPopin › Default › should be rendered', renderComponentMacro, MoleculeCockpitPopin, fixtureDefault);\ntest('Molecule › MoleculeCockpitPopin › Loading › should be rendered', renderComponentMacro, MoleculeCockpitPopin, fixtureLoading);\ntest('Molecule › MoleculeCockpitPopin › VideoTranslate › should be rendered', renderComponentMacro, MoleculeCockpitPopin, fixtureVideoTranslate);\n"],"file":"fixtures.js"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import
|
|
3
|
+
import classnames from 'classnames';
|
|
4
|
+
import { NovaSolidComputersSdCard as SaveIcon, NovaCompositionNavigationArrowDown as ArrowDownIcon } from '@coorpacademy/nova-icons';
|
|
4
5
|
import Link from '../../atom/link';
|
|
5
|
-
import
|
|
6
|
+
import ContentBadge from '../../atom/content-badge';
|
|
6
7
|
import style from './style.css';
|
|
7
8
|
|
|
8
9
|
const buildItemsOfSection = items => {
|
|
@@ -27,7 +28,8 @@ const buildItemsOfSection = items => {
|
|
|
27
28
|
category,
|
|
28
29
|
label,
|
|
29
30
|
title,
|
|
30
|
-
author
|
|
31
|
+
author,
|
|
32
|
+
unsaved = false
|
|
31
33
|
} = item;
|
|
32
34
|
return /*#__PURE__*/React.createElement("li", {
|
|
33
35
|
className: style.contentWrapper,
|
|
@@ -38,11 +40,11 @@ const buildItemsOfSection = items => {
|
|
|
38
40
|
className: style.contentItem
|
|
39
41
|
}, /*#__PURE__*/React.createElement("div", {
|
|
40
42
|
className: style.content
|
|
41
|
-
}, /*#__PURE__*/React.createElement(
|
|
43
|
+
}, /*#__PURE__*/React.createElement(ContentBadge, {
|
|
42
44
|
category: category,
|
|
43
45
|
label: label
|
|
44
46
|
}), /*#__PURE__*/React.createElement("span", {
|
|
45
|
-
className: style.contentTitle,
|
|
47
|
+
className: classnames(style.contentTitle, unsaved && style.unsaved),
|
|
46
48
|
title: title // eslint-disable-next-line react/no-danger
|
|
47
49
|
,
|
|
48
50
|
dangerouslySetInnerHTML: {
|
|
@@ -55,11 +57,17 @@ const buildItemsOfSection = items => {
|
|
|
55
57
|
|
|
56
58
|
case 'text':
|
|
57
59
|
default:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
{
|
|
61
|
+
const {
|
|
62
|
+
text,
|
|
63
|
+
unsaved = false
|
|
64
|
+
} = item;
|
|
65
|
+
return /*#__PURE__*/React.createElement("li", {
|
|
66
|
+
key: `${item.text}-${index}`
|
|
67
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
68
|
+
className: classnames(style.valueSimpleText, unsaved && style.unsaved)
|
|
69
|
+
}, text));
|
|
70
|
+
}
|
|
63
71
|
}
|
|
64
72
|
});
|
|
65
73
|
};
|
|
@@ -106,7 +114,7 @@ const buildAction = action => {
|
|
|
106
114
|
return /*#__PURE__*/React.createElement(Link, {
|
|
107
115
|
className: style.actionLink,
|
|
108
116
|
onClick: handleClick
|
|
109
|
-
}, icon === 'draft' ? /*#__PURE__*/React.createElement(
|
|
117
|
+
}, icon === 'draft' ? /*#__PURE__*/React.createElement(SaveIcon, {
|
|
110
118
|
className: style.icon
|
|
111
119
|
}) : null, /*#__PURE__*/React.createElement("span", null, text));
|
|
112
120
|
};
|
|
@@ -117,15 +125,32 @@ const WizardSummary = props => {
|
|
|
117
125
|
sections,
|
|
118
126
|
action
|
|
119
127
|
} = props;
|
|
120
|
-
const
|
|
128
|
+
const sectionsView = buildSections(sections);
|
|
121
129
|
const actionView = buildAction(action);
|
|
130
|
+
const idSwitch = 'open-summary-wizard';
|
|
122
131
|
return /*#__PURE__*/React.createElement("div", {
|
|
123
132
|
className: style.container
|
|
124
133
|
}, /*#__PURE__*/React.createElement("span", {
|
|
125
|
-
className: style.
|
|
126
|
-
}, title), /*#__PURE__*/React.createElement("
|
|
134
|
+
className: style.desktopSummaryTitle
|
|
135
|
+
}, title), /*#__PURE__*/React.createElement("input", {
|
|
136
|
+
type: "checkbox",
|
|
137
|
+
id: idSwitch,
|
|
138
|
+
name: "toogle",
|
|
139
|
+
title: idSwitch,
|
|
140
|
+
className: style.checkbox
|
|
141
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
127
142
|
className: style.summary
|
|
128
|
-
},
|
|
143
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
144
|
+
className: style.tabletSummaryHeader
|
|
145
|
+
}, /*#__PURE__*/React.createElement("label", {
|
|
146
|
+
htmlFor: idSwitch
|
|
147
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
148
|
+
className: style.tabletSummaryTitle
|
|
149
|
+
}, title), /*#__PURE__*/React.createElement(ArrowDownIcon, {
|
|
150
|
+
className: style.tabletSummaryIcon
|
|
151
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
152
|
+
className: style.summarySections
|
|
153
|
+
}, sectionsView)), /*#__PURE__*/React.createElement("div", {
|
|
129
154
|
className: style.actionZone
|
|
130
155
|
}, actionView));
|
|
131
156
|
};
|
|
@@ -140,13 +165,15 @@ WizardSummary.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
140
165
|
value: PropTypes.string
|
|
141
166
|
}), PropTypes.shape({
|
|
142
167
|
type: PropTypes.string,
|
|
143
|
-
text: PropTypes.string
|
|
168
|
+
text: PropTypes.string,
|
|
169
|
+
unsaved: PropTypes.bool
|
|
144
170
|
}), PropTypes.shape({
|
|
145
171
|
type: PropTypes.string,
|
|
146
172
|
category: PropTypes.oneOf(['base', 'advanced', 'coach', 'chapter', 'scorm', 'video', 'article', 'podcast']),
|
|
147
173
|
title: PropTypes.string,
|
|
148
174
|
label: PropTypes.string,
|
|
149
|
-
author: PropTypes.string
|
|
175
|
+
author: PropTypes.string,
|
|
176
|
+
unsaved: PropTypes.bool
|
|
150
177
|
})])),
|
|
151
178
|
counterText: PropTypes.string
|
|
152
179
|
})),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/molecule/wizard-summary/index.js"],"names":["React","useMemo","PropTypes","NovaSolidComputersSdCard","Link","ContentBagde","style","buildItemsOfSection","items","map","item","index","type","title","value","category","label","author","contentWrapper","contentCounter","contentItem","content","contentTitle","__html","text","valueSimpleText","buildSectionHeader","section","counterText","sectionHeader","buildSections","sections","itemsView","sectionWrapper","buildAction","action","onClick","icon","handleClick","actionLink","WizardSummary","props","sectionView","actionView","container","summaryTitle","summary","actionZone","propTypes","string","arrayOf","shape","oneOfType","oneOf","func"],"mappings":"AAAA,OAAOA,KAAP,IAAeC,OAAf,QAA6B,OAA7B;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SAAQC,wBAAR,QAAuC,0BAAvC;AACA,OAAOC,IAAP,MAAiB,iBAAjB;AACA,OAAOC,YAAP,MAAyB,0BAAzB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,mBAAmB,GAAGC,KAAK,IAAI;AACnC,SAAOA,KAAK,CAACC,GAAN,CAAU,CAACC,IAAD,EAAOC,KAAP,KAAiB;AAChC,UAAM;AAACC,MAAAA;AAAD,QAASF,IAAf;;AACA,YAAQE,IAAR;AACE,WAAK,aAAL;AACE,4BACE;AAAI,UAAA,GAAG,EAAG,GAAEF,IAAI,CAACG,KAAM,IAAGF,KAAM;AAAhC,wBACE;AAAM,UAAA,SAAS,EAAEL,KAAK,CAACO;AAAvB,WAA+BH,IAAI,CAACG,KAApC,CADF,eAEE;AAAM,UAAA,SAAS,EAAEP,KAAK,CAACQ;AAAvB,WAA+BJ,IAAI,CAACI,KAApC,CAFF,CADF;;AAMF,WAAK,SAAL;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QAAQ,EAAEb,SAAS,CAACmD,KAAV,CAAgB,CACxB,MADwB,EAExB,UAFwB,EAGxB,OAHwB,EAIxB,SAJwB,EAKxB,OALwB,EAMxB,OANwB,EAOxB,SAPwB,EAQxB,SARwB,CAAhB,CAFI;AAYdxC,MAAAA,KAAK,EAAEX,SAAS,CAAC+C,MAZH;AAadjC,MAAAA,KAAK,EAAEd,SAAS,CAAC+C,MAbH;AAcdhC,MAAAA,MAAM,EAAEf,SAAS,CAAC+C;AAdJ,KAAhB,CAVkB,CAApB,CADK,CAFO;AA+BdrB,IAAAA,WAAW,EAAE1B,SAAS,CAAC+C;AA/BT,GAAhB,CADQ,CAFc;AAqCxBd,EAAAA,MAAM,EAAEjC,SAAS,CAACiD,KAAV,CAAgB;AACtBd,IAAAA,IAAI,EAAEnC,SAAS,CAAC+C,MADM;AAEtBzB,IAAAA,IAAI,EAAEtB,SAAS,CAAC+C,MAFM;AAGtBb,IAAAA,OAAO,EAAElC,SAAS,CAACoD;AAHG,GAAhB;AArCgB,CAA1B;AA4CA,eAAed,aAAf","sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {NovaSolidComputersSdCard} from '@coorpacademy/nova-icons';\nimport Link from '../../atom/link';\nimport ContentBagde from '../../atom/content-badge';\nimport style from './style.css';\n\nconst buildItemsOfSection = items => {\n return items.map((item, index) => {\n const {type} = item;\n switch (type) {\n case 'mainElement':\n return (\n <li key={`${item.title}-${index}`}>\n <span className={style.title}>{item.title}</span>\n <span className={style.value}>{item.value}</span>\n </li>\n );\n case 'content': {\n const {category, label, title, author} = item;\n return (\n <li className={style.contentWrapper} key={`${title}-${index}`}>\n <span className={style.contentCounter}>{index + 1}</span>\n <div className={style.contentItem}>\n <div className={style.content}>\n <ContentBagde category={category} label={label} />\n <span\n className={style.contentTitle}\n title={title}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n </div>\n {author ? <span className={style.author}>{author}</span> : null}\n </div>\n </li>\n );\n }\n case 'text':\n default:\n return (\n <li key={`${item.text}-${index}`}>\n <span className={style.valueSimpleText}>{item.text}</span>\n </li>\n );\n }\n });\n};\n\nconst buildSectionHeader = section => {\n const {title, counterText} = section;\n if (!title) {\n return null;\n }\n return (\n <div className={style.sectionHeader}>\n <span className={style.title}>{title}</span>\n {counterText ? <span className={style.counterText}>{counterText}</span> : null}\n </div>\n );\n};\n\nconst buildSections = sections => {\n return sections.map((section, index) => {\n const sectionHeader = buildSectionHeader(section);\n const itemsView = buildItemsOfSection(section.items);\n return (\n <div key={`summary-section-${index}`} data-step={index} className={style.sectionWrapper}>\n {sectionHeader}\n <ul>{itemsView}</ul>\n </div>\n );\n });\n};\n\nconst buildAction = action => {\n if (!action) return null;\n\n const {onClick, text, icon} = action;\n const handleClick = useMemo(() => () => onClick(), [onClick]);\n return (\n <Link className={style.actionLink} onClick={handleClick}>\n {icon === 'draft' ? <NovaSolidComputersSdCard className={style.icon} /> : null}\n <span>{text}</span>\n </Link>\n );\n};\n\nconst WizardSummary = props => {\n const {title, sections, action} = props;\n\n const sectionView = buildSections(sections);\n const actionView = buildAction(action);\n\n return (\n <div className={style.container}>\n <span className={style.summaryTitle}>{title}</span>\n <div className={style.summary}>{sectionView}</div>\n <div className={style.actionZone}>{actionView}</div>\n </div>\n );\n};\n\nWizardSummary.propTypes = {\n title: PropTypes.string,\n sections: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string,\n items: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.shape({\n type: PropTypes.string,\n title: PropTypes.string,\n value: PropTypes.string\n }),\n PropTypes.shape({\n type: PropTypes.string,\n text: PropTypes.string\n }),\n PropTypes.shape({\n type: PropTypes.string,\n category: PropTypes.oneOf([\n 'base',\n 'advanced',\n 'coach',\n 'chapter',\n 'scorm',\n 'video',\n 'article',\n 'podcast'\n ]),\n title: PropTypes.string,\n label: PropTypes.string,\n author: PropTypes.string\n })\n ])\n ),\n counterText: PropTypes.string\n })\n ),\n action: PropTypes.shape({\n icon: PropTypes.string,\n text: PropTypes.string,\n onClick: PropTypes.func\n })\n};\n\nexport default WizardSummary;\n"],"file":"index.js"}
|
|
1
|
+
{"version":3,"sources":["../../../src/molecule/wizard-summary/index.js"],"names":["React","useMemo","PropTypes","classnames","NovaSolidComputersSdCard","SaveIcon","NovaCompositionNavigationArrowDown","ArrowDownIcon","Link","ContentBadge","style","buildItemsOfSection","items","map","item","index","type","title","value","category","label","author","unsaved","contentWrapper","contentCounter","contentItem","content","contentTitle","__html","text","valueSimpleText","buildSectionHeader","section","counterText","sectionHeader","buildSections","sections","itemsView","sectionWrapper","buildAction","action","onClick","icon","handleClick","actionLink","WizardSummary","props","sectionsView","actionView","idSwitch","container","desktopSummaryTitle","checkbox","summary","tabletSummaryHeader","tabletSummaryTitle","tabletSummaryIcon","summarySections","actionZone","propTypes","string","arrayOf","shape","oneOfType","bool","oneOf","func"],"mappings":"AAAA,OAAOA,KAAP,IAAeC,OAAf,QAA6B,OAA7B;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,SACEC,wBAAwB,IAAIC,QAD9B,EAEEC,kCAAkC,IAAIC,aAFxC,QAGO,0BAHP;AAIA,OAAOC,IAAP,MAAiB,iBAAjB;AACA,OAAOC,YAAP,MAAyB,0BAAzB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,mBAAmB,GAAGC,KAAK,IAAI;AACnC,SAAOA,KAAK,CAACC,GAAN,CAAU,CAACC,IAAD,EAAOC,KAAP,KAAiB;AAChC,UAAM;AAACC,MAAAA;AAAD,QAASF,IAAf;;AACA,YAAQE,IAAR;AACE,WAAK,aAAL;AACE,4BACE;AAAI,UAAA,GAAG,EAAG,GAAEF,IAAI,CAACG,KAAM,IAAGF,KAAM;AAAhC,wBACE;AAAM,UAAA,SAAS,EAAEL,KAAK,CAACO;AAAvB,WAA+BH,IAAI,CAACG,KAApC,CADF,eAEE;A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AAedtC,MAAAA,OAAO,EAAEpB,SAAS,CAAC8D;AAfL,KAAhB,CAXkB,CAApB,CADK,CAFO;AAiCd/B,IAAAA,WAAW,EAAE/B,SAAS,CAAC0D;AAjCT,GAAhB,CADQ,CAFc;AAuCxBpB,EAAAA,MAAM,EAAEtC,SAAS,CAAC4D,KAAV,CAAgB;AACtBpB,IAAAA,IAAI,EAAExC,SAAS,CAAC0D,MADM;AAEtB/B,IAAAA,IAAI,EAAE3B,SAAS,CAAC0D,MAFM;AAGtBnB,IAAAA,OAAO,EAAEvC,SAAS,CAACgE;AAHG,GAAhB;AAvCgB,CAA1B;AA8CA,eAAerB,aAAf","sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {\n NovaSolidComputersSdCard as SaveIcon,\n NovaCompositionNavigationArrowDown as ArrowDownIcon\n} from '@coorpacademy/nova-icons';\nimport Link from '../../atom/link';\nimport ContentBadge from '../../atom/content-badge';\nimport style from './style.css';\n\nconst buildItemsOfSection = items => {\n return items.map((item, index) => {\n const {type} = item;\n switch (type) {\n case 'mainElement':\n return (\n <li key={`${item.title}-${index}`}>\n <span className={style.title}>{item.title}</span>\n <span className={style.value}>{item.value}</span>\n </li>\n );\n case 'content': {\n const {category, label, title, author, unsaved = false} = item;\n return (\n <li className={style.contentWrapper} key={`${title}-${index}`}>\n <span className={style.contentCounter}>{index + 1}</span>\n <div className={style.contentItem}>\n <div className={style.content}>\n <ContentBadge category={category} label={label} />\n <span\n className={classnames(style.contentTitle, unsaved && style.unsaved)}\n title={title}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n </div>\n {author ? <span className={style.author}>{author}</span> : null}\n </div>\n </li>\n );\n }\n case 'text':\n default: {\n const {text, unsaved = false} = item;\n return (\n <li key={`${item.text}-${index}`}>\n <span className={classnames(style.valueSimpleText, unsaved && style.unsaved)}>\n {text}\n </span>\n </li>\n );\n }\n }\n });\n};\n\nconst buildSectionHeader = section => {\n const {title, counterText} = section;\n if (!title) {\n return null;\n }\n return (\n <div className={style.sectionHeader}>\n <span className={style.title}>{title}</span>\n {counterText ? <span className={style.counterText}>{counterText}</span> : null}\n </div>\n );\n};\n\nconst buildSections = sections => {\n return sections.map((section, index) => {\n const sectionHeader = buildSectionHeader(section);\n const itemsView = buildItemsOfSection(section.items);\n return (\n <div key={`summary-section-${index}`} data-step={index} className={style.sectionWrapper}>\n {sectionHeader}\n <ul>{itemsView}</ul>\n </div>\n );\n });\n};\n\nconst buildAction = action => {\n if (!action) return null;\n\n const {onClick, text, icon} = action;\n const handleClick = useMemo(() => () => onClick(), [onClick]);\n return (\n <Link className={style.actionLink} onClick={handleClick}>\n {icon === 'draft' ? <SaveIcon className={style.icon} /> : null}\n <span>{text}</span>\n </Link>\n );\n};\n\nconst WizardSummary = props => {\n const {title, sections, action} = props;\n const sectionsView = buildSections(sections);\n const actionView = buildAction(action);\n const idSwitch = 'open-summary-wizard';\n\n return (\n <div className={style.container}>\n <span className={style.desktopSummaryTitle}>{title}</span>\n <input\n type=\"checkbox\"\n id={idSwitch}\n name=\"toogle\"\n title={idSwitch}\n className={style.checkbox}\n />\n <div className={style.summary}>\n <div className={style.tabletSummaryHeader}>\n <label htmlFor={idSwitch}>\n <span className={style.tabletSummaryTitle}>{title}</span>\n <ArrowDownIcon className={style.tabletSummaryIcon} />\n </label>\n </div>\n <div className={style.summarySections}>{sectionsView}</div>\n </div>\n <div className={style.actionZone}>{actionView}</div>\n </div>\n );\n};\n\nWizardSummary.propTypes = {\n title: PropTypes.string,\n sections: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string,\n items: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.shape({\n type: PropTypes.string,\n title: PropTypes.string,\n value: PropTypes.string\n }),\n PropTypes.shape({\n type: PropTypes.string,\n text: PropTypes.string,\n unsaved: PropTypes.bool\n }),\n PropTypes.shape({\n type: PropTypes.string,\n category: PropTypes.oneOf([\n 'base',\n 'advanced',\n 'coach',\n 'chapter',\n 'scorm',\n 'video',\n 'article',\n 'podcast'\n ]),\n title: PropTypes.string,\n label: PropTypes.string,\n author: PropTypes.string,\n unsaved: PropTypes.bool\n })\n ])\n ),\n counterText: PropTypes.string\n })\n ),\n action: PropTypes.shape({\n icon: PropTypes.string,\n text: PropTypes.string,\n onClick: PropTypes.func\n })\n};\n\nexport default WizardSummary;\n"],"file":"index.js"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
@value colors: "../../variables/colors.css";
|
|
2
|
+
@value breakpoints: "../../variables/breakpoints.css";
|
|
3
|
+
@value cm_primary_blue from colors;
|
|
2
4
|
@value cm_grey_50 from colors;
|
|
3
5
|
@value cm_grey_300 from colors;
|
|
4
6
|
@value cm_grey_400 from colors;
|
|
@@ -8,10 +10,8 @@
|
|
|
8
10
|
@value cm_orange_200 from colors;
|
|
9
11
|
@value white from colors;
|
|
10
12
|
@value lightBlack from colors;
|
|
11
|
-
@value
|
|
12
|
-
@value
|
|
13
|
-
@value cm_red_video from colors;
|
|
14
|
-
@value cm_violet_podcast from colors;
|
|
13
|
+
@value cm_yellow_200 from colors;
|
|
14
|
+
@value cm_tablet from breakpoints;
|
|
15
15
|
|
|
16
16
|
.container {
|
|
17
17
|
font-family: Gilroy;
|
|
@@ -23,15 +23,27 @@
|
|
|
23
23
|
position: absolute;
|
|
24
24
|
top: 0px;
|
|
25
25
|
bottom: 0px;
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-direction: column;
|
|
26
28
|
}
|
|
27
29
|
|
|
28
30
|
.summary {
|
|
29
31
|
height: calc(100% - 90px);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.unsaved {
|
|
35
|
+
color: cm_yellow_200;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.summarySections {
|
|
39
|
+
height: 100%;
|
|
30
40
|
overflow: hidden auto;
|
|
31
41
|
}
|
|
32
42
|
|
|
33
43
|
.actionZone {
|
|
34
44
|
margin: 24px 0px 0px 0px;
|
|
45
|
+
display: flex;
|
|
46
|
+
justify-content: center;
|
|
35
47
|
}
|
|
36
48
|
|
|
37
49
|
.actionLink {
|
|
@@ -39,18 +51,23 @@
|
|
|
39
51
|
font-size: 14px;
|
|
40
52
|
font-style: normal;
|
|
41
53
|
font-weight: bold;
|
|
42
|
-
display: flex;
|
|
54
|
+
display: inline-flex;
|
|
43
55
|
justify-content: center;
|
|
44
56
|
align-items: center;
|
|
45
57
|
cursor: pointer;
|
|
46
58
|
}
|
|
47
59
|
|
|
60
|
+
.actionLink:hover {
|
|
61
|
+
color: cm_primary_blue;
|
|
62
|
+
}
|
|
63
|
+
|
|
48
64
|
.icon {
|
|
49
65
|
width: 14px;
|
|
50
66
|
height: 14px;
|
|
67
|
+
margin: 0 8px 0 0;
|
|
51
68
|
}
|
|
52
69
|
|
|
53
|
-
.
|
|
70
|
+
.desktopSummaryTitle {
|
|
54
71
|
font-family: 'Gilroy';
|
|
55
72
|
font-style: normal;
|
|
56
73
|
font-weight: bold;
|
|
@@ -60,8 +77,12 @@
|
|
|
60
77
|
display: block;
|
|
61
78
|
}
|
|
62
79
|
|
|
80
|
+
.tabletSummaryHeader {
|
|
81
|
+
display: none;
|
|
82
|
+
}
|
|
83
|
+
|
|
63
84
|
.sectionWrapper {
|
|
64
|
-
margin: 32px 0px
|
|
85
|
+
margin: 32px 0px 32px 0px;
|
|
65
86
|
}
|
|
66
87
|
|
|
67
88
|
.sectionWrapper:first-child {
|
|
@@ -148,3 +169,79 @@ ul {
|
|
|
148
169
|
font-style: normal;
|
|
149
170
|
color: cm_grey_300;
|
|
150
171
|
}
|
|
172
|
+
|
|
173
|
+
.checkbox {
|
|
174
|
+
display: none;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
@media cm_tablet {
|
|
178
|
+
.container {
|
|
179
|
+
background-color: transparent;
|
|
180
|
+
width: calc(100% - 64px);
|
|
181
|
+
left: 0px;
|
|
182
|
+
right: 0px;
|
|
183
|
+
flex-direction: row;
|
|
184
|
+
align-items: flex-end;
|
|
185
|
+
padding: 0px 32px 0px 32px;
|
|
186
|
+
margin: 0px;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.desktopSummaryTitle {
|
|
190
|
+
display: none;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.tabletSummaryHeader {
|
|
194
|
+
display: flex;
|
|
195
|
+
justify-content: space-between;
|
|
196
|
+
font-size: 14px;
|
|
197
|
+
font-weight: bold;
|
|
198
|
+
padding: 0px 0px 32px 0px;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.summary {
|
|
202
|
+
width: calc(65% - 48px);
|
|
203
|
+
background-color: cm_grey_50;
|
|
204
|
+
border-radius: 7px;
|
|
205
|
+
height: 20px;
|
|
206
|
+
padding: 12px 24px 12px 24px;
|
|
207
|
+
transition: all 0.5s ease;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.actionZone {
|
|
211
|
+
width: 35%;
|
|
212
|
+
display: flex;
|
|
213
|
+
justify-content: center;
|
|
214
|
+
margin: 0px 0px 12px 0px;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.sectionWrapper:first-child {
|
|
218
|
+
margin: 0px;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
label {
|
|
222
|
+
width: 100%;
|
|
223
|
+
right: 0px;
|
|
224
|
+
display: flex;
|
|
225
|
+
flex-direction: row;
|
|
226
|
+
cursor: pointer;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
label .tabletSummaryTitle{
|
|
230
|
+
flex: 0 1 100%;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
label .tabletSummaryIcon{
|
|
234
|
+
width: 12px;
|
|
235
|
+
transition: all 0.5s ease;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.checkbox:checked + .summary {
|
|
239
|
+
height: 65%;
|
|
240
|
+
padding: 24px;
|
|
241
|
+
box-shadow: 0 -6px 42px -14px rgba(0, 0, 0, 0.25);
|
|
242
|
+
transition: all 0.5s ease;
|
|
243
|
+
}
|
|
244
|
+
.checkbox:checked + .summary .tabletSummaryIcon {
|
|
245
|
+
transform: rotateZ(180deg);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
@@ -21,15 +21,20 @@ export default {
|
|
|
21
21
|
text: '🇪🇸 Spanish'
|
|
22
22
|
}, {
|
|
23
23
|
type: 'text',
|
|
24
|
-
text: '🇮🇹 Italian'
|
|
24
|
+
text: '🇮🇹 Italian',
|
|
25
|
+
unsaved: true
|
|
25
26
|
}]
|
|
26
27
|
}, {
|
|
27
28
|
title: 'Populations',
|
|
28
29
|
items: [{
|
|
29
30
|
type: 'text',
|
|
30
31
|
text: 'Population 2'
|
|
32
|
+
}, {
|
|
33
|
+
type: 'text',
|
|
34
|
+
text: 'Population 1',
|
|
35
|
+
unsaved: true
|
|
31
36
|
}],
|
|
32
|
-
counterText: '
|
|
37
|
+
counterText: '2 population'
|
|
33
38
|
}, {
|
|
34
39
|
title: 'Courses',
|
|
35
40
|
items: [{
|
|
@@ -43,7 +48,8 @@ export default {
|
|
|
43
48
|
title: 'Markteting and online advertising',
|
|
44
49
|
category: 'base',
|
|
45
50
|
label: 'Base',
|
|
46
|
-
author: 'Coorpacademy'
|
|
51
|
+
author: 'Coorpacademy',
|
|
52
|
+
unsaved: true
|
|
47
53
|
}, {
|
|
48
54
|
type: 'content',
|
|
49
55
|
title: 'Faire une offre',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/molecule/wizard-summary/test/fixtures/default.js"],"names":["props","title","sections","items","type","value","text","counterText","category","label","author","action","icon","onClick","console","log"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,uBADF;AAELC,IAAAA,QAAQ,EAAE,CACR;AACEC,MAAAA,KAAK,EAAE,CACL;AACEC,QAAAA,IAAI,EAAE,aADR;AAEEH,QAAAA,KAAK,EAAE,UAFT;AAGEI,QAAAA,KAAK,EAAE;AAHT,OADK,EAML;AACED,QAAAA,IAAI,EAAE,aADR;AAEEH,QAAAA,KAAK,EAAE,MAFT;AAGEI,QAAAA,KAAK,EAAE;AAHT,OANK;AADT,KADQ,EAeR;AACEJ,MAAAA,KAAK,EAAE,aADT;AAEEE,MAAAA,KAAK,EAAE,CACL;AACEC,QAAAA,IAAI,EAAE,MADR;AAEEE,QAAAA,IAAI,EAAE;AAFR,OADK,EAKL;AACEF,QAAAA,IAAI,EAAE,MADR;AAEEE,QAAAA,IAAI,EAAE;AAFR,OALK,EASL;AACEF,QAAAA,IAAI,EAAE,MADR;AAEEE,QAAAA,IAAI,EAAE;
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/wizard-summary/test/fixtures/default.js"],"names":["props","title","sections","items","type","value","text","unsaved","counterText","category","label","author","action","icon","onClick","console","log"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,uBADF;AAELC,IAAAA,QAAQ,EAAE,CACR;AACEC,MAAAA,KAAK,EAAE,CACL;AACEC,QAAAA,IAAI,EAAE,aADR;AAEEH,QAAAA,KAAK,EAAE,UAFT;AAGEI,QAAAA,KAAK,EAAE;AAHT,OADK,EAML;AACED,QAAAA,IAAI,EAAE,aADR;AAEEH,QAAAA,KAAK,EAAE,MAFT;AAGEI,QAAAA,KAAK,EAAE;AAHT,OANK;AADT,KADQ,EAeR;AACEJ,MAAAA,KAAK,EAAE,aADT;AAEEE,MAAAA,KAAK,EAAE,CACL;AACEC,QAAAA,IAAI,EAAE,MADR;AAEEE,QAAAA,IAAI,EAAE;AAFR,OADK,EAKL;AACEF,QAAAA,IAAI,EAAE,MADR;AAEEE,QAAAA,IAAI,EAAE;AAFR,OALK,EASL;AACEF,QAAAA,IAAI,EAAE,MADR;AAEEE,QAAAA,IAAI,EAAE,cAFR;AAGEC,QAAAA,OAAO,EAAE;AAHX,OATK;AAFT,KAfQ,EAiCR;AAC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;AAKEC,QAAAA,MAAM,EAAE;AALV,OAhFK,CAFT;AA0FEH,MAAAA,WAAW,EAAE;AA1Ff,KAhDQ,CAFL;AA+ILI,IAAAA,MAAM,EAAE;AACNC,MAAAA,IAAI,EAAE,OADA;AAENP,MAAAA,IAAI,EAAE,gBAFA;AAGNQ,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,MAAZ;AAHT;AA/IH;AADM,CAAf","sourcesContent":["export default {\n props: {\n title: 'Certification summary',\n sections: [\n {\n items: [\n {\n type: 'mainElement',\n title: 'Language',\n value: '🇬🇧 English'\n },\n {\n type: 'mainElement',\n title: 'Name',\n value: 'Marketing expert'\n }\n ]\n },\n {\n title: 'Translation',\n items: [\n {\n type: 'text',\n text: '🇫🇷 French'\n },\n {\n type: 'text',\n text: '🇪🇸 Spanish'\n },\n {\n type: 'text',\n text: '🇮🇹 Italian',\n unsaved: true\n }\n ]\n },\n {\n title: 'Populations',\n items: [\n {\n type: 'text',\n text: 'Population 2'\n },\n {\n type: 'text',\n text: 'Population 1',\n unsaved: true\n }\n ],\n counterText: '2 population'\n },\n {\n title: 'Courses',\n items: [\n {\n type: 'content',\n title: 'Learn Everywhere #10 : Inclusion, Diversité, et autre élements importants',\n category: 'video',\n label: 'Video',\n author: 'Coorpacademy, Faurecia University'\n },\n {\n type: 'content',\n title: 'Markteting and online advertising',\n category: 'base',\n label: 'Base',\n author: 'Coorpacademy',\n unsaved: true\n },\n {\n type: 'content',\n title: 'Faire une offre',\n category: 'chapter',\n label: \"5' learning\",\n author: 'Global Exam'\n },\n {\n type: 'content',\n title: 'Cluedo: Meurtre sur Skill Island',\n category: 'advanced',\n label: 'Advanced',\n author: 'Coorpacademy'\n },\n {\n type: 'content',\n title:\n 'Learn <b>Everywhere #10</b> : <u>Inclusion, Diversité</u>, et autre élements importants',\n category: 'video',\n label: 'Video',\n author: 'Coorpacademy, Faurecia University'\n },\n {\n type: 'content',\n title: 'Mesurer la satisfaction client',\n category: 'coach',\n label: 'Coach',\n author: 'Dunod Formation'\n },\n {\n type: 'content',\n title: 'Cluedo: Meurtre sur Skill Island',\n category: 'advanced',\n label: 'Advanced',\n author: 'Coorpacademy'\n },\n {\n type: 'content',\n title: 'Suspects - épisode 1',\n category: 'scorm',\n label: 'Interactive slides',\n author: 'Coorpacademy'\n },\n {\n type: 'content',\n title: '<p align=\"right\"> وضع النصوص بالتصاميم سواء كانت تصاميم مطبوعه</p>',\n category: 'coach',\n label: 'Coach',\n author: 'Dunod Formation'\n },\n {\n type: 'content',\n title: 'Cluedo: Meurtre sur Skill Island',\n category: 'advanced',\n label: 'Advanced',\n author: 'Coorpacademy'\n },\n {\n type: 'content',\n title: 'Suspects - épisode 1',\n category: 'scorm',\n label: 'Interactive slides',\n author: 'Coorpacademy'\n },\n {\n type: 'content',\n title: 'Mesurer la satisfaction client',\n category: 'coach',\n label: 'Coach',\n author: 'Dunod Formation'\n }\n ],\n counterText: '12 courses'\n }\n ],\n action: {\n icon: 'draft',\n text: 'Save in drafts',\n onClick: () => console.log('save')\n }\n }\n};\n"],"file":"default.js"}
|