@coorpacademy/components 11.18.10 → 11.19.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 +1 -0
- package/es/molecule/card/index.d.ts.map +1 -1
- package/es/molecule/card/index.js +11 -10
- package/es/molecule/card/index.js.map +1 -1
- package/es/molecule/card/style.css +47 -5
- package/es/molecule/cm-popin/index.d.ts.map +1 -1
- package/es/molecule/cm-popin/index.js +46 -9
- package/es/molecule/cm-popin/index.js.map +1 -1
- package/es/molecule/cm-popin/style.css +32 -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/molecule/dashboard/cards-list/index.d.ts +1 -0
- package/es/molecule/dashboard/cards-list/index.d.ts.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 +20 -1
- package/es/template/app-player/popin-end/summary.d.ts +1 -0
- 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 +89 -1
- package/es/template/common/dashboard/index.d.ts.map +1 -1
- package/es/template/common/dashboard/index.js +6 -2
- package/es/template/common/dashboard/index.js.map +1 -1
- package/es/template/common/dashboard/style.css +5 -0
- package/es/template/common/search-page/index.d.ts +71 -0
- package/es/template/common/search-page/index.d.ts.map +1 -1
- package/es/template/common/search-page/index.js +8 -3
- package/es/template/common/search-page/index.js.map +1 -1
- package/es/template/common/search-page/style.css +5 -0
- package/es/template/external-course/index.d.ts +19 -1
- package/es/template/teams-dashboard/index.d.ts +1 -0
- 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 +1 -0
- package/lib/molecule/card/index.d.ts.map +1 -1
- package/lib/molecule/card/index.js +10 -8
- package/lib/molecule/card/index.js.map +1 -1
- package/lib/molecule/card/style.css +47 -5
- package/lib/molecule/cm-popin/index.d.ts.map +1 -1
- package/lib/molecule/cm-popin/index.js +48 -8
- package/lib/molecule/cm-popin/index.js.map +1 -1
- package/lib/molecule/cm-popin/style.css +32 -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/molecule/dashboard/cards-list/index.d.ts +1 -0
- package/lib/molecule/dashboard/cards-list/index.d.ts.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 +20 -1
- package/lib/template/app-player/popin-end/summary.d.ts +1 -0
- 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 +89 -1
- package/lib/template/common/dashboard/index.d.ts.map +1 -1
- package/lib/template/common/dashboard/index.js +6 -2
- package/lib/template/common/dashboard/index.js.map +1 -1
- package/lib/template/common/dashboard/style.css +5 -0
- package/lib/template/common/search-page/index.d.ts +71 -0
- package/lib/template/common/search-page/index.d.ts.map +1 -1
- package/lib/template/common/search-page/index.js +9 -3
- package/lib/template/common/search-page/index.js.map +1 -1
- package/lib/template/common/search-page/style.css +5 -0
- package/lib/template/external-course/index.d.ts +19 -1
- package/lib/template/teams-dashboard/index.d.ts +1 -0
- package/lib/variables/colors.css +1 -1
- package/package.json +3 -3
|
@@ -144,6 +144,7 @@ declare namespace SearchPage {
|
|
|
144
144
|
badgeCategory: PropTypes.Requireable<string>;
|
|
145
145
|
badgeLabel: PropTypes.Requireable<string>;
|
|
146
146
|
theme: PropTypes.Requireable<string>;
|
|
147
|
+
disabledContent: PropTypes.Requireable<string>;
|
|
147
148
|
'aria-label': PropTypes.Requireable<string>;
|
|
148
149
|
'background-aria-label': PropTypes.Requireable<string>;
|
|
149
150
|
'favorite-aria-label': PropTypes.Requireable<PropTypes.InferProps<{
|
|
@@ -176,6 +177,76 @@ declare namespace SearchPage {
|
|
|
176
177
|
const moreFilterAriaLabel: PropTypes.Requireable<string>;
|
|
177
178
|
const filterGroupAriaLabel: PropTypes.Requireable<string>;
|
|
178
179
|
const sortAriaLabel: PropTypes.Requireable<string>;
|
|
180
|
+
const popinWithCards: PropTypes.Requireable<PropTypes.InferProps<{
|
|
181
|
+
content: PropTypes.Requireable<string>;
|
|
182
|
+
mode: PropTypes.Requireable<string>;
|
|
183
|
+
header: PropTypes.Requireable<PropTypes.InferProps<{
|
|
184
|
+
title: PropTypes.Requireable<PropTypes.InferProps<{
|
|
185
|
+
title: PropTypes.Requireable<string>;
|
|
186
|
+
subtitle: PropTypes.Requireable<string>;
|
|
187
|
+
type: PropTypes.Requireable<string>;
|
|
188
|
+
'data-name': PropTypes.Requireable<string>;
|
|
189
|
+
titleSize: PropTypes.Requireable<string>;
|
|
190
|
+
subtitleSize: PropTypes.Requireable<string>;
|
|
191
|
+
}>>;
|
|
192
|
+
headerIcon: PropTypes.Requireable<string>;
|
|
193
|
+
backgroundImage: PropTypes.Requireable<string>;
|
|
194
|
+
}>>;
|
|
195
|
+
firstButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
196
|
+
label: PropTypes.Requireable<string>;
|
|
197
|
+
handleOnclick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
198
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
199
|
+
largeButton: PropTypes.Requireable<boolean>;
|
|
200
|
+
type: PropTypes.Requireable<string>;
|
|
201
|
+
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
202
|
+
}>>;
|
|
203
|
+
secondButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
204
|
+
label: PropTypes.Requireable<string>;
|
|
205
|
+
handleOnclick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
206
|
+
type: PropTypes.Requireable<string>;
|
|
207
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
208
|
+
largeButton: PropTypes.Requireable<boolean>;
|
|
209
|
+
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
210
|
+
}>>;
|
|
211
|
+
thirdButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
212
|
+
label: PropTypes.Requireable<string>;
|
|
213
|
+
handleOnclick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
214
|
+
type: PropTypes.Requireable<string>;
|
|
215
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
216
|
+
largeButton: PropTypes.Requireable<boolean>;
|
|
217
|
+
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
218
|
+
}>>;
|
|
219
|
+
onClose: PropTypes.Requireable<(...args: any[]) => any>;
|
|
220
|
+
icon: PropTypes.Requireable<string>;
|
|
221
|
+
backgroundImageUrl: PropTypes.Requireable<string>;
|
|
222
|
+
descriptionText: PropTypes.Requireable<string>;
|
|
223
|
+
cookieTitle: PropTypes.Requireable<string>;
|
|
224
|
+
descriptionBtnTxt: PropTypes.Requireable<string>;
|
|
225
|
+
listBtnSwicth: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
226
|
+
title: PropTypes.Requireable<string>;
|
|
227
|
+
name: PropTypes.Requireable<string>;
|
|
228
|
+
id: PropTypes.Requireable<string>;
|
|
229
|
+
value: PropTypes.Requireable<boolean>;
|
|
230
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
231
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
232
|
+
description: PropTypes.Requireable<string>;
|
|
233
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
234
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
235
|
+
modified: PropTypes.Requireable<boolean>;
|
|
236
|
+
titlePosition: PropTypes.Requireable<string>;
|
|
237
|
+
theme: PropTypes.Requireable<string>;
|
|
238
|
+
details: PropTypes.Requireable<string>;
|
|
239
|
+
'data-name': PropTypes.Requireable<string>;
|
|
240
|
+
requiredSelection: PropTypes.Requireable<boolean>;
|
|
241
|
+
}> | null | undefined)[]>;
|
|
242
|
+
items: PropTypes.Requireable<PropTypes.InferProps<{
|
|
243
|
+
type: PropTypes.Requireable<string>;
|
|
244
|
+
list: PropTypes.Requireable<PropTypes.InferProps<{
|
|
245
|
+
list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
|
|
246
|
+
loading: PropTypes.Requireable<boolean>;
|
|
247
|
+
}>>;
|
|
248
|
+
}>>;
|
|
249
|
+
}>>;
|
|
179
250
|
}
|
|
180
251
|
}
|
|
181
252
|
import PropTypes from "prop-types";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/common/search-page/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/common/search-page/index.js"],"names":[],"mappings":";AAWA,mEA4DC"}
|
|
@@ -10,6 +10,7 @@ import Button from '../../../atom/button';
|
|
|
10
10
|
import Filters from '../../../molecule/filters';
|
|
11
11
|
import CardsGrid from '../../../organism/cards-grid';
|
|
12
12
|
import CardsList from '../../../molecule/dashboard/cards-list';
|
|
13
|
+
import CMPopin from '../../../molecule/cm-popin';
|
|
13
14
|
import style from './style.css';
|
|
14
15
|
|
|
15
16
|
const SearchPage = (props, context) => {
|
|
@@ -23,7 +24,8 @@ const SearchPage = (props, context) => {
|
|
|
23
24
|
moreSortAriaLabel,
|
|
24
25
|
moreFilterAriaLabel,
|
|
25
26
|
filterGroupAriaLabel,
|
|
26
|
-
sortAriaLabel
|
|
27
|
+
sortAriaLabel,
|
|
28
|
+
popinWithCards
|
|
27
29
|
} = props;
|
|
28
30
|
const {
|
|
29
31
|
skin
|
|
@@ -55,7 +57,9 @@ const SearchPage = (props, context) => {
|
|
|
55
57
|
}, /*#__PURE__*/React.createElement("div", {
|
|
56
58
|
className: style.title,
|
|
57
59
|
role: "status"
|
|
58
|
-
}, title), cardsView)
|
|
60
|
+
}, title), cardsView), popinWithCards ? /*#__PURE__*/React.createElement("div", {
|
|
61
|
+
className: style.popinWithCards
|
|
62
|
+
}, /*#__PURE__*/React.createElement(CMPopin, popinWithCards)) : null);
|
|
59
63
|
};
|
|
60
64
|
|
|
61
65
|
SearchPage.contextTypes = {
|
|
@@ -71,7 +75,8 @@ SearchPage.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
71
75
|
moreSortAriaLabel: PropTypes.string,
|
|
72
76
|
moreFilterAriaLabel: PropTypes.string,
|
|
73
77
|
filterGroupAriaLabel: PropTypes.string,
|
|
74
|
-
sortAriaLabel: PropTypes.string
|
|
78
|
+
sortAriaLabel: PropTypes.string,
|
|
79
|
+
popinWithCards: PropTypes.shape(CMPopin.propTypes)
|
|
75
80
|
} : {};
|
|
76
81
|
export default SearchPage;
|
|
77
82
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","Provider","Button","Filters","CardsGrid","CardsList","style","SearchPage","props","context","title","searchFilters","cards","noresultsfound","clearFilters","recommendations","moreSortAriaLabel","moreFilterAriaLabel","filterGroupAriaLabel","sortAriaLabel","skin","defaultColor","recommendationsView","cardsView","list","noresults","noresultstxt","clear","background","cardsWrapper","contextTypes","childContextTypes","propTypes","string","shape"],"sources":["../../../../src/template/common/search-page/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {getOr, isEmpty} from 'lodash/fp';\nimport Provider from '../../../atom/provider';\nimport Button from '../../../atom/button';\nimport Filters from '../../../molecule/filters';\nimport CardsGrid from '../../../organism/cards-grid';\nimport CardsList from '../../../molecule/dashboard/cards-list';\nimport style from './style.css';\n\nconst SearchPage = (props, context) => {\n const {\n title,\n searchFilters,\n cards,\n noresultsfound,\n clearFilters,\n recommendations,\n moreSortAriaLabel,\n moreFilterAriaLabel,\n filterGroupAriaLabel,\n sortAriaLabel\n } = props;\n\n const {skin} = context;\n const defaultColor = getOr('#00B0FF', 'common.primary', skin);\n\n const recommendationsView = isEmpty(recommendations) ? null : <CardsList {...recommendations} />;\n\n const cardsView = isEmpty(cards.list) ? (\n <div>\n <div className={style.noresults}>\n <div className={style.noresultstxt}>{noresultsfound}</div>\n <Button\n {...clearFilters}\n data-name=\"searchPageClear\"\n className={style.clear}\n style={{background: defaultColor}}\n type=\"link\"\n />\n </div>\n {recommendationsView}\n </div>\n ) : (\n <CardsGrid {...cards} />\n );\n\n return (\n <div>\n <Filters\n {...searchFilters}\n moreSortAriaLabel={moreSortAriaLabel}\n moreFilterAriaLabel={moreFilterAriaLabel}\n filterGroupAriaLabel={filterGroupAriaLabel}\n sortAriaLabel={sortAriaLabel}\n />\n <div data-name=\"searchResult\" className={style.cardsWrapper}>\n <div className={style.title} role=\"status\">\n {title}\n </div>\n {cardsView}\n </div>\n </div>\n );\n};\n\nSearchPage.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nSearchPage.propTypes = {\n noresultsfound: PropTypes.string,\n title: PropTypes.string,\n searchFilters: PropTypes.shape(Filters.propTypes),\n cards: PropTypes.shape(CardsGrid.propTypes),\n clearFilters: PropTypes.shape(Button.propTypes),\n recommendations: PropTypes.shape(CardsList.propTypes),\n moreSortAriaLabel: PropTypes.string,\n moreFilterAriaLabel: PropTypes.string,\n filterGroupAriaLabel: PropTypes.string,\n sortAriaLabel: PropTypes.string\n};\n\nexport default SearchPage;\n"],"mappings":";;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,QAAP,MAAqB,wBAArB;AACA,OAAOC,MAAP,MAAmB,sBAAnB;AACA,OAAOC,OAAP,MAAoB,2BAApB;AACA,OAAOC,SAAP,MAAsB,8BAAtB;AACA,OAAOC,SAAP,MAAsB,wCAAtB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,UAAU,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACrC,MAAM;IACJC,KADI;IAEJC,aAFI;IAGJC,KAHI;IAIJC,cAJI;IAKJC,YALI;IAMJC,eANI;IAOJC,iBAPI;IAQJC,mBARI;IASJC,oBATI;IAUJC;
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","Provider","Button","Filters","CardsGrid","CardsList","CMPopin","style","SearchPage","props","context","title","searchFilters","cards","noresultsfound","clearFilters","recommendations","moreSortAriaLabel","moreFilterAriaLabel","filterGroupAriaLabel","sortAriaLabel","popinWithCards","skin","defaultColor","recommendationsView","cardsView","list","noresults","noresultstxt","clear","background","cardsWrapper","contextTypes","childContextTypes","propTypes","string","shape"],"sources":["../../../../src/template/common/search-page/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {getOr, isEmpty} from 'lodash/fp';\nimport Provider from '../../../atom/provider';\nimport Button from '../../../atom/button';\nimport Filters from '../../../molecule/filters';\nimport CardsGrid from '../../../organism/cards-grid';\nimport CardsList from '../../../molecule/dashboard/cards-list';\nimport CMPopin from '../../../molecule/cm-popin';\nimport style from './style.css';\n\nconst SearchPage = (props, context) => {\n const {\n title,\n searchFilters,\n cards,\n noresultsfound,\n clearFilters,\n recommendations,\n moreSortAriaLabel,\n moreFilterAriaLabel,\n filterGroupAriaLabel,\n sortAriaLabel,\n popinWithCards\n } = props;\n\n const {skin} = context;\n const defaultColor = getOr('#00B0FF', 'common.primary', skin);\n\n const recommendationsView = isEmpty(recommendations) ? null : <CardsList {...recommendations} />;\n\n const cardsView = isEmpty(cards.list) ? (\n <div>\n <div className={style.noresults}>\n <div className={style.noresultstxt}>{noresultsfound}</div>\n <Button\n {...clearFilters}\n data-name=\"searchPageClear\"\n className={style.clear}\n style={{background: defaultColor}}\n type=\"link\"\n />\n </div>\n {recommendationsView}\n </div>\n ) : (\n <CardsGrid {...cards} />\n );\n\n return (\n <div>\n <Filters\n {...searchFilters}\n moreSortAriaLabel={moreSortAriaLabel}\n moreFilterAriaLabel={moreFilterAriaLabel}\n filterGroupAriaLabel={filterGroupAriaLabel}\n sortAriaLabel={sortAriaLabel}\n />\n <div data-name=\"searchResult\" className={style.cardsWrapper}>\n <div className={style.title} role=\"status\">\n {title}\n </div>\n {cardsView}\n </div>\n {popinWithCards ? (\n <div className={style.popinWithCards}>\n <CMPopin {...popinWithCards} />\n </div>\n ) : null}\n </div>\n );\n};\n\nSearchPage.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nSearchPage.propTypes = {\n noresultsfound: PropTypes.string,\n title: PropTypes.string,\n searchFilters: PropTypes.shape(Filters.propTypes),\n cards: PropTypes.shape(CardsGrid.propTypes),\n clearFilters: PropTypes.shape(Button.propTypes),\n recommendations: PropTypes.shape(CardsList.propTypes),\n moreSortAriaLabel: PropTypes.string,\n moreFilterAriaLabel: PropTypes.string,\n filterGroupAriaLabel: PropTypes.string,\n sortAriaLabel: PropTypes.string,\n popinWithCards: PropTypes.shape(CMPopin.propTypes)\n};\n\nexport default SearchPage;\n"],"mappings":";;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,QAAP,MAAqB,wBAArB;AACA,OAAOC,MAAP,MAAmB,sBAAnB;AACA,OAAOC,OAAP,MAAoB,2BAApB;AACA,OAAOC,SAAP,MAAsB,8BAAtB;AACA,OAAOC,SAAP,MAAsB,wCAAtB;AACA,OAAOC,OAAP,MAAoB,4BAApB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,UAAU,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACrC,MAAM;IACJC,KADI;IAEJC,aAFI;IAGJC,KAHI;IAIJC,cAJI;IAKJC,YALI;IAMJC,eANI;IAOJC,iBAPI;IAQJC,mBARI;IASJC,oBATI;IAUJC,aAVI;IAWJC;EAXI,IAYFZ,KAZJ;EAcA,MAAM;IAACa;EAAD,IAASZ,OAAf;;EACA,MAAMa,YAAY,GAAG,OAAM,SAAN,EAAiB,gBAAjB,EAAmCD,IAAnC,CAArB;;EAEA,MAAME,mBAAmB,GAAG,SAAQR,eAAR,IAA2B,IAA3B,gBAAkC,oBAAC,SAAD,EAAeA,eAAf,CAA9D;EAEA,MAAMS,SAAS,GAAG,SAAQZ,KAAK,CAACa,IAAd,iBAChB,8CACE;IAAK,SAAS,EAAEnB,KAAK,CAACoB;EAAtB,gBACE;IAAK,SAAS,EAAEpB,KAAK,CAACqB;EAAtB,GAAqCd,cAArC,CADF,eAEE,oBAAC,MAAD,eACMC,YADN;IAEE,aAAU,i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;EAQrBjB,mBAAmB,EAAElB,SAAS,CAACmC,MARV;EASrBhB,oBAAoB,EAAEnB,SAAS,CAACmC,MATX;EAUrBf,aAAa,EAAEpB,SAAS,CAACmC,MAVJ;EAWrBd,cAAc,EAAErB,SAAS,CAACoC,KAAV,CAAgB9B,OAAO,CAAC4B,SAAxB;AAXK,CAAvB;AAcA,eAAe1B,UAAf"}
|
|
@@ -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 {
|
|
@@ -70,6 +70,7 @@ declare namespace TeamsDashboard {
|
|
|
70
70
|
badgeCategory: PropTypes.Requireable<string>;
|
|
71
71
|
badgeLabel: PropTypes.Requireable<string>;
|
|
72
72
|
theme: PropTypes.Requireable<string>;
|
|
73
|
+
disabledContent: PropTypes.Requireable<string>;
|
|
73
74
|
'aria-label': PropTypes.Requireable<string>;
|
|
74
75
|
'background-aria-label': PropTypes.Requireable<string>;
|
|
75
76
|
'favorite-aria-label': PropTypes.Requireable<PropTypes.InferProps<{
|
package/es/variables/colors.css
CHANGED
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
@value box_shadow_medium_dark: rgba(0, 0, 0, 0.2);
|
|
74
74
|
@value box_shadow_orange_700: rgba(255, 84, 31, 0.15);
|
|
75
75
|
@value light_blue: #ADC9F5;
|
|
76
|
-
|
|
76
|
+
@value negative_100: #FCDADA;
|
|
77
77
|
@value go1_backgound: #144953;
|
|
78
78
|
@value go1_primary: #D5FD42;
|
|
79
79
|
@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":""}
|
|
@@ -34,6 +34,7 @@ export const cardPropTypes: {
|
|
|
34
34
|
badgeCategory: PropTypes.Requireable<string>;
|
|
35
35
|
badgeLabel: PropTypes.Requireable<string>;
|
|
36
36
|
theme: PropTypes.Requireable<string>;
|
|
37
|
+
disabledContent: PropTypes.Requireable<string>;
|
|
37
38
|
'aria-label': PropTypes.Requireable<string>;
|
|
38
39
|
'background-aria-label': PropTypes.Requireable<string>;
|
|
39
40
|
'favorite-aria-label': PropTypes.Requireable<PropTypes.InferProps<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/card/index.js"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/card/index.js"],"names":[],"mappings":";;;;;AAuPA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BE;;;AA9JF,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
|
-
const handleClick = (0, _react.useMemo)(() => e =>
|
|
179
|
-
const lock = disabled ? /*#__PURE__*/_react.default.createElement(
|
|
178
|
+
const handleClick = (0, _react.useMemo)(() => e => onClick(e), [onClick]);
|
|
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 @@ const cardPropTypes = {
|
|
|
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","cardPropTypes","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\nexport const cardPropTypes = {\n badge: PropTypes.string,\n image: PropTypes.string,\n disabled: PropTypes.bool,\n adaptiv: PropTypes.bool,\n type: PropTypes.string,\n title: PropTypes.string,\n author: PropTypes.string,\n certifiedAuthor: PropTypes.bool,\n customer: PropTypes.shape(Customer.propTypes),\n progress: PropTypes.number,\n favorite: PropTypes.bool,\n addFavoriteToolTip: PropTypes.string,\n removeFavoriteToolTip: PropTypes.string,\n onClick: PropTypes.func,\n onFavoriteClick: PropTypes.func,\n isSelected: PropTypes.bool,\n notification: PropTypes.shape(Notification.propTypes),\n badgeCategory: CardContentInfo.propTypes.badgeCategory,\n badgeLabel: CardContentInfo.propTypes.badgeLabel,\n theme: PropTypes.oneOf(keys(THEMES)),\n 'aria-label': PropTypes.string,\n 'background-aria-label': PropTypes.string,\n 'favorite-aria-label': Favorite.propTypes['aria-label'],\n 'selectable-aria-label': Selectable.propTypes['aria-label'],\n 'customer-aria-label': Customer.propTypes['aria-label'],\n 'badge-aria-label': PropTypes.string,\n 'disabled-aria-label': PropTypes.string,\n 'card-content-aria-label': CardContentInfo.propTypes['aria-label']\n};\n\nCard.propTypes = cardPropTypes;\n\nexport default Card;\n"],"mappings":";;;;;;;;;;;;;;;AAAA;;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,IAAvB,EAA6BW,IAA9C;IACA,MAAMC,SAAS,GAAGH,uCAAA,CAAuBT,IAAvB,EAA6Ba,KAA/C;;IACA,MAAMC,cAAc,gBAClB;MAAK,SAAS,EAAEhB,cAAA,CAAMiB;IAAtB,gBACE,6BAAC,QAAD;MAAU,SAAS,EAAEjB,cAAA,CAAMkB;IAA3B,EADF,CADF;;IAMA,IAAIf,KAAJ,EAAW;MACT,MAAMgB,eAAe,gBACnB;QACE,SAAS,EAAE,IAAAC,mBAAA,EACTpB,cAAA,CAAMiB,yBADG,EAETjB,cAAA,CAAMqB,kCAFG,CADb;QAKE,KAAK,EA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K,EAAEzB,kBAAA,CAAUyD,KAAV,CAAgB,oBAAK9F,MAAL,CAAhB,CApBoB;EAqB3B,cAAcqC,kBAAA,CAAUC,MArBG;EAsB3B,yBAAyBD,kBAAA,CAAUC,MAtBR;EAuB3B,uBAAuByD,iBAAA,CAAS3D,SAAT,CAAmB,YAAnB,CAvBI;EAwB3B,yBAAyB4D,mBAAA,CAAW5D,SAAX,CAAqB,YAArB,CAxBE;EAyB3B,uBAAuBqD,iBAAA,CAASrD,SAAT,CAAmB,YAAnB,CAzBI;EA0B3B,oBAAoBC,kBAAA,CAAUC,MA1BH;EA2B3B,uBAAuBD,kBAAA,CAAUC,MA3BN;EA4B3B,2BAA2BuD,oBAAA,CAAgBzD,SAAhB,CAA0B,YAA1B;AA5BA,CAAtB;;AA+BPI,IAAI,CAACJ,SAAL,2CAAiBmD,aAAjB;eAEe/C,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","cardPropTypes","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 => onClick(e), [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\nexport const cardPropTypes = {\n badge: PropTypes.string,\n image: PropTypes.string,\n disabled: PropTypes.bool,\n adaptiv: PropTypes.bool,\n type: PropTypes.string,\n title: PropTypes.string,\n author: PropTypes.string,\n certifiedAuthor: PropTypes.bool,\n customer: PropTypes.shape(Customer.propTypes),\n progress: PropTypes.number,\n favorite: PropTypes.bool,\n addFavoriteToolTip: PropTypes.string,\n removeFavoriteToolTip: PropTypes.string,\n onClick: PropTypes.func,\n onFavoriteClick: PropTypes.func,\n isSelected: PropTypes.bool,\n notification: PropTypes.shape(Notification.propTypes),\n badgeCategory: CardContentInfo.propTypes.badgeCategory,\n badgeLabel: CardContentInfo.propTypes.badgeLabel,\n theme: PropTypes.oneOf(keys(THEMES)),\n disabledContent: PropTypes.string,\n 'aria-label': PropTypes.string,\n 'background-aria-label': PropTypes.string,\n 'favorite-aria-label': Favorite.propTypes['aria-label'],\n 'selectable-aria-label': Selectable.propTypes['aria-label'],\n 'customer-aria-label': Customer.propTypes['aria-label'],\n 'badge-aria-label': PropTypes.string,\n 'disabled-aria-label': PropTypes.string,\n 'card-content-aria-label': CardContentInfo.propTypes['aria-label']\n};\n\nCard.propTypes = cardPropTypes;\n\nexport default Card;\n"],"mappings":";;;;;;;;;;;;;;;AAAA;;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,IAAvB,EAA6BW,IAA9C;IACA,MAAMC,SAAS,GAAGH,uCAAA,CAAuB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AA,CAAUwD,IAfA;EAgB3BnC,UAAU,EAAErB,kBAAA,CAAUE,IAhBK;EAiB3BoB,YAAY,EAAEtB,kBAAA,CAAUqD,KAAV,CAAgBI,qBAAA,CAAa1D,SAA7B,CAjBa;EAkB3BwB,aAAa,EAAEmC,oBAAA,CAAgB3D,SAAhB,CAA0BwB,aAlBd;EAmB3BC,UAAU,EAAEkC,oBAAA,CAAgB3D,SAAhB,CAA0ByB,UAnBX;EAoB3BC,KAAK,EAAEzB,kBAAA,CAAU2D,KAAV,CAAgB,oBAAKhG,MAAL,CAAhB,CApBoB;EAqB3B+D,eAAe,EAAE1B,kBAAA,CAAUC,MArBA;EAsB3B,cAAcD,kBAAA,CAAUC,MAtBG;EAuB3B,yBAAyBD,kBAAA,CAAUC,MAvBR;EAwB3B,uBAAuB2D,iBAAA,CAAS7D,SAAT,CAAmB,YAAnB,CAxBI;EAyB3B,yBAAyB8D,mBAAA,CAAW9D,SAAX,CAAqB,YAArB,CAzBE;EA0B3B,uBAAuBuD,iBAAA,CAASvD,SAAT,CAAmB,YAAnB,CA1BI;EA2B3B,oBAAoBC,kBAAA,CAAUC,MA3BH;EA4B3B,uBAAuBD,kBAAA,CAAUC,MA5BN;EA6B3B,2BAA2ByD,oBAAA,CAAgB3D,SAAhB,CAA0B,YAA1B;AA7BA,CAAtB;;AAgCPI,IAAI,CAACJ,SAAL,2CAAiBqD,aAAjB;eAEejD,I"}
|
|
@@ -8,9 +8,10 @@
|
|
|
8
8
|
@value dark from colors;
|
|
9
9
|
@value xtraLightGrey from colors;
|
|
10
10
|
@value white from colors;
|
|
11
|
+
@value cm_negative_200 from colors;
|
|
12
|
+
@value negative_100 from colors;
|
|
11
13
|
|
|
12
14
|
.default[disabled] {
|
|
13
|
-
pointer-events: none;
|
|
14
15
|
cursor: inherit;
|
|
15
16
|
}
|
|
16
17
|
|
|
@@ -163,7 +164,7 @@
|
|
|
163
164
|
}
|
|
164
165
|
|
|
165
166
|
.default[disabled] .imageWrapper {
|
|
166
|
-
opacity: 0.
|
|
167
|
+
opacity: 0.8;
|
|
167
168
|
}
|
|
168
169
|
|
|
169
170
|
.lockWrapper {
|
|
@@ -186,12 +187,53 @@
|
|
|
186
187
|
bottom: 0;
|
|
187
188
|
content: '';
|
|
188
189
|
opacity: 0.4;
|
|
189
|
-
background:
|
|
190
|
+
background: linear-gradient(
|
|
191
|
+
to bottom,
|
|
192
|
+
black 50%
|
|
193
|
+
);
|
|
194
|
+
box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.2);
|
|
195
|
+
z-index: 1;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.lockWrapper:hover {
|
|
199
|
+
cursor: pointer;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.lockWrapper:hover .lockIcon {
|
|
203
|
+
background-color: cm_negative_200;
|
|
204
|
+
color: white;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.lockWrapper:hover span {
|
|
208
|
+
font-weight: 600;
|
|
209
|
+
width: 150px;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.lockContent {
|
|
213
|
+
display: flex;
|
|
214
|
+
gap: 8px;
|
|
215
|
+
flex-direction: column;
|
|
216
|
+
z-index: 2;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.lockContent span {
|
|
220
|
+
width: 134px;
|
|
221
|
+
height: 40px;
|
|
222
|
+
color: white;
|
|
223
|
+
text-align: center;
|
|
224
|
+
font-family: 'Gilroy';
|
|
225
|
+
font-size: 14px;
|
|
226
|
+
line-height: 20px;
|
|
190
227
|
}
|
|
191
228
|
|
|
192
229
|
.lockIcon {
|
|
193
|
-
|
|
194
|
-
|
|
230
|
+
width: 48px;
|
|
231
|
+
min-width: 48px;
|
|
232
|
+
min-height: 48px;
|
|
233
|
+
background-color: negative_100;
|
|
234
|
+
align-self: center;
|
|
235
|
+
border-radius: 16px;
|
|
236
|
+
color: cm_negative_200;
|
|
195
237
|
}
|
|
196
238
|
|
|
197
239
|
.imageWrapper {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/cm-popin/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/cm-popin/index.js"],"names":[],"mappings":";AAsBA,kDA6MC"}
|
|
@@ -15,12 +15,22 @@ var _buttonLinkIconOnly = _interopRequireDefault(require("../../atom/button-link
|
|
|
15
15
|
|
|
16
16
|
var _inputSwitch = _interopRequireDefault(require("../../atom/input-switch"));
|
|
17
17
|
|
|
18
|
+
var _title = _interopRequireDefault(require("../../atom/title"));
|
|
19
|
+
|
|
20
|
+
var _cardsGrid = _interopRequireDefault(require("../../organism/cards-grid"));
|
|
21
|
+
|
|
18
22
|
var _style = _interopRequireDefault(require("./style.css"));
|
|
19
23
|
|
|
20
24
|
var _types = _interopRequireDefault(require("./types"));
|
|
21
25
|
|
|
22
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
27
|
|
|
28
|
+
const IconType = {
|
|
29
|
+
lockedContent: /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionCoorpacademyPadlock, {
|
|
30
|
+
className: _style.default.lockIcon
|
|
31
|
+
})
|
|
32
|
+
};
|
|
33
|
+
|
|
24
34
|
const CMPopin = props => {
|
|
25
35
|
const {
|
|
26
36
|
content,
|
|
@@ -35,7 +45,8 @@ const CMPopin = props => {
|
|
|
35
45
|
thirdButton,
|
|
36
46
|
cookieTitle,
|
|
37
47
|
descriptionBtnTxt,
|
|
38
|
-
listBtnSwicth
|
|
48
|
+
listBtnSwicth,
|
|
49
|
+
items
|
|
39
50
|
} = props;
|
|
40
51
|
const logo = {
|
|
41
52
|
AlertDiamond: _novaIcons.NovaSolidInterfaceFeedbackInterfaceAlertDiamond,
|
|
@@ -50,10 +61,28 @@ const CMPopin = props => {
|
|
|
50
61
|
} : null;
|
|
51
62
|
|
|
52
63
|
const renderHeader = () => {
|
|
53
|
-
if (header)
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
64
|
+
if (header) {
|
|
65
|
+
const {
|
|
66
|
+
title,
|
|
67
|
+
headerIcon,
|
|
68
|
+
backgroundImage
|
|
69
|
+
} = header;
|
|
70
|
+
const TopTitleIcon = IconType[headerIcon];
|
|
71
|
+
|
|
72
|
+
if (title) {
|
|
73
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
74
|
+
className: _style.default.headerContent
|
|
75
|
+
}, TopTitleIcon, /*#__PURE__*/_react.default.createElement("div", {
|
|
76
|
+
className: _style.default.headerTitle
|
|
77
|
+
}, /*#__PURE__*/_react.default.createElement(_title.default, title)));
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
return /*#__PURE__*/_react.default.createElement("img", {
|
|
81
|
+
className: _style.default.headerBackground,
|
|
82
|
+
src: backgroundImage
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
|
|
57
86
|
if (mode === 'cookie') return /*#__PURE__*/_react.default.createElement("div", {
|
|
58
87
|
className: _style.default.cookieHeader
|
|
59
88
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -115,6 +144,14 @@ const CMPopin = props => {
|
|
|
115
144
|
})(listBtnSwicth);
|
|
116
145
|
};
|
|
117
146
|
|
|
147
|
+
const renderItems = () => {
|
|
148
|
+
const {
|
|
149
|
+
type,
|
|
150
|
+
list
|
|
151
|
+
} = items;
|
|
152
|
+
return type === 'content' ? /*#__PURE__*/_react.default.createElement(_cardsGrid.default, list) : null;
|
|
153
|
+
};
|
|
154
|
+
|
|
118
155
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
119
156
|
className: mode !== 'cookie' ? _style.default.background : null,
|
|
120
157
|
style: backgroundImageStyle,
|
|
@@ -129,7 +166,7 @@ const CMPopin = props => {
|
|
|
129
166
|
"aria-label": 'close-icon',
|
|
130
167
|
size: "small",
|
|
131
168
|
icon: "close"
|
|
132
|
-
}) : null), /*#__PURE__*/_react.default.createElement("div", {
|
|
169
|
+
}) : null), mode !== 'items' ? /*#__PURE__*/_react.default.createElement("div", {
|
|
133
170
|
className: mode === 'cookie' || mode === 'information' ? _style.default.cookieTitleContainer : _style.default.titleContainer
|
|
134
171
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
135
172
|
className: _style.default.contentSection
|
|
@@ -148,9 +185,12 @@ const CMPopin = props => {
|
|
|
148
185
|
dangerouslySetInnerHTML: {
|
|
149
186
|
__html: descriptionText
|
|
150
187
|
}
|
|
151
|
-
}) : null), descriptionBtnTxt ? /*#__PURE__*/_react.default.createElement("div", {
|
|
188
|
+
}) : null) : null, descriptionBtnTxt ? /*#__PURE__*/_react.default.createElement("div", {
|
|
152
189
|
className: _style.default.descriptionBtn
|
|
153
|
-
}, descriptionBtnTxt) : null,
|
|
190
|
+
}, descriptionBtnTxt) : null, items ? /*#__PURE__*/_react.default.createElement("div", {
|
|
191
|
+
className: _style.default.itemsContainer,
|
|
192
|
+
"data-name": 'cm-popin-cards'
|
|
193
|
+
}, renderItems()) : null, renderBtnSwitch(), firstButton || secondButton || thirdButton ? /*#__PURE__*/_react.default.createElement("div", {
|
|
154
194
|
className: _style.default.buttonContainer
|
|
155
195
|
}, firstButton ? /*#__PURE__*/_react.default.createElement("div", {
|
|
156
196
|
className: firstButton.largeButton ? _style.default.largeButton : _style.default.button
|