@coorpacademy/components 11.18.3 → 11.18.4-alpha.0
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/title/types.d.ts +9 -0
- package/es/atom/title/types.d.ts.map +1 -0
- package/es/atom/title/types.js +2 -0
- package/es/atom/title/types.js.map +1 -0
- package/es/molecule/card/index.d.ts.map +1 -1
- package/es/molecule/card/index.js +10 -9
- package/es/molecule/card/index.js.map +1 -1
- package/es/molecule/card/style.css +41 -5
- package/es/molecule/cm-popin/index.d.ts.map +1 -1
- package/es/molecule/cm-popin/index.js +45 -9
- package/es/molecule/cm-popin/index.js.map +1 -1
- package/es/molecule/cm-popin/style.css +29 -0
- package/es/molecule/cm-popin/types.d.ts +31 -1
- package/es/molecule/cm-popin/types.d.ts.map +1 -1
- package/es/molecule/cm-popin/types.js +13 -3
- package/es/molecule/cm-popin/types.js.map +1 -1
- package/es/template/app-player/loading/index.d.ts +19 -1
- package/es/template/app-player/player/index.d.ts +38 -2
- package/es/template/app-player/player/slides/index.d.ts +19 -1
- package/es/template/app-player/player/slides/index.d.ts.map +1 -1
- package/es/template/app-player/popin-correction/index.d.ts +19 -1
- package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/es/template/app-player/popin-end/index.d.ts +19 -1
- package/es/template/app-review/index.d.ts +19 -1
- package/es/template/app-review/index.d.ts.map +1 -1
- package/es/template/app-review/player/prop-types.d.ts +19 -1
- package/es/template/app-review/player/prop-types.d.ts.map +1 -1
- package/es/template/app-review/prop-types.d.ts +19 -1
- package/es/template/app-review/prop-types.d.ts.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +19 -1
- package/es/template/common/dashboard/index.d.ts +19 -1
- package/es/template/external-course/index.d.ts +19 -1
- package/es/variables/colors.css +1 -1
- package/lib/atom/title/types.d.ts +9 -0
- package/lib/atom/title/types.d.ts.map +1 -0
- package/lib/atom/title/types.js +2 -0
- package/lib/atom/title/types.js.map +1 -0
- package/lib/molecule/card/index.d.ts.map +1 -1
- package/lib/molecule/card/index.js +9 -7
- package/lib/molecule/card/index.js.map +1 -1
- package/lib/molecule/card/style.css +41 -5
- package/lib/molecule/cm-popin/index.d.ts.map +1 -1
- package/lib/molecule/cm-popin/index.js +47 -8
- package/lib/molecule/cm-popin/index.js.map +1 -1
- package/lib/molecule/cm-popin/style.css +29 -0
- package/lib/molecule/cm-popin/types.d.ts +31 -1
- package/lib/molecule/cm-popin/types.d.ts.map +1 -1
- package/lib/molecule/cm-popin/types.js +15 -3
- package/lib/molecule/cm-popin/types.js.map +1 -1
- package/lib/template/app-player/loading/index.d.ts +19 -1
- package/lib/template/app-player/player/index.d.ts +38 -2
- package/lib/template/app-player/player/slides/index.d.ts +19 -1
- package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-correction/index.d.ts +19 -1
- package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-end/index.d.ts +19 -1
- package/lib/template/app-review/index.d.ts +19 -1
- package/lib/template/app-review/index.d.ts.map +1 -1
- package/lib/template/app-review/player/prop-types.d.ts +19 -1
- package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
- package/lib/template/app-review/prop-types.d.ts +19 -1
- package/lib/template/app-review/prop-types.d.ts.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +19 -1
- package/lib/template/common/dashboard/index.d.ts +19 -1
- package/lib/template/external-course/index.d.ts +19 -1
- package/lib/variables/colors.css +1 -1
- package/package.json +3 -3
|
@@ -58,7 +58,18 @@ declare namespace SlidePlayer {
|
|
|
58
58
|
popinError: PropTypes.Requireable<PropTypes.InferProps<{
|
|
59
59
|
content: PropTypes.Requireable<string>;
|
|
60
60
|
mode: PropTypes.Requireable<string>;
|
|
61
|
-
header: PropTypes.Requireable<
|
|
61
|
+
header: PropTypes.Requireable<PropTypes.InferProps<{
|
|
62
|
+
title: PropTypes.Requireable<PropTypes.InferProps<{
|
|
63
|
+
title: PropTypes.Requireable<string>;
|
|
64
|
+
subtitle: PropTypes.Requireable<string>;
|
|
65
|
+
type: PropTypes.Requireable<string>;
|
|
66
|
+
'data-name': PropTypes.Requireable<string>;
|
|
67
|
+
titleSize: PropTypes.Requireable<string>;
|
|
68
|
+
subtitleSize: PropTypes.Requireable<string>;
|
|
69
|
+
}>>;
|
|
70
|
+
headerIcon: PropTypes.Requireable<string>;
|
|
71
|
+
backgroundImage: PropTypes.Requireable<string>;
|
|
72
|
+
}>>;
|
|
62
73
|
firstButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
63
74
|
label: PropTypes.Requireable<string>;
|
|
64
75
|
handleOnclick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -106,12 +117,30 @@ declare namespace SlidePlayer {
|
|
|
106
117
|
'data-name': PropTypes.Requireable<string>;
|
|
107
118
|
requiredSelection: PropTypes.Requireable<boolean>;
|
|
108
119
|
}> | null | undefined)[]>;
|
|
120
|
+
items: PropTypes.Requireable<PropTypes.InferProps<{
|
|
121
|
+
type: PropTypes.Requireable<string>;
|
|
122
|
+
list: PropTypes.Requireable<PropTypes.InferProps<{
|
|
123
|
+
list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
|
|
124
|
+
loading: PropTypes.Requireable<boolean>;
|
|
125
|
+
}>>;
|
|
126
|
+
}>>;
|
|
109
127
|
}>>;
|
|
110
128
|
}>>;
|
|
111
129
|
const popin: PropTypes.Requireable<PropTypes.InferProps<{
|
|
112
130
|
content: PropTypes.Requireable<string>;
|
|
113
131
|
mode: PropTypes.Requireable<string>;
|
|
114
|
-
header: PropTypes.Requireable<
|
|
132
|
+
header: PropTypes.Requireable<PropTypes.InferProps<{
|
|
133
|
+
title: PropTypes.Requireable<PropTypes.InferProps<{
|
|
134
|
+
title: PropTypes.Requireable<string>;
|
|
135
|
+
subtitle: PropTypes.Requireable<string>;
|
|
136
|
+
type: PropTypes.Requireable<string>;
|
|
137
|
+
'data-name': PropTypes.Requireable<string>;
|
|
138
|
+
titleSize: PropTypes.Requireable<string>;
|
|
139
|
+
subtitleSize: PropTypes.Requireable<string>;
|
|
140
|
+
}>>;
|
|
141
|
+
headerIcon: PropTypes.Requireable<string>;
|
|
142
|
+
backgroundImage: PropTypes.Requireable<string>;
|
|
143
|
+
}>>;
|
|
115
144
|
firstButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
116
145
|
label: PropTypes.Requireable<string>;
|
|
117
146
|
handleOnclick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -159,6 +188,13 @@ declare namespace SlidePlayer {
|
|
|
159
188
|
'data-name': PropTypes.Requireable<string>;
|
|
160
189
|
requiredSelection: PropTypes.Requireable<boolean>;
|
|
161
190
|
}> | null | undefined)[]>;
|
|
191
|
+
items: PropTypes.Requireable<PropTypes.InferProps<{
|
|
192
|
+
type: PropTypes.Requireable<string>;
|
|
193
|
+
list: PropTypes.Requireable<PropTypes.InferProps<{
|
|
194
|
+
list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
|
|
195
|
+
loading: PropTypes.Requireable<boolean>;
|
|
196
|
+
}>>;
|
|
197
|
+
}>>;
|
|
162
198
|
}>>;
|
|
163
199
|
}
|
|
164
200
|
}
|
|
@@ -64,7 +64,18 @@ declare namespace SlidesPlayer {
|
|
|
64
64
|
export const popinError: PropTypes.Requireable<PropTypes.InferProps<{
|
|
65
65
|
content: PropTypes.Requireable<string>;
|
|
66
66
|
mode: PropTypes.Requireable<string>;
|
|
67
|
-
header: PropTypes.Requireable<
|
|
67
|
+
header: PropTypes.Requireable<PropTypes.InferProps<{
|
|
68
|
+
title: PropTypes.Requireable<PropTypes.InferProps<{
|
|
69
|
+
title: PropTypes.Requireable<string>;
|
|
70
|
+
subtitle: PropTypes.Requireable<string>;
|
|
71
|
+
type: PropTypes.Requireable<string>;
|
|
72
|
+
'data-name': PropTypes.Requireable<string>;
|
|
73
|
+
titleSize: PropTypes.Requireable<string>;
|
|
74
|
+
subtitleSize: PropTypes.Requireable<string>;
|
|
75
|
+
}>>;
|
|
76
|
+
headerIcon: PropTypes.Requireable<string>;
|
|
77
|
+
backgroundImage: PropTypes.Requireable<string>;
|
|
78
|
+
}>>;
|
|
68
79
|
firstButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
69
80
|
label: PropTypes.Requireable<string>;
|
|
70
81
|
handleOnclick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -112,6 +123,13 @@ declare namespace SlidesPlayer {
|
|
|
112
123
|
'data-name': PropTypes.Requireable<string>;
|
|
113
124
|
requiredSelection: PropTypes.Requireable<boolean>;
|
|
114
125
|
}> | null | undefined)[]>;
|
|
126
|
+
items: PropTypes.Requireable<PropTypes.InferProps<{
|
|
127
|
+
type: PropTypes.Requireable<string>;
|
|
128
|
+
list: PropTypes.Requireable<PropTypes.InferProps<{
|
|
129
|
+
list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
|
|
130
|
+
loading: PropTypes.Requireable<boolean>;
|
|
131
|
+
}>>;
|
|
132
|
+
}>>;
|
|
115
133
|
}>>;
|
|
116
134
|
}
|
|
117
135
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/template/app-player/player/slides/index.js"],"names":[],"mappings":";AA4aA,qEAkBC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/template/app-player/player/slides/index.js"],"names":[],"mappings":";AA4aA,qEAkBC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA1ID;;uBAyBC;;;;;;;;;;;;;;;;;;;;;;;;;AAlPD;;;gBAaC;;;;;;;;;;;;;AAyDD;;;gBAAoF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAhHpF,oEAQC;;;;;;;;;AA6MD;;gBAiBC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA/GD,qEAaC"}
|
|
@@ -92,7 +92,18 @@ declare class PopinCorrection extends React.Component<any, any, any> {
|
|
|
92
92
|
popinError: PropTypes.Requireable<PropTypes.InferProps<{
|
|
93
93
|
content: PropTypes.Requireable<string>;
|
|
94
94
|
mode: PropTypes.Requireable<string>;
|
|
95
|
-
header: PropTypes.Requireable<
|
|
95
|
+
header: PropTypes.Requireable<PropTypes.InferProps<{
|
|
96
|
+
title: PropTypes.Requireable<PropTypes.InferProps<{
|
|
97
|
+
title: PropTypes.Requireable<string>;
|
|
98
|
+
subtitle: PropTypes.Requireable<string>;
|
|
99
|
+
type: PropTypes.Requireable<string>;
|
|
100
|
+
'data-name': PropTypes.Requireable<string>;
|
|
101
|
+
titleSize: PropTypes.Requireable<string>;
|
|
102
|
+
subtitleSize: PropTypes.Requireable<string>;
|
|
103
|
+
}>>;
|
|
104
|
+
headerIcon: PropTypes.Requireable<string>;
|
|
105
|
+
backgroundImage: PropTypes.Requireable<string>;
|
|
106
|
+
}>>;
|
|
96
107
|
firstButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
97
108
|
label: PropTypes.Requireable<string>;
|
|
98
109
|
handleOnclick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -140,6 +151,13 @@ declare class PopinCorrection extends React.Component<any, any, any> {
|
|
|
140
151
|
'data-name': PropTypes.Requireable<string>;
|
|
141
152
|
requiredSelection: PropTypes.Requireable<boolean>;
|
|
142
153
|
}> | null | undefined)[]>;
|
|
154
|
+
items: PropTypes.Requireable<PropTypes.InferProps<{
|
|
155
|
+
type: PropTypes.Requireable<string>;
|
|
156
|
+
list: PropTypes.Requireable<PropTypes.InferProps<{
|
|
157
|
+
list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
|
|
158
|
+
loading: PropTypes.Requireable<boolean>;
|
|
159
|
+
}>>;
|
|
160
|
+
}>>;
|
|
143
161
|
}>>;
|
|
144
162
|
};
|
|
145
163
|
static contextTypes: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/app-player/popin-correction/index.js"],"names":[],"mappings":";AAmGA;IACE
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/app-player/popin-correction/index.js"],"names":[],"mappings":";AAmGA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAmBE;IAEF;;;;;;;;;;;;;;;;;;;;;;MAEE;IAEF,wBAIC;IAFC;;MAA0B;IAkB5B,gCAEC;IAhBD,0BAEC;IAED,kBAQC;IALC,gCAIE;IAIF,aAAsB;IAGxB,sBAsEC;CACF"}
|
|
@@ -132,7 +132,18 @@ declare namespace PopinEnd {
|
|
|
132
132
|
const popinError: PropTypes.Requireable<PropTypes.InferProps<{
|
|
133
133
|
content: PropTypes.Requireable<string>;
|
|
134
134
|
mode: PropTypes.Requireable<string>;
|
|
135
|
-
header: PropTypes.Requireable<
|
|
135
|
+
header: PropTypes.Requireable<PropTypes.InferProps<{
|
|
136
|
+
title: PropTypes.Requireable<PropTypes.InferProps<{
|
|
137
|
+
title: PropTypes.Requireable<string>;
|
|
138
|
+
subtitle: PropTypes.Requireable<string>;
|
|
139
|
+
type: PropTypes.Requireable<string>;
|
|
140
|
+
'data-name': PropTypes.Requireable<string>;
|
|
141
|
+
titleSize: PropTypes.Requireable<string>;
|
|
142
|
+
subtitleSize: PropTypes.Requireable<string>;
|
|
143
|
+
}>>;
|
|
144
|
+
headerIcon: PropTypes.Requireable<string>;
|
|
145
|
+
backgroundImage: PropTypes.Requireable<string>;
|
|
146
|
+
}>>;
|
|
136
147
|
firstButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
137
148
|
label: PropTypes.Requireable<string>;
|
|
138
149
|
handleOnclick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -180,6 +191,13 @@ declare namespace PopinEnd {
|
|
|
180
191
|
'data-name': PropTypes.Requireable<string>;
|
|
181
192
|
requiredSelection: PropTypes.Requireable<boolean>;
|
|
182
193
|
}> | null | undefined)[]>;
|
|
194
|
+
items: PropTypes.Requireable<PropTypes.InferProps<{
|
|
195
|
+
type: PropTypes.Requireable<string>;
|
|
196
|
+
list: PropTypes.Requireable<PropTypes.InferProps<{
|
|
197
|
+
list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
|
|
198
|
+
loading: PropTypes.Requireable<boolean>;
|
|
199
|
+
}>>;
|
|
200
|
+
}>>;
|
|
183
201
|
}>>;
|
|
184
202
|
}
|
|
185
203
|
}
|
|
@@ -509,7 +509,18 @@ declare const AppReview: {
|
|
|
509
509
|
quitPopin: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
510
510
|
content: import("prop-types").Requireable<string>;
|
|
511
511
|
mode: import("prop-types").Requireable<string>;
|
|
512
|
-
header: import("prop-types").Requireable<
|
|
512
|
+
header: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
513
|
+
title: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
514
|
+
title: import("prop-types").Requireable<string>;
|
|
515
|
+
subtitle: import("prop-types").Requireable<string>;
|
|
516
|
+
type: import("prop-types").Requireable<string>;
|
|
517
|
+
'data-name': import("prop-types").Requireable<string>;
|
|
518
|
+
titleSize: import("prop-types").Requireable<string>;
|
|
519
|
+
subtitleSize: import("prop-types").Requireable<string>;
|
|
520
|
+
}>>;
|
|
521
|
+
headerIcon: import("prop-types").Requireable<string>;
|
|
522
|
+
backgroundImage: import("prop-types").Requireable<string>;
|
|
523
|
+
}>>;
|
|
513
524
|
firstButton: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
514
525
|
label: import("prop-types").Requireable<string>;
|
|
515
526
|
handleOnclick: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
@@ -557,6 +568,13 @@ declare const AppReview: {
|
|
|
557
568
|
'data-name': import("prop-types").Requireable<string>;
|
|
558
569
|
requiredSelection: import("prop-types").Requireable<boolean>;
|
|
559
570
|
}> | null | undefined)[]>;
|
|
571
|
+
items: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
572
|
+
type: import("prop-types").Requireable<string>;
|
|
573
|
+
list: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
574
|
+
list: import("prop-types").Requireable<(import("prop-types").InferProps<any> | null | undefined)[]>;
|
|
575
|
+
loading: import("prop-types").Requireable<boolean>;
|
|
576
|
+
}>>;
|
|
577
|
+
}>>;
|
|
560
578
|
}>>;
|
|
561
579
|
}>>;
|
|
562
580
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/app-review/index.tsx"],"names":[],"mappings":";AAGA,OAAkB,EAAC,cAAc,EAAC,MAAM,cAAc,CAAC;AAEvD,QAAA,MAAM,SAAS;2BAAwB,cAAc
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/app-review/index.tsx"],"names":[],"mappings":";AAGA,OAAkB,EAAC,cAAc,EAAC,MAAM,cAAc,CAAC;AAEvD,QAAA,MAAM,SAAS;2BAAwB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOpD,CAAC;AAIF,eAAe,SAAS,CAAC"}
|
|
@@ -509,7 +509,18 @@ declare const propTypes: {
|
|
|
509
509
|
quitPopin: PropTypes.Requireable<PropTypes.InferProps<{
|
|
510
510
|
content: PropTypes.Requireable<string>;
|
|
511
511
|
mode: PropTypes.Requireable<string>;
|
|
512
|
-
header: PropTypes.Requireable<
|
|
512
|
+
header: PropTypes.Requireable<PropTypes.InferProps<{
|
|
513
|
+
title: PropTypes.Requireable<PropTypes.InferProps<{
|
|
514
|
+
title: PropTypes.Requireable<string>;
|
|
515
|
+
subtitle: PropTypes.Requireable<string>;
|
|
516
|
+
type: PropTypes.Requireable<string>;
|
|
517
|
+
'data-name': PropTypes.Requireable<string>;
|
|
518
|
+
titleSize: PropTypes.Requireable<string>;
|
|
519
|
+
subtitleSize: PropTypes.Requireable<string>;
|
|
520
|
+
}>>;
|
|
521
|
+
headerIcon: PropTypes.Requireable<string>;
|
|
522
|
+
backgroundImage: PropTypes.Requireable<string>;
|
|
523
|
+
}>>;
|
|
513
524
|
firstButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
514
525
|
label: PropTypes.Requireable<string>;
|
|
515
526
|
handleOnclick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -557,6 +568,13 @@ declare const propTypes: {
|
|
|
557
568
|
'data-name': PropTypes.Requireable<string>;
|
|
558
569
|
requiredSelection: PropTypes.Requireable<boolean>;
|
|
559
570
|
}> | null | undefined)[]>;
|
|
571
|
+
items: PropTypes.Requireable<PropTypes.InferProps<{
|
|
572
|
+
type: PropTypes.Requireable<string>;
|
|
573
|
+
list: PropTypes.Requireable<PropTypes.InferProps<{
|
|
574
|
+
list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
|
|
575
|
+
loading: PropTypes.Requireable<boolean>;
|
|
576
|
+
}>>;
|
|
577
|
+
}>>;
|
|
560
578
|
}>>;
|
|
561
579
|
};
|
|
562
580
|
export default propTypes;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../../src/template/app-review/player/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,cAAc,CAAC;AACtD,OAAO,EAAC,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAC9D,OAAgC,EAC9B,mBAAmB,EACpB,MAAM,8CAA8C,CAAC;AAEtD,OAA8B,EAAC,WAAW,EAAC,MAAM,uCAAuC,CAAC;AAEzF,OAA+B,EAC7B,gBAAgB,EACjB,MAAM,oDAAoD,CAAC;AAE5D,QAAA,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../../src/template/app-review/player/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,cAAc,CAAC;AACtD,OAAO,EAAC,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAC9D,OAAgC,EAC9B,mBAAmB,EACpB,MAAM,8CAA8C,CAAC;AAEtD,OAA8B,EAAC,WAAW,EAAC,MAAM,uCAAuC,CAAC;AAEzF,OAA+B,EAC7B,gBAAgB,EACjB,MAAM,oDAAoD,CAAC;AAE5D,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKd,CAAC;AAEF,eAAe,SAAS,CAAC;AAEzB,oBAAY,iBAAiB,GAAG;IAC9B,MAAM,EAAE,WAAW,CAAC;IACpB,KAAK,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAC/B,eAAe,CAAC,EAAE,mBAAmB,CAAC;IACtC,QAAQ,CAAC,EAAE,mBAAmB,CAAC;IAC/B,SAAS,CAAC,EAAE,YAAY,CAAC;CAC1B,CAAC"}
|
|
@@ -513,7 +513,18 @@ declare const propTypes: {
|
|
|
513
513
|
quitPopin: PropTypes.Requireable<PropTypes.InferProps<{
|
|
514
514
|
content: PropTypes.Requireable<string>;
|
|
515
515
|
mode: PropTypes.Requireable<string>;
|
|
516
|
-
header: PropTypes.Requireable<
|
|
516
|
+
header: PropTypes.Requireable<PropTypes.InferProps<{
|
|
517
|
+
title: PropTypes.Requireable<PropTypes.InferProps<{
|
|
518
|
+
title: PropTypes.Requireable<string>;
|
|
519
|
+
subtitle: PropTypes.Requireable<string>;
|
|
520
|
+
type: PropTypes.Requireable<string>;
|
|
521
|
+
'data-name': PropTypes.Requireable<string>;
|
|
522
|
+
titleSize: PropTypes.Requireable<string>;
|
|
523
|
+
subtitleSize: PropTypes.Requireable<string>;
|
|
524
|
+
}>>;
|
|
525
|
+
headerIcon: PropTypes.Requireable<string>;
|
|
526
|
+
backgroundImage: PropTypes.Requireable<string>;
|
|
527
|
+
}>>;
|
|
517
528
|
firstButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
518
529
|
label: PropTypes.Requireable<string>;
|
|
519
530
|
handleOnclick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -561,6 +572,13 @@ declare const propTypes: {
|
|
|
561
572
|
'data-name': PropTypes.Requireable<string>;
|
|
562
573
|
requiredSelection: PropTypes.Requireable<boolean>;
|
|
563
574
|
}> | null | undefined)[]>;
|
|
575
|
+
items: PropTypes.Requireable<PropTypes.InferProps<{
|
|
576
|
+
type: PropTypes.Requireable<string>;
|
|
577
|
+
list: PropTypes.Requireable<PropTypes.InferProps<{
|
|
578
|
+
list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
|
|
579
|
+
loading: PropTypes.Requireable<boolean>;
|
|
580
|
+
}>>;
|
|
581
|
+
}>>;
|
|
564
582
|
}>>;
|
|
565
583
|
}>>;
|
|
566
584
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/template/app-review/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AAEtD,oBAAY,QAAQ,GAAG,QAAQ,GAAG,QAAQ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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGd,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -1204,7 +1204,18 @@ declare namespace BrandUpdate {
|
|
|
1204
1204
|
export const popin: PropTypes.Requireable<PropTypes.InferProps<{
|
|
1205
1205
|
content: PropTypes.Requireable<string>;
|
|
1206
1206
|
mode: PropTypes.Requireable<string>;
|
|
1207
|
-
header: PropTypes.Requireable<
|
|
1207
|
+
header: PropTypes.Requireable<PropTypes.InferProps<{
|
|
1208
|
+
title: PropTypes.Requireable<PropTypes.InferProps<{
|
|
1209
|
+
title: PropTypes.Requireable<string>;
|
|
1210
|
+
subtitle: PropTypes.Requireable<string>;
|
|
1211
|
+
type: PropTypes.Requireable<string>;
|
|
1212
|
+
'data-name': PropTypes.Requireable<string>;
|
|
1213
|
+
titleSize: PropTypes.Requireable<string>;
|
|
1214
|
+
subtitleSize: PropTypes.Requireable<string>;
|
|
1215
|
+
}>>;
|
|
1216
|
+
headerIcon: PropTypes.Requireable<string>;
|
|
1217
|
+
backgroundImage: PropTypes.Requireable<string>;
|
|
1218
|
+
}>>;
|
|
1208
1219
|
firstButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
1209
1220
|
label: PropTypes.Requireable<string>;
|
|
1210
1221
|
handleOnclick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -1252,6 +1263,13 @@ declare namespace BrandUpdate {
|
|
|
1252
1263
|
'data-name': PropTypes.Requireable<string>;
|
|
1253
1264
|
requiredSelection: PropTypes.Requireable<boolean>;
|
|
1254
1265
|
}> | null | undefined)[]>;
|
|
1266
|
+
items: PropTypes.Requireable<PropTypes.InferProps<{
|
|
1267
|
+
type: PropTypes.Requireable<string>;
|
|
1268
|
+
list: PropTypes.Requireable<PropTypes.InferProps<{
|
|
1269
|
+
list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
|
|
1270
|
+
loading: PropTypes.Requireable<boolean>;
|
|
1271
|
+
}>>;
|
|
1272
|
+
}>>;
|
|
1255
1273
|
}>>;
|
|
1256
1274
|
export const details: PropTypes.Requireable<PropTypes.InferProps<{
|
|
1257
1275
|
key: PropTypes.Requireable<string>;
|
|
@@ -8,7 +8,18 @@ declare namespace Dashboard {
|
|
|
8
8
|
cookie: PropTypes.Requireable<PropTypes.InferProps<{
|
|
9
9
|
content: PropTypes.Requireable<string>;
|
|
10
10
|
mode: PropTypes.Requireable<string>;
|
|
11
|
-
header: PropTypes.Requireable<
|
|
11
|
+
header: PropTypes.Requireable<PropTypes.InferProps<{
|
|
12
|
+
title: PropTypes.Requireable<PropTypes.InferProps<{
|
|
13
|
+
title: PropTypes.Requireable<string>;
|
|
14
|
+
subtitle: PropTypes.Requireable<string>;
|
|
15
|
+
type: PropTypes.Requireable<string>;
|
|
16
|
+
'data-name': PropTypes.Requireable<string>;
|
|
17
|
+
titleSize: PropTypes.Requireable<string>;
|
|
18
|
+
subtitleSize: PropTypes.Requireable<string>;
|
|
19
|
+
}>>;
|
|
20
|
+
headerIcon: PropTypes.Requireable<string>;
|
|
21
|
+
backgroundImage: PropTypes.Requireable<string>;
|
|
22
|
+
}>>;
|
|
12
23
|
firstButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
13
24
|
label: PropTypes.Requireable<string>;
|
|
14
25
|
handleOnclick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -56,6 +67,13 @@ declare namespace Dashboard {
|
|
|
56
67
|
'data-name': PropTypes.Requireable<string>;
|
|
57
68
|
requiredSelection: PropTypes.Requireable<boolean>;
|
|
58
69
|
}> | null | undefined)[]>;
|
|
70
|
+
items: PropTypes.Requireable<PropTypes.InferProps<{
|
|
71
|
+
type: PropTypes.Requireable<string>;
|
|
72
|
+
list: PropTypes.Requireable<PropTypes.InferProps<{
|
|
73
|
+
list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
|
|
74
|
+
loading: PropTypes.Requireable<boolean>;
|
|
75
|
+
}>>;
|
|
76
|
+
}>>;
|
|
59
77
|
}>>;
|
|
60
78
|
'arrows-aria-label': PropTypes.Requireable<PropTypes.InferProps<{
|
|
61
79
|
showMoreOnLeftAriaLabel: PropTypes.Requireable<string>;
|
|
@@ -25,7 +25,18 @@ declare namespace ExternalCourse {
|
|
|
25
25
|
const closePopin: PropTypes.Requireable<PropTypes.InferProps<{
|
|
26
26
|
content: PropTypes.Requireable<string>;
|
|
27
27
|
mode: PropTypes.Requireable<string>;
|
|
28
|
-
header: PropTypes.Requireable<
|
|
28
|
+
header: PropTypes.Requireable<PropTypes.InferProps<{
|
|
29
|
+
title: PropTypes.Requireable<PropTypes.InferProps<{
|
|
30
|
+
title: PropTypes.Requireable<string>;
|
|
31
|
+
subtitle: PropTypes.Requireable<string>;
|
|
32
|
+
type: PropTypes.Requireable<string>;
|
|
33
|
+
'data-name': PropTypes.Requireable<string>;
|
|
34
|
+
titleSize: PropTypes.Requireable<string>;
|
|
35
|
+
subtitleSize: PropTypes.Requireable<string>;
|
|
36
|
+
}>>;
|
|
37
|
+
headerIcon: PropTypes.Requireable<string>;
|
|
38
|
+
backgroundImage: PropTypes.Requireable<string>;
|
|
39
|
+
}>>;
|
|
29
40
|
firstButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
30
41
|
label: PropTypes.Requireable<string>;
|
|
31
42
|
handleOnclick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -73,6 +84,13 @@ declare namespace ExternalCourse {
|
|
|
73
84
|
'data-name': PropTypes.Requireable<string>;
|
|
74
85
|
requiredSelection: PropTypes.Requireable<boolean>;
|
|
75
86
|
}> | null | undefined)[]>;
|
|
87
|
+
items: PropTypes.Requireable<PropTypes.InferProps<{
|
|
88
|
+
type: PropTypes.Requireable<string>;
|
|
89
|
+
list: PropTypes.Requireable<PropTypes.InferProps<{
|
|
90
|
+
list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
|
|
91
|
+
loading: PropTypes.Requireable<boolean>;
|
|
92
|
+
}>>;
|
|
93
|
+
}>>;
|
|
76
94
|
}>>;
|
|
77
95
|
}
|
|
78
96
|
namespace contextTypes {
|
package/es/variables/colors.css
CHANGED
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
@value box_shadow_medium_dark: rgba(0, 0, 0, 0.2);
|
|
73
73
|
@value box_shadow_orange_700: rgba(255, 84, 31, 0.15);
|
|
74
74
|
@value light_blue: #ADC9F5;
|
|
75
|
-
|
|
75
|
+
@value negative_100: #FCDADA;
|
|
76
76
|
@value go1_backgound: #144953;
|
|
77
77
|
@value go1_primary: #D5FD42;
|
|
78
78
|
@value go1_primary_hover: #BFE33B;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare type TitleProps = {
|
|
2
|
+
title: string;
|
|
3
|
+
subtitle: string;
|
|
4
|
+
type: 'page' | 'form-group';
|
|
5
|
+
'data-name'?: string;
|
|
6
|
+
titleSize: 'standard' | 'medium' | 'small';
|
|
7
|
+
subtitleSize: 'standard' | 'small' | 'small-without-margin' | 'extra-small';
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atom/title/types.ts"],"names":[],"mappings":"AAAA,oBAAY,UAAU,GAAG;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,GAAG,YAAY,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,UAAU,GAAG,QAAQ,GAAG,OAAO,CAAC;IAC3C,YAAY,EAAE,UAAU,GAAG,OAAO,GAAG,sBAAsB,GAAG,aAAa,CAAC;CAC7E,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../src/atom/title/types.ts"],"sourcesContent":["export type TitleProps = {\n title: string;\n subtitle: string;\n type: 'page' | 'form-group';\n 'data-name'?: string;\n titleSize: 'standard' | 'medium' | 'small';\n subtitleSize: 'standard' | 'small' | 'small-without-margin' | 'extra-small';\n};\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/card/index.js"],"names":[],"mappings":";;;;;;AAuHA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/card/index.js"],"names":[],"mappings":";;;;;;AAuHA,uDA0HG"}
|
|
@@ -161,6 +161,7 @@ const Card = /*#__PURE__*/(0, _react.memo)(function Card(props, context) {
|
|
|
161
161
|
badgeCategory,
|
|
162
162
|
badgeLabel,
|
|
163
163
|
theme = 'default',
|
|
164
|
+
disabledContent,
|
|
164
165
|
'aria-label': cardArialabel,
|
|
165
166
|
'background-aria-label': backgroundAriaLabel,
|
|
166
167
|
'favorite-aria-label': favoriteAriaLabel,
|
|
@@ -172,17 +173,17 @@ const Card = /*#__PURE__*/(0, _react.memo)(function Card(props, context) {
|
|
|
172
173
|
} = props;
|
|
173
174
|
const empty = (0, _isEmpty2.default)((0, _pick2.default)(['title', 'type', 'author', 'image'], props));
|
|
174
175
|
const primaryColor = (0, _get2.default)('common.primary', skin);
|
|
175
|
-
const whiteColor = (0, _get2.default)('common.white', skin);
|
|
176
176
|
const cardStyle = (0, _classnames.default)(THEMES[theme], type === 'chapter' ? _style.default.chapter : _style.default.course, title ? null : _style.default.lazy, _style.default.grid, empty ? _style.default.empty : null);
|
|
177
177
|
const disabled = hidden && (!isSelected || (0, _isUndefined2.default)(isSelected));
|
|
178
178
|
const handleClick = (0, _react.useMemo)(() => e => !disabled && onClick(e), [disabled, onClick]);
|
|
179
|
-
const lock = disabled ? /*#__PURE__*/_react.default.createElement(
|
|
179
|
+
const lock = disabled ? /*#__PURE__*/_react.default.createElement("div", {
|
|
180
|
+
className: _style.default.lockContent
|
|
181
|
+
}, /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionCoorpacademyPadlock, {
|
|
180
182
|
className: _style.default.lockIcon,
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
}) : null;
|
|
183
|
+
height: 48
|
|
184
|
+
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
185
|
+
"aria-label": disabledArialabel
|
|
186
|
+
}, disabledContent)) : null;
|
|
186
187
|
const inlineBadgeStyle = {
|
|
187
188
|
color: primaryColor
|
|
188
189
|
};
|
|
@@ -277,6 +278,7 @@ Card.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
277
278
|
badgeCategory: _cardContent.default.propTypes.badgeCategory,
|
|
278
279
|
badgeLabel: _cardContent.default.propTypes.badgeLabel,
|
|
279
280
|
theme: _propTypes.default.oneOf((0, _keys2.default)(THEMES)),
|
|
281
|
+
disabledContent: _propTypes.default.string,
|
|
280
282
|
'aria-label': _propTypes.default.string,
|
|
281
283
|
'background-aria-label': _propTypes.default.string,
|
|
282
284
|
'favorite-aria-label': _favorite.default.propTypes['aria-label'],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["THEMES","default","coorpmanager","style","CardBackground","type","image","empty","ariaLabel","skin","externalContent","isExternalContent","primaryColor","whiteColor","EXTERNAL_CONTENT_ICONS","IconType","icon","iconColor","color","backgroundIcon","externalIconCircleWrapper","externalIcon","_backgroundIcon","classnames","externalIconCircleWithImageWrapper","backgroundColor","externalIconWithImage","imageWrapper","backgroundImage","externalContentHeader","externalBackground","emptyIcon","chapterImageWrapper","contextTypes","Provider","childContextTypes","propTypes","PropTypes","string","bool","Card","memo","props","context","badge","adaptiv","disabled","hidden","title","author","customer","certifiedAuthor","progress","favorite","addFavoriteToolTip","removeFavoriteToolTip","onClick","onFavoriteClick","isSelected","notification","badgeCategory","badgeLabel","theme","cardArialabel","backgroundAriaLabel","favoriteAriaLabel","selectableAriaLabel","customerAriaLabel","badgeAriaLabel","disabledArialabel","cardContentLabelAriaLabel","cardStyle","chapter","course","lazy","grid","handleClick","useMemo","e","lock","lockIcon","inlineBadgeStyle","getType","contentType","MODES","CARD","lockWrapper","shape","Customer","number","func","Notification","CardContentInfo","oneOf","Favorite","Selectable"],"sources":["../../../src/molecule/card/index.js"],"sourcesContent":["import React, {useMemo, memo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {get, isEmpty, isUndefined, pick, keys} from 'lodash/fp';\nimport {\n NovaSolidLoginLocked as LockIcon,\n NovaCompositionCoorpacademyPictures as PicturesIcon\n} from '@coorpacademy/nova-icons';\nimport {isExternalContent, EXTERNAL_CONTENT_ICONS} from '../../util/external-content';\nimport Provider from '../../atom/provider';\nimport CardContentInfo, {MODES} from '../card-content';\nimport Customer from './customer';\nimport Favorite from './favorite';\nimport Selectable from './selectable';\nimport Notification from './notification';\nimport style from './style.css';\n\nexport const THEMES = {\n default: null,\n coorpmanager: style.coorpmanager\n};\n\nconst CardBackground = ({type, image, empty, 'aria-label': ariaLabel}, {skin}) => {\n const externalContent = isExternalContent(type);\n const primaryColor = get('common.primary', skin);\n const whiteColor = get('common.white', skin);\n\n if (externalContent && EXTERNAL_CONTENT_ICONS[type]) {\n const IconType = EXTERNAL_CONTENT_ICONS[type].icon;\n const iconColor = EXTERNAL_CONTENT_ICONS[type].color;\n const backgroundIcon = (\n <div className={style.externalIconCircleWrapper}>\n <IconType className={style.externalIcon} />\n </div>\n );\n\n if (image) {\n const _backgroundIcon = (\n <div\n className={classnames(\n style.externalIconCircleWrapper,\n style.externalIconCircleWithImageWrapper\n )}\n style={{\n backgroundColor: iconColor\n }}\n >\n <IconType className={style.externalIconWithImage} />\n </div>\n );\n\n return (\n <div className={style.imageWrapper}>\n <div\n data-name=\"cover\"\n aria-label={ariaLabel}\n style={{\n backgroundColor: iconColor,\n backgroundImage: `url('${image}')`\n }}\n className={classnames(style.externalContentHeader, style.externalBackground)}\n >\n {_backgroundIcon}\n </div>\n </div>\n );\n }\n return (\n <div className={style.imageWrapper}>\n <div\n data-name=\"cover\"\n aria-label={ariaLabel}\n style={{\n backgroundColor: iconColor\n }}\n className={style.externalContentHeader}\n >\n {backgroundIcon}\n </div>\n </div>\n );\n }\n\n const emptyIcon = empty ? (\n <PicturesIcon className={style.emptyIcon} style={{color: whiteColor}} />\n ) : null;\n return (\n <div\n className={classnames(\n style.imageWrapper,\n type === 'chapter' ? style.chapterImageWrapper : null\n )}\n >\n <div\n data-name=\"cover\"\n aria-label={ariaLabel}\n className={style.image}\n style={{\n backgroundColor: primaryColor,\n backgroundImage: image ? `url('${image}')` : 'none'\n }}\n >\n {emptyIcon}\n </div>\n </div>\n );\n};\n\nCardBackground.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nCardBackground.propTypes = {\n type: PropTypes.string,\n image: PropTypes.string,\n empty: PropTypes.bool,\n 'aria-label': PropTypes.string\n};\n\nconst Card = memo(function Card(props, context) {\n const {skin} = context;\n const {\n image,\n badge,\n adaptiv,\n disabled: hidden = false,\n type = 'course',\n title,\n author,\n customer,\n certifiedAuthor,\n progress,\n favorite,\n addFavoriteToolTip,\n removeFavoriteToolTip,\n onClick,\n onFavoriteClick,\n isSelected,\n notification,\n badgeCategory,\n badgeLabel,\n theme = 'default',\n 'aria-label': cardArialabel,\n 'background-aria-label': backgroundAriaLabel,\n 'favorite-aria-label': favoriteAriaLabel,\n 'selectable-aria-label': selectableAriaLabel,\n 'customer-aria-label': customerAriaLabel,\n 'badge-aria-label': badgeAriaLabel,\n 'disabled-aria-label': disabledArialabel,\n 'card-content-aria-label': cardContentLabelAriaLabel\n } = props;\n const empty = isEmpty(pick(['title', 'type', 'author', 'image'], props));\n const primaryColor = get('common.primary', skin);\n const whiteColor = get('common.white', skin);\n const cardStyle = classnames(\n THEMES[theme],\n type === 'chapter' ? style.chapter : style.course,\n title ? null : style.lazy,\n style.grid,\n empty ? style.empty : null\n );\n const disabled = hidden && (!isSelected || isUndefined(isSelected));\n const handleClick = useMemo(() => e => !disabled && onClick(e), [disabled, onClick]);\n const lock = disabled ? (\n <LockIcon className={style.lockIcon} style={{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 aria-label={cardArialabel}\n >\n <CardBackground type={type} image={image} empty={empty} aria-label={backgroundAriaLabel} />\n {isUndefined(isSelected) && !isUndefined(favorite) ? (\n <Favorite\n className={style.favorite}\n favorite={favorite}\n disabled={disabled}\n onFavoriteClick={onFavoriteClick}\n addFavoriteToolTip={addFavoriteToolTip}\n removeFavoriteToolTip={removeFavoriteToolTip}\n aria-label={favoriteAriaLabel}\n />\n ) : null}\n <Selectable isSelected={isSelected} hidden={hidden} aria-label={selectableAriaLabel} />\n {notification ? <Notification {...notification} /> : null}\n {customer ? (\n <Customer\n {...customer}\n theme={theme}\n type={type}\n disabled={disabled}\n aria-label={customerAriaLabel}\n />\n ) : null}\n <CardContentInfo\n mode={MODES.CARD}\n adaptiv={adaptiv}\n author={author}\n certifiedAuthor={certifiedAuthor}\n disabled={disabled}\n empty={empty}\n progress={progress}\n title={title}\n type={type}\n badgeCategory={badgeCategory}\n badgeLabel={badgeLabel}\n theme={theme}\n aria-label={cardContentLabelAriaLabel}\n />\n {badge ? (\n <div className={style.badge} style={inlineBadgeStyle} aria-label={badgeAriaLabel}>\n {badge}\n </div>\n ) : null}\n {disabled ? (\n <div className={style.lockWrapper} aria-label={disabledArialabel}>\n {lock}\n </div>\n ) : null}\n </div>\n );\n});\n\nCard.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nCard.propTypes = {\n badge: PropTypes.string,\n image: PropTypes.string,\n disabled: PropTypes.bool,\n adaptiv: PropTypes.bool,\n type: PropTypes.string,\n title: PropTypes.string,\n author: PropTypes.string,\n certifiedAuthor: PropTypes.bool,\n customer: PropTypes.shape(Customer.propTypes),\n progress: PropTypes.number,\n favorite: PropTypes.bool,\n addFavoriteToolTip: PropTypes.string,\n removeFavoriteToolTip: PropTypes.string,\n onClick: PropTypes.func,\n onFavoriteClick: PropTypes.func,\n isSelected: PropTypes.bool,\n notification: PropTypes.shape(Notification.propTypes),\n badgeCategory: CardContentInfo.propTypes.badgeCategory,\n badgeLabel: CardContentInfo.propTypes.badgeLabel,\n theme: PropTypes.oneOf(keys(THEMES)),\n 'aria-label': PropTypes.string,\n 'background-aria-label': PropTypes.string,\n 'favorite-aria-label': Favorite.propTypes['aria-label'],\n 'selectable-aria-label': Selectable.propTypes['aria-label'],\n 'customer-aria-label': Customer.propTypes['aria-label'],\n 'badge-aria-label': PropTypes.string,\n 'disabled-aria-label': PropTypes.string,\n 'card-content-aria-label': CardContentInfo.propTypes['aria-label']\n};\nexport default Card;\n"],"mappings":";;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AAIA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEO,MAAMA,MAAM,GAAG;EACpBC,OAAO,EAAE,IADW;EAEpBC,YAAY,EAAEC,cAAA,CAAMD;AAFA,CAAf;;;AAKP,MAAME,cAAc,GAAG,CAAC;EAACC,IAAD;EAAOC,KAAP;EAAcC,KAAd;EAAqB,cAAcC;AAAnC,CAAD,EAAgD;EAACC;AAAD,CAAhD,KAA2D;EAChF,MAAMC,eAAe,GAAG,IAAAC,kCAAA,EAAkBN,IAAlB,CAAxB;EACA,MAAMO,YAAY,GAAG,mBAAI,gBAAJ,EAAsBH,IAAtB,CAArB;EACA,MAAMI,UAAU,GAAG,mBAAI,cAAJ,EAAoBJ,IAApB,CAAnB;;EAEA,IAAIC,eAAe,IAAII,uCAAA,CAAuBT,IAAvB,CAAvB,EAAqD;IACnD,MAAMU,QAAQ,GAAGD,uCAAA,CAAuBT,IAAv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B;EAcfkB,OAAO,EAAEnB,kBAAA,CAAUqD,IAdJ;EAefjC,eAAe,EAAEpB,kBAAA,CAAUqD,IAfZ;EAgBfhC,UAAU,EAAErB,kBAAA,CAAUE,IAhBP;EAiBfoB,YAAY,EAAEtB,kBAAA,CAAUkD,KAAV,CAAgBI,qBAAA,CAAavD,SAA7B,CAjBC;EAkBfwB,aAAa,EAAEgC,oBAAA,CAAgBxD,SAAhB,CAA0BwB,aAlB1B;EAmBfC,UAAU,EAAE+B,oBAAA,CAAgBxD,SAAhB,CAA0ByB,UAnBvB;EAoBfC,KAAK,EAAEzB,kBAAA,CAAUwD,KAAV,CAAgB,oBAAK7F,MAAL,CAAhB,CApBQ;EAqBf,cAAcqC,kBAAA,CAAUC,MArBT;EAsBf,yBAAyBD,kBAAA,CAAUC,MAtBpB;EAuBf,uBAAuBwD,iBAAA,CAAS1D,SAAT,CAAmB,YAAnB,CAvBR;EAwBf,yBAAyB2D,mBAAA,CAAW3D,SAAX,CAAqB,YAArB,CAxBV;EAyBf,uBAAuBoD,iBAAA,CAASpD,SAAT,CAAmB,YAAnB,CAzBR;EA0Bf,oBAAoBC,kBAAA,CAAUC,MA1Bf;EA2Bf,uBAAuBD,kBAAA,CAAUC,MA3BlB;EA4Bf,2BAA2BsD,oBAAA,CAAgBxD,SAAhB,CAA0B,YAA1B;AA5BZ,CAAjB;eA8BeI,I"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["THEMES","default","coorpmanager","style","CardBackground","type","image","empty","ariaLabel","skin","externalContent","isExternalContent","primaryColor","whiteColor","EXTERNAL_CONTENT_ICONS","IconType","icon","iconColor","color","backgroundIcon","externalIconCircleWrapper","externalIcon","_backgroundIcon","classnames","externalIconCircleWithImageWrapper","backgroundColor","externalIconWithImage","imageWrapper","backgroundImage","externalContentHeader","externalBackground","emptyIcon","chapterImageWrapper","contextTypes","Provider","childContextTypes","propTypes","PropTypes","string","bool","Card","memo","props","context","badge","adaptiv","disabled","hidden","title","author","customer","certifiedAuthor","progress","favorite","addFavoriteToolTip","removeFavoriteToolTip","onClick","onFavoriteClick","isSelected","notification","badgeCategory","badgeLabel","theme","disabledContent","cardArialabel","backgroundAriaLabel","favoriteAriaLabel","selectableAriaLabel","customerAriaLabel","badgeAriaLabel","disabledArialabel","cardContentLabelAriaLabel","cardStyle","chapter","course","lazy","grid","handleClick","useMemo","e","lock","lockContent","lockIcon","inlineBadgeStyle","getType","contentType","MODES","CARD","lockWrapper","shape","Customer","number","func","Notification","CardContentInfo","oneOf","Favorite","Selectable"],"sources":["../../../src/molecule/card/index.js"],"sourcesContent":["import React, {useMemo, memo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {get, isEmpty, isUndefined, pick, keys} from 'lodash/fp';\nimport {\n NovaCompositionCoorpacademyPadlock as LockIcon,\n NovaCompositionCoorpacademyPictures as PicturesIcon\n} from '@coorpacademy/nova-icons';\nimport {isExternalContent, EXTERNAL_CONTENT_ICONS} from '../../util/external-content';\nimport Provider from '../../atom/provider';\nimport CardContentInfo, {MODES} from '../card-content';\nimport Customer from './customer';\nimport Favorite from './favorite';\nimport Selectable from './selectable';\nimport Notification from './notification';\nimport style from './style.css';\n\nexport const THEMES = {\n default: null,\n coorpmanager: style.coorpmanager\n};\n\nconst CardBackground = ({type, image, empty, 'aria-label': ariaLabel}, {skin}) => {\n const externalContent = isExternalContent(type);\n const primaryColor = get('common.primary', skin);\n const whiteColor = get('common.white', skin);\n\n if (externalContent && EXTERNAL_CONTENT_ICONS[type]) {\n const IconType = EXTERNAL_CONTENT_ICONS[type].icon;\n const iconColor = EXTERNAL_CONTENT_ICONS[type].color;\n const backgroundIcon = (\n <div className={style.externalIconCircleWrapper}>\n <IconType className={style.externalIcon} />\n </div>\n );\n\n if (image) {\n const _backgroundIcon = (\n <div\n className={classnames(\n style.externalIconCircleWrapper,\n style.externalIconCircleWithImageWrapper\n )}\n style={{\n backgroundColor: iconColor\n }}\n >\n <IconType className={style.externalIconWithImage} />\n </div>\n );\n\n return (\n <div className={style.imageWrapper}>\n <div\n data-name=\"cover\"\n aria-label={ariaLabel}\n style={{\n backgroundColor: iconColor,\n backgroundImage: `url('${image}')`\n }}\n className={classnames(style.externalContentHeader, style.externalBackground)}\n >\n {_backgroundIcon}\n </div>\n </div>\n );\n }\n return (\n <div className={style.imageWrapper}>\n <div\n data-name=\"cover\"\n aria-label={ariaLabel}\n style={{\n backgroundColor: iconColor\n }}\n className={style.externalContentHeader}\n >\n {backgroundIcon}\n </div>\n </div>\n );\n }\n\n const emptyIcon = empty ? (\n <PicturesIcon className={style.emptyIcon} style={{color: whiteColor}} />\n ) : null;\n return (\n <div\n className={classnames(\n style.imageWrapper,\n type === 'chapter' ? style.chapterImageWrapper : null\n )}\n >\n <div\n data-name=\"cover\"\n aria-label={ariaLabel}\n className={style.image}\n style={{\n backgroundColor: primaryColor,\n backgroundImage: image ? `url('${image}')` : 'none'\n }}\n >\n {emptyIcon}\n </div>\n </div>\n );\n};\n\nCardBackground.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nCardBackground.propTypes = {\n type: PropTypes.string,\n image: PropTypes.string,\n empty: PropTypes.bool,\n 'aria-label': PropTypes.string\n};\n\nconst Card = memo(function Card(props, context) {\n const {skin} = context;\n const {\n image,\n badge,\n adaptiv,\n disabled: hidden = false,\n type = 'course',\n title,\n author,\n customer,\n certifiedAuthor,\n progress,\n favorite,\n addFavoriteToolTip,\n removeFavoriteToolTip,\n onClick,\n onFavoriteClick,\n isSelected,\n notification,\n badgeCategory,\n badgeLabel,\n theme = 'default',\n disabledContent,\n 'aria-label': cardArialabel,\n 'background-aria-label': backgroundAriaLabel,\n 'favorite-aria-label': favoriteAriaLabel,\n 'selectable-aria-label': selectableAriaLabel,\n 'customer-aria-label': customerAriaLabel,\n 'badge-aria-label': badgeAriaLabel,\n 'disabled-aria-label': disabledArialabel,\n 'card-content-aria-label': cardContentLabelAriaLabel\n } = props;\n const empty = isEmpty(pick(['title', 'type', 'author', 'image'], props));\n const primaryColor = get('common.primary', skin);\n const cardStyle = classnames(\n THEMES[theme],\n type === 'chapter' ? style.chapter : style.course,\n title ? null : style.lazy,\n style.grid,\n empty ? style.empty : null\n );\n const disabled = hidden && (!isSelected || isUndefined(isSelected));\n const handleClick = useMemo(() => e => !disabled && onClick(e), [disabled, onClick]);\n const lock = disabled ? (\n <div className={style.lockContent}>\n <LockIcon className={style.lockIcon} height={48} />\n <span aria-label={disabledArialabel}>{disabledContent}</span>\n </div>\n ) : null;\n const inlineBadgeStyle = {color: primaryColor};\n const getType = contentType => {\n switch (contentType) {\n case 'chapter':\n return 'microlearning';\n case 'course':\n return 'learner';\n default:\n return contentType;\n }\n };\n\n return (\n <div\n className={cardStyle}\n data-name=\"card\"\n data-lock={disabled}\n data-type={getType(type)}\n disabled={disabled}\n onClick={handleClick}\n aria-label={cardArialabel}\n >\n <CardBackground type={type} image={image} empty={empty} aria-label={backgroundAriaLabel} />\n {isUndefined(isSelected) && !isUndefined(favorite) ? (\n <Favorite\n className={style.favorite}\n favorite={favorite}\n disabled={disabled}\n onFavoriteClick={onFavoriteClick}\n addFavoriteToolTip={addFavoriteToolTip}\n removeFavoriteToolTip={removeFavoriteToolTip}\n aria-label={favoriteAriaLabel}\n />\n ) : null}\n <Selectable isSelected={isSelected} hidden={hidden} aria-label={selectableAriaLabel} />\n {notification ? <Notification {...notification} /> : null}\n {customer ? (\n <Customer\n {...customer}\n theme={theme}\n type={type}\n disabled={disabled}\n aria-label={customerAriaLabel}\n />\n ) : null}\n <CardContentInfo\n mode={MODES.CARD}\n adaptiv={adaptiv}\n author={author}\n certifiedAuthor={certifiedAuthor}\n disabled={disabled}\n empty={empty}\n progress={progress}\n title={title}\n type={type}\n badgeCategory={badgeCategory}\n badgeLabel={badgeLabel}\n theme={theme}\n aria-label={cardContentLabelAriaLabel}\n />\n {badge ? (\n <div className={style.badge} style={inlineBadgeStyle} aria-label={badgeAriaLabel}>\n {badge}\n </div>\n ) : null}\n {disabled ? (\n <div className={style.lockWrapper} aria-label={disabledArialabel}>\n {lock}\n </div>\n ) : null}\n </div>\n );\n});\n\nCard.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nCard.propTypes = {\n badge: PropTypes.string,\n image: PropTypes.string,\n disabled: PropTypes.bool,\n adaptiv: PropTypes.bool,\n type: PropTypes.string,\n title: PropTypes.string,\n author: PropTypes.string,\n certifiedAuthor: PropTypes.bool,\n customer: PropTypes.shape(Customer.propTypes),\n progress: PropTypes.number,\n favorite: PropTypes.bool,\n addFavoriteToolTip: PropTypes.string,\n removeFavoriteToolTip: PropTypes.string,\n onClick: PropTypes.func,\n onFavoriteClick: PropTypes.func,\n isSelected: PropTypes.bool,\n notification: PropTypes.shape(Notification.propTypes),\n badgeCategory: CardContentInfo.propTypes.badgeCategory,\n badgeLabel: CardContentInfo.propTypes.badgeLabel,\n theme: PropTypes.oneOf(keys(THEMES)),\n disabledContent: PropTypes.string,\n 'aria-label': PropTypes.string,\n 'background-aria-label': PropTypes.string,\n 'favorite-aria-label': Favorite.propTypes['aria-label'],\n 'selectable-aria-label': Selectable.propTypes['aria-label'],\n 'customer-aria-label': Customer.propTypes['aria-label'],\n 'badge-aria-label': PropTypes.string,\n 'disabled-aria-label': PropTypes.string,\n 'card-content-aria-label': CardContentInfo.propTypes['aria-label']\n};\nexport default Card;\n"],"mappings":";;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AAIA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEO,MAAMA,MAAM,GAAG;EACpBC,OAAO,EAAE,IADW;EAEpBC,YAAY,EAAEC,cAAA,CAAMD;AAFA,CAAf;;;AAKP,MAAME,cAAc,GAAG,CAAC;EAACC,IAAD;EAAOC,KAAP;EAAcC,KAAd;EAAqB,cAAcC;AAAnC,CAAD,EAAgD;EAACC;AAAD,CAAhD,KAA2D;EAChF,MAAMC,eAAe,GAAG,IAAAC,kCAAA,EAAkBN,IAAlB,CAAxB;EACA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