@coorpacademy/components 11.35.1 → 11.35.2-alpha.10
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/button-link/index.js +1 -1
- package/es/atom/button-link/index.js.map +1 -1
- package/es/atom/button-link/style.css +2 -2
- package/es/atom/button-menu/utils.d.ts +1 -1
- package/es/atom/icon/index.d.ts +35 -17
- package/es/atom/icon/index.d.ts.map +1 -1
- package/es/atom/icon/index.js +32 -15
- package/es/atom/icon/index.js.map +1 -1
- package/es/atom/radio-with-title/index.d.ts +13 -3
- package/es/atom/radio-with-title/index.d.ts.map +1 -1
- package/es/atom/radio-with-title/types.d.ts +13 -2
- package/es/atom/radio-with-title/types.d.ts.map +1 -1
- package/es/atom/status-item/index.native.js +1 -1
- package/es/atom/status-item/index.native.js.map +1 -1
- package/es/atom/tag/index.d.ts +12 -1
- package/es/atom/tag/style.css +1 -0
- package/es/atom/title/index.d.ts +13 -2
- package/es/molecule/banner/style.css +1 -0
- package/es/molecule/base-modal/style.css +0 -1
- package/es/molecule/bulk-progress-bar/index.js +2 -2
- package/es/molecule/bulk-progress-bar/index.js.map +1 -1
- package/es/molecule/certification-card/index.js +1 -1
- package/es/molecule/certification-card/index.js.map +1 -1
- package/es/molecule/cm-popin/types.d.ts +28 -7
- package/es/molecule/cm-popin/types.d.ts.map +1 -1
- package/es/molecule/cm-popin/types.js +1 -1
- package/es/molecule/cm-popin/types.js.map +1 -1
- package/es/molecule/learner-skill-card/index.d.ts +25 -40
- package/es/molecule/learner-skill-card/index.d.ts.map +1 -1
- package/es/molecule/learner-skill-card/index.js +90 -96
- package/es/molecule/learner-skill-card/index.js.map +1 -1
- package/es/molecule/learner-skill-card/prop-types.d.ts +37 -0
- package/es/molecule/learner-skill-card/prop-types.d.ts.map +1 -0
- package/es/molecule/learner-skill-card/prop-types.js +20 -0
- package/es/molecule/learner-skill-card/prop-types.js.map +1 -0
- package/es/molecule/learner-skill-card/style.css +62 -41
- package/es/molecule/learning-priority-modal/style.css +3 -2
- package/es/molecule/progress-wrapper/index.js +1 -1
- package/es/molecule/progress-wrapper/index.js.map +1 -1
- package/es/molecule/skills-chart-side-information-item/index.d.ts +1 -1
- package/es/molecule/skills-chart-side-information-panel/index.d.ts +1 -1
- package/es/molecule/title-and-checkbox-wrapper/index.d.ts +13 -2
- package/es/molecule/title-radio-wrapper/index.d.ts +13 -3
- package/es/molecule/title-radio-wrapper/index.d.ts.map +1 -1
- package/es/molecule/title-radio-wrapper/types.d.ts +13 -2
- package/es/molecule/title-radio-wrapper/types.d.ts.map +1 -1
- package/es/organism/cards-grid/index.d.ts +48 -10
- package/es/organism/cards-grid/index.d.ts.map +1 -1
- package/es/organism/cards-grid/index.js +3 -2
- package/es/organism/cards-grid/index.js.map +1 -1
- package/es/organism/content-skill-modal/index.d.ts +13 -3
- package/es/organism/content-skill-modal/index.d.ts.map +1 -1
- package/es/organism/content-skill-modal/types.d.ts +12 -2
- package/es/organism/content-skill-modal/types.d.ts.map +1 -1
- package/es/organism/list-item/index.js +5 -5
- package/es/organism/list-item/index.js.map +1 -1
- package/es/organism/list-item/style.css +23 -17
- package/es/organism/list-items/index.d.ts +13 -2
- package/es/organism/mooc-header/index.d.ts.map +1 -1
- package/es/organism/mooc-header/index.js +23 -28
- package/es/organism/mooc-header/index.js.map +1 -1
- package/es/organism/mooc-header/style.css +56 -37
- package/es/organism/rewards-form/index.d.ts +13 -2
- package/es/organism/select-opponents/index.d.ts +13 -3
- package/es/organism/select-opponents/index.d.ts.map +1 -1
- package/es/organism/select-opponents/types.d.ts +13 -2
- package/es/organism/select-opponents/types.d.ts.map +1 -1
- package/es/organism/sidebar/index.d.ts +2 -2
- package/es/organism/skill-edition/index.d.ts +37 -7
- package/es/organism/skill-edition/index.d.ts.map +1 -1
- package/es/organism/skill-edition/types.d.ts +37 -6
- package/es/organism/skill-edition/types.d.ts.map +1 -1
- package/es/organism/title-and-input/index.d.ts +25 -5
- package/es/organism/title-and-input/index.d.ts.map +1 -1
- package/es/organism/title-and-input/types.d.ts +24 -4
- package/es/organism/title-and-input/types.d.ts.map +1 -1
- package/es/organism/wizard-contents/index.d.ts +13 -2
- package/es/template/app-player/loading/index.d.ts +27 -6
- package/es/template/app-player/player/index.d.ts +53 -12
- package/es/template/app-player/player/slides/index.d.ts +27 -6
- package/es/template/app-player/player/slides/index.d.ts.map +1 -1
- package/es/template/app-player/popin-correction/index.d.ts +26 -6
- package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/es/template/app-player/popin-end/index.d.ts +27 -6
- package/es/template/app-review/index.d.ts +27 -7
- package/es/template/app-review/index.d.ts.map +1 -1
- package/es/template/app-review/player/prop-types.d.ts +27 -6
- package/es/template/app-review/player/prop-types.d.ts.map +1 -1
- package/es/template/app-review/prop-types.d.ts +27 -6
- package/es/template/app-review/prop-types.d.ts.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +87 -16
- package/es/template/back-office/brand-update/utils.d.ts +2 -2
- package/es/template/common/dashboard/index.d.ts +53 -12
- package/es/template/common/search-page/index.d.ts +27 -6
- package/es/template/external-course/index.d.ts +27 -6
- package/es/template/my-learning/index.d.ts +0 -1
- package/es/template/my-learning/index.d.ts.map +1 -1
- package/es/template/my-learning/index.js +26 -22
- package/es/template/my-learning/index.js.map +1 -1
- package/es/template/my-learning/style.css +9 -6
- package/es/template/skill-detail/all-courses.css +2 -2
- package/es/template/skill-detail/all-courses.d.ts +52 -17
- package/es/template/skill-detail/all-courses.d.ts.map +1 -1
- package/es/template/skill-detail/all-courses.js +12 -11
- package/es/template/skill-detail/all-courses.js.map +1 -1
- package/es/template/skill-detail/continue-learning.css +7 -2
- package/es/template/skill-detail/continue-learning.d.ts +25 -12
- package/es/template/skill-detail/continue-learning.d.ts.map +1 -1
- package/es/template/skill-detail/continue-learning.js.map +1 -1
- package/es/template/skill-detail/index.d.ts +81 -71
- package/es/template/skill-detail/index.d.ts.map +1 -1
- package/es/template/skill-detail/index.js +91 -58
- package/es/template/skill-detail/index.js.map +1 -1
- package/es/template/skill-detail/style.css +97 -39
- package/es/variables/colors.css +12 -0
- package/es/variables/colors.d.ts +15 -3
- package/es/variables/colors.d.ts.map +1 -1
- package/es/variables/colors.js +16 -4
- package/es/variables/colors.js.map +1 -1
- package/es/variables/theme.native.js +1 -1
- package/es/variables/theme.native.js.map +1 -1
- package/lib/atom/button-link/index.js +1 -1
- package/lib/atom/button-link/index.js.map +1 -1
- package/lib/atom/button-link/style.css +2 -2
- package/lib/atom/button-menu/utils.d.ts +1 -1
- package/lib/atom/icon/index.d.ts +35 -17
- package/lib/atom/icon/index.d.ts.map +1 -1
- package/lib/atom/icon/index.js +34 -18
- package/lib/atom/icon/index.js.map +1 -1
- package/lib/atom/radio-with-title/index.d.ts +13 -3
- package/lib/atom/radio-with-title/index.d.ts.map +1 -1
- package/lib/atom/radio-with-title/types.d.ts +13 -2
- package/lib/atom/radio-with-title/types.d.ts.map +1 -1
- package/lib/atom/status-item/index.native.js +1 -1
- package/lib/atom/status-item/index.native.js.map +1 -1
- package/lib/atom/tag/index.d.ts +12 -1
- package/lib/atom/tag/style.css +1 -0
- package/lib/atom/title/index.d.ts +13 -2
- package/lib/molecule/banner/style.css +1 -0
- package/lib/molecule/base-modal/style.css +0 -1
- package/lib/molecule/bulk-progress-bar/index.js +2 -2
- package/lib/molecule/bulk-progress-bar/index.js.map +1 -1
- package/lib/molecule/certification-card/index.js +1 -1
- package/lib/molecule/certification-card/index.js.map +1 -1
- package/lib/molecule/cm-popin/types.d.ts +28 -7
- package/lib/molecule/cm-popin/types.d.ts.map +1 -1
- package/lib/molecule/cm-popin/types.js +1 -1
- package/lib/molecule/cm-popin/types.js.map +1 -1
- package/lib/molecule/learner-skill-card/index.d.ts +25 -40
- package/lib/molecule/learner-skill-card/index.d.ts.map +1 -1
- package/lib/molecule/learner-skill-card/index.js +93 -96
- package/lib/molecule/learner-skill-card/index.js.map +1 -1
- package/lib/molecule/learner-skill-card/prop-types.d.ts +37 -0
- package/lib/molecule/learner-skill-card/prop-types.d.ts.map +1 -0
- package/lib/molecule/learner-skill-card/prop-types.js +25 -0
- package/lib/molecule/learner-skill-card/prop-types.js.map +1 -0
- package/lib/molecule/learner-skill-card/style.css +62 -41
- package/lib/molecule/learning-priority-modal/style.css +3 -2
- package/lib/molecule/progress-wrapper/index.js +1 -1
- package/lib/molecule/progress-wrapper/index.js.map +1 -1
- package/lib/molecule/skills-chart-side-information-item/index.d.ts +1 -1
- package/lib/molecule/skills-chart-side-information-panel/index.d.ts +1 -1
- package/lib/molecule/title-and-checkbox-wrapper/index.d.ts +13 -2
- package/lib/molecule/title-radio-wrapper/index.d.ts +13 -3
- package/lib/molecule/title-radio-wrapper/index.d.ts.map +1 -1
- package/lib/molecule/title-radio-wrapper/types.d.ts +13 -2
- package/lib/molecule/title-radio-wrapper/types.d.ts.map +1 -1
- package/lib/organism/cards-grid/index.d.ts +48 -10
- package/lib/organism/cards-grid/index.d.ts.map +1 -1
- package/lib/organism/cards-grid/index.js +3 -2
- package/lib/organism/cards-grid/index.js.map +1 -1
- package/lib/organism/content-skill-modal/index.d.ts +13 -3
- package/lib/organism/content-skill-modal/index.d.ts.map +1 -1
- package/lib/organism/content-skill-modal/types.d.ts +12 -2
- package/lib/organism/content-skill-modal/types.d.ts.map +1 -1
- package/lib/organism/list-item/index.js +5 -5
- package/lib/organism/list-item/index.js.map +1 -1
- package/lib/organism/list-item/style.css +23 -17
- package/lib/organism/list-items/index.d.ts +13 -2
- package/lib/organism/mooc-header/index.d.ts.map +1 -1
- package/lib/organism/mooc-header/index.js +22 -27
- package/lib/organism/mooc-header/index.js.map +1 -1
- package/lib/organism/mooc-header/style.css +56 -37
- package/lib/organism/rewards-form/index.d.ts +13 -2
- package/lib/organism/select-opponents/index.d.ts +13 -3
- package/lib/organism/select-opponents/index.d.ts.map +1 -1
- package/lib/organism/select-opponents/types.d.ts +13 -2
- package/lib/organism/select-opponents/types.d.ts.map +1 -1
- package/lib/organism/sidebar/index.d.ts +2 -2
- package/lib/organism/skill-edition/index.d.ts +37 -7
- package/lib/organism/skill-edition/index.d.ts.map +1 -1
- package/lib/organism/skill-edition/types.d.ts +37 -6
- package/lib/organism/skill-edition/types.d.ts.map +1 -1
- package/lib/organism/title-and-input/index.d.ts +25 -5
- package/lib/organism/title-and-input/index.d.ts.map +1 -1
- package/lib/organism/title-and-input/types.d.ts +24 -4
- package/lib/organism/title-and-input/types.d.ts.map +1 -1
- package/lib/organism/wizard-contents/index.d.ts +13 -2
- package/lib/template/app-player/loading/index.d.ts +27 -6
- package/lib/template/app-player/player/index.d.ts +53 -12
- package/lib/template/app-player/player/slides/index.d.ts +27 -6
- package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-correction/index.d.ts +26 -6
- package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-end/index.d.ts +27 -6
- package/lib/template/app-review/index.d.ts +27 -7
- package/lib/template/app-review/index.d.ts.map +1 -1
- package/lib/template/app-review/player/prop-types.d.ts +27 -6
- package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
- package/lib/template/app-review/prop-types.d.ts +27 -6
- package/lib/template/app-review/prop-types.d.ts.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +87 -16
- package/lib/template/back-office/brand-update/utils.d.ts +2 -2
- package/lib/template/common/dashboard/index.d.ts +53 -12
- package/lib/template/common/search-page/index.d.ts +27 -6
- package/lib/template/external-course/index.d.ts +27 -6
- package/lib/template/my-learning/index.d.ts +0 -1
- package/lib/template/my-learning/index.d.ts.map +1 -1
- package/lib/template/my-learning/index.js +26 -22
- package/lib/template/my-learning/index.js.map +1 -1
- package/lib/template/my-learning/style.css +9 -6
- package/lib/template/skill-detail/all-courses.css +2 -2
- package/lib/template/skill-detail/all-courses.d.ts +52 -17
- package/lib/template/skill-detail/all-courses.d.ts.map +1 -1
- package/lib/template/skill-detail/all-courses.js +11 -11
- package/lib/template/skill-detail/all-courses.js.map +1 -1
- package/lib/template/skill-detail/continue-learning.css +7 -2
- package/lib/template/skill-detail/continue-learning.d.ts +25 -12
- package/lib/template/skill-detail/continue-learning.d.ts.map +1 -1
- package/lib/template/skill-detail/continue-learning.js.map +1 -1
- package/lib/template/skill-detail/index.d.ts +81 -71
- package/lib/template/skill-detail/index.d.ts.map +1 -1
- package/lib/template/skill-detail/index.js +91 -58
- package/lib/template/skill-detail/index.js.map +1 -1
- package/lib/template/skill-detail/style.css +97 -39
- package/lib/variables/colors.css +12 -0
- package/lib/variables/colors.d.ts +15 -3
- package/lib/variables/colors.d.ts.map +1 -1
- package/lib/variables/colors.js +16 -4
- package/lib/variables/colors.js.map +1 -1
- package/lib/variables/theme.native.js +1 -1
- package/lib/variables/theme.native.js.map +1 -1
- package/locales/cs/global.json +1 -0
- package/locales/en/global.json +1 -0
- package/locales/hr/global.json +1 -0
- package/locales/it/global.json +1 -0
- package/locales/ko/global.json +1 -0
- package/locales/ru/global.json +1 -0
- package/package.json +2 -2
|
@@ -8,7 +8,7 @@ declare namespace Title {
|
|
|
8
8
|
'data-name': PropTypes.Requireable<string>;
|
|
9
9
|
titleSize: PropTypes.Requireable<string>;
|
|
10
10
|
subtitleSize: PropTypes.Requireable<string>;
|
|
11
|
-
icon: PropTypes.Requireable<PropTypes.InferProps<any
|
|
11
|
+
icon: PropTypes.Requireable<PropTypes.InferProps<PropTypes.ValidationMap<any>>>;
|
|
12
12
|
tag: PropTypes.Requireable<PropTypes.InferProps<{
|
|
13
13
|
label: PropTypes.Requireable<string>;
|
|
14
14
|
type: PropTypes.Requireable<string>;
|
|
@@ -16,7 +16,17 @@ declare namespace Title {
|
|
|
16
16
|
customStyle: PropTypes.Requireable<{
|
|
17
17
|
[x: string]: NonNullable<string | number | null | undefined> | null | undefined;
|
|
18
18
|
}>;
|
|
19
|
-
icon: PropTypes.Requireable<PropTypes.InferProps<
|
|
19
|
+
icon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
20
|
+
position: PropTypes.Requireable<string>;
|
|
21
|
+
iconName?: React.Validator<string> | undefined;
|
|
22
|
+
iconColor?: React.Validator<string | null | undefined> | undefined;
|
|
23
|
+
backgroundColor?: React.Validator<string | null | undefined> | undefined;
|
|
24
|
+
gradientBackground?: React.Validator<boolean | null | undefined> | undefined;
|
|
25
|
+
borderRadius?: React.Validator<string | null | undefined> | undefined;
|
|
26
|
+
preset?: React.Validator<string | null | undefined> | undefined;
|
|
27
|
+
size?: React.Validator<import("../icon").IconSize | null | undefined> | undefined;
|
|
28
|
+
customStyle?: React.Validator<React.CSSProperties | null | undefined> | undefined;
|
|
29
|
+
}>>;
|
|
20
30
|
}>>;
|
|
21
31
|
button: PropTypes.Requireable<PropTypes.InferProps<{
|
|
22
32
|
type: PropTypes.Requireable<string>;
|
|
@@ -59,4 +69,5 @@ declare namespace Title {
|
|
|
59
69
|
};
|
|
60
70
|
}
|
|
61
71
|
import PropTypes from "prop-types";
|
|
72
|
+
import React from "react";
|
|
62
73
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -12,7 +12,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
12
12
|
const {
|
|
13
13
|
negative: cm_negative_100,
|
|
14
14
|
cm_primary_blue,
|
|
15
|
-
|
|
15
|
+
cm_positive_500
|
|
16
16
|
} = _colors.COLORS;
|
|
17
17
|
const STATUS = {
|
|
18
18
|
inProgress: 'inProgress',
|
|
@@ -36,7 +36,7 @@ const resolveProgressBarColor = status => {
|
|
|
36
36
|
case STATUS.inProgress:
|
|
37
37
|
return cm_primary_blue;
|
|
38
38
|
default:
|
|
39
|
-
return
|
|
39
|
+
return cm_positive_500;
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
42
|
const BulkProgressBar = props => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_progressBar","_statusItem","_colors","_style","_types","e","__esModule","default","negative","cm_negative_100","cm_primary_blue","
|
|
1
|
+
{"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_progressBar","_statusItem","_colors","_style","_types","e","__esModule","default","negative","cm_negative_100","cm_primary_blue","cm_positive_500","COLORS","STATUS","inProgress","fail","renderStatusIcon","status","progress","createElement","role","className","style","progressText","statusItemWrapper","icon","resolveProgressBarColor","BulkProgressBar","props","dataName","container","progressBar","value","max","steps","backgroundColor","borderRadius","displayInfo","propTypes","process","env","NODE_ENV","_default","exports"],"sources":["../../../src/molecule/bulk-progress-bar/index.tsx"],"sourcesContent":["import React from 'react';\nimport ProgressBar from '../progress-bar';\nimport StatusItem from '../../atom/status-item';\nimport {COLORS} from '../../variables/colors';\nimport style from './style.css';\nimport {Props, propTypes, Status} from './types';\n\nconst {negative: cm_negative_100, cm_primary_blue, cm_positive_500} = COLORS;\n\nconst STATUS = {\n inProgress: 'inProgress',\n fail: 'fail'\n};\n\nconst renderStatusIcon = (status: Status, progress: number) => {\n if (status === STATUS.inProgress)\n return <div role=\"status\" className={style.progressText}>{`${progress} %`}</div>;\n return (\n <div className={style.statusItemWrapper}>\n <StatusItem icon={status === STATUS.fail ? 'invalid' : 'valid'} />\n </div>\n );\n};\n\nconst resolveProgressBarColor = (status: Status) => {\n switch (status) {\n case STATUS.fail:\n return cm_negative_100;\n case STATUS.inProgress:\n return cm_primary_blue;\n default:\n return cm_positive_500;\n }\n};\n\nconst BulkProgressBar = (props: Props) => {\n const {'data-name': dataName, status, progress} = props;\n\n return (\n <div className={style.container} data-name={dataName}>\n <ProgressBar\n className={style.progressBar}\n value={progress}\n max={100}\n steps={0}\n style={{backgroundColor: resolveProgressBarColor(status), borderRadius: '10px'}}\n displayInfo={false}\n />\n {renderStatusIcon(status, progress)}\n </div>\n );\n};\n\nBulkProgressBar.propTypes = propTypes;\n\nexport default BulkProgressBar;\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,WA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Q,CAAC,GAAGU,KAAK;EAEvD,oBACE/B,MAAA,CAAAU,OAAA,CAAAY,aAAA;IAAKE,SAAS,EAAEC,cAAK,CAACQ,SAAU;IAAC,aAAWD;EAAS,gBACnDhC,MAAA,CAAAU,OAAA,CAAAY,aAAA,CAACnB,YAAA,CAAAO,OAAW;IACVc,SAAS,EAAEC,cAAK,CAACS,WAAY;IAC7BC,KAAK,EAAEd,QAAS;IAChBe,GAAG,EAAE,GAAI;IACTC,KAAK,EAAE,CAAE;IACTZ,KAAK,EAAE;MAACa,eAAe,EAAET,uBAAuB,CAACT,MAAM,CAAC;MAAEmB,YAAY,EAAE;IAAM,CAAE;IAChFC,WAAW,EAAE;EAAM,CACpB,CAAC,EACDrB,gBAAgB,CAACC,MAAM,EAAEC,QAAQ,CAC/B,CAAC;AAEV,CAAC;AAEDS,eAAe,CAACW,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGH,gBAAS;AAAC,IAAAI,QAAA,GAAAC,OAAA,CAAApC,OAAA,GAEvBoB,eAAe","ignoreList":[]}
|
|
@@ -77,7 +77,7 @@ const CertificationCard = (props, context) => {
|
|
|
77
77
|
}, conditionDescriptionProgress)), /*#__PURE__*/_react.default.createElement(_progressBar.default, {
|
|
78
78
|
className: _style.default.customProgressBar,
|
|
79
79
|
style: {
|
|
80
|
-
backgroundColor: _colors.COLORS.
|
|
80
|
+
backgroundColor: _colors.COLORS.cm_positive_500
|
|
81
81
|
},
|
|
82
82
|
displayInfo: false,
|
|
83
83
|
value: progress,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_propTypes","_colors","_provider","_tag","_progressBar","_style","e","__esModule","default","CertificationCard","props","context","label","locales","conditionDescriptionProgress","tag","goal","title","progress","imgUrl","onClick","translate","isInprogress","progressLabel","progressTagType","progressIconProps","position","iconName","iconColor","backgroundColor","size","faSize","wrapperSize","customStyle","padding","createElement","className","style","container","type","top","right","icon","imageSection","imageContainer","src","detailWrapper","titleWrapper","moduleCount","customProgressBar","COLORS","
|
|
1
|
+
{"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_propTypes","_colors","_provider","_tag","_progressBar","_style","e","__esModule","default","CertificationCard","props","context","label","locales","conditionDescriptionProgress","tag","goal","title","progress","imgUrl","onClick","translate","isInprogress","progressLabel","progressTagType","progressIconProps","position","iconName","iconColor","backgroundColor","size","faSize","wrapperSize","customStyle","padding","createElement","className","style","container","type","top","right","icon","imageSection","imageContainer","src","detailWrapper","titleWrapper","moduleCount","customProgressBar","COLORS","cm_positive_500","displayInfo","value","max","contextTypes","Provider","childContextTypes","propTypes","process","env","NODE_ENV","PropTypes","string","shape","condition","nbDone","number","func","_default","exports"],"sources":["../../../src/molecule/certification-card/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {COLORS} from '../../variables/colors';\nimport Provider from '../../atom/provider';\nimport Tag from '../../atom/tag';\nimport ProgressBar from '../progress-bar';\nimport style from './style.css';\n\nconst CertificationCard = (props, context) => {\n const {\n label,\n locales: {conditionDescriptionProgress, tag},\n goal: {title},\n progress,\n imgUrl,\n onClick\n } = props;\n const {translate} = context;\n const isInprogress = progress < 100;\n const progressLabel = isInprogress ? translate('in_progress') : translate('completed');\n const progressTagType = isInprogress ? 'progress' : 'success';\n\n const progressIconProps = {\n position: 'left',\n iconName: isInprogress ? 'clock' : 'circle-check',\n iconColor: isInprogress ? '#B87A00' : '#05944F',\n backgroundColor: isInprogress ? '#FFEECC' : '#D6F5E5',\n size: {\n faSize: 10,\n wrapperSize: 10\n },\n customStyle: {padding: 0}\n };\n\n return (\n <div className={style.container} data-name={`certification-card-${label}`} onClick={onClick}>\n {progress > 0 ? (\n <Tag\n label={progressLabel}\n type={progressTagType}\n customStyle={{position: 'absolute', top: '12px', right: '12px'}}\n icon={progressIconProps}\n />\n ) : null}\n <div className={style.imageSection}>\n <div className={style.imageContainer}>\n <img src={imgUrl} />\n </div>\n </div>\n <div className={style.detailWrapper}>\n <div className={style.titleWrapper}>\n <Tag label={tag} size=\"S\" />\n <div className={style.title} data-name=\"certification-title\">\n {title}\n </div>\n <div className={style.moduleCount}>{conditionDescriptionProgress}</div>\n </div>\n <ProgressBar\n className={style.customProgressBar}\n style={{backgroundColor: COLORS.cm_positive_500}}\n displayInfo={false}\n value={progress}\n max={100}\n />\n </div>\n </div>\n );\n};\n\nCertificationCard.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nCertificationCard.propTypes = {\n label: PropTypes.string,\n goal: PropTypes.shape({\n title: PropTypes.string,\n condition: PropTypes.shape({\n nbDone: PropTypes.number\n })\n }),\n progress: PropTypes.number,\n imgUrl: PropTypes.string,\n onClick: PropTypes.func,\n locales: PropTypes.shape({\n conditionDescriptionProgress: PropTypes.string,\n tag: PropTypes.string\n })\n};\n\nexport default CertificationCard;\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,IAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,YAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,MAAA,GAAAP,sBAAA,CAAAC,OAAA;AAAgC,SAAAD,uBAAAQ,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEhC,MAAMG,iBAAiB,GAAGA,CAACC,KAAK,EAAEC,OAAO,KAAK;EAC5C,MAAM;IACJC,KAAK;IACLC,OAAO,EAAE;MAACC,4BAA4B;MAAEC;IAAG,CAAC;IAC5CC,IAAI,EAAE;MAACC;IAAK,CAAC;IACbC,QAAQ;IACRC,MAAM;IACNC;EACF,CAAC,GAAGV,KAAK;EACT,MAAM;IAACW;EAAS,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,CAAC;EACH,CAAC,CAAC;EACFjD,QAAQ,EAAE4C,kBAAS,CAACK,MAAM;EAC1BhD,MAAM,EAAE2C,kBAAS,CAACC,MAAM;EACxB3C,OAAO,EAAE0C,kBAAS,CAACM,IAAI;EACvBvD,OAAO,EAAEiD,kBAAS,CAACE,KAAK,CAAC;IACvBlD,4BAA4B,EAAEgD,kBAAS,CAACC,MAAM;IAC9ChD,GAAG,EAAE+C,kBAAS,CAACC;EACjB,CAAC;AACH,CAAC;AAAC,IAAAM,QAAA,GAAAC,OAAA,CAAA9D,OAAA,GAEaC,iBAAiB","ignoreList":[]}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import PropTypes from 'prop-types';
|
|
2
3
|
import Link from '../../atom/link';
|
|
3
4
|
import { TitleProps } from '../../atom/title/types';
|
|
4
5
|
import CardsGrid from '../../organism/cards-grid';
|
|
5
6
|
import ListItems from '../../organism/list-items';
|
|
6
|
-
import { iconPropTypes } from '../../atom/icon';
|
|
7
|
+
import { propTypes as iconPropTypes } from '../../atom/icon';
|
|
7
8
|
declare const propTypes: {
|
|
8
9
|
content: PropTypes.Requireable<string>;
|
|
9
10
|
mode: PropTypes.Requireable<string>;
|
|
@@ -15,7 +16,7 @@ declare const propTypes: {
|
|
|
15
16
|
'data-name': PropTypes.Requireable<string>;
|
|
16
17
|
titleSize: PropTypes.Requireable<string>;
|
|
17
18
|
subtitleSize: PropTypes.Requireable<string>;
|
|
18
|
-
icon: PropTypes.Requireable<PropTypes.InferProps<any
|
|
19
|
+
icon: PropTypes.Requireable<PropTypes.InferProps<PropTypes.ValidationMap<any>>>;
|
|
19
20
|
tag: PropTypes.Requireable<PropTypes.InferProps<{
|
|
20
21
|
label: PropTypes.Requireable<string>;
|
|
21
22
|
type: PropTypes.Requireable<string>;
|
|
@@ -23,7 +24,17 @@ declare const propTypes: {
|
|
|
23
24
|
customStyle: PropTypes.Requireable<{
|
|
24
25
|
[x: string]: NonNullable<string | number | null | undefined> | null | undefined;
|
|
25
26
|
}>;
|
|
26
|
-
icon: PropTypes.Requireable<PropTypes.InferProps<
|
|
27
|
+
icon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
28
|
+
position: PropTypes.Requireable<string>;
|
|
29
|
+
iconName?: import("react").Validator<string> | undefined;
|
|
30
|
+
iconColor?: import("react").Validator<string | null | undefined> | undefined;
|
|
31
|
+
backgroundColor?: import("react").Validator<string | null | undefined> | undefined;
|
|
32
|
+
gradientBackground?: import("react").Validator<boolean | null | undefined> | undefined;
|
|
33
|
+
borderRadius?: import("react").Validator<string | null | undefined> | undefined;
|
|
34
|
+
preset?: import("react").Validator<string | null | undefined> | undefined;
|
|
35
|
+
size?: import("react").Validator<import("../../atom/icon").IconSize | null | undefined> | undefined;
|
|
36
|
+
customStyle?: import("react").Validator<import("react").CSSProperties | null | undefined> | undefined;
|
|
37
|
+
}>>;
|
|
27
38
|
}>>;
|
|
28
39
|
button: PropTypes.Requireable<PropTypes.InferProps<{
|
|
29
40
|
type: PropTypes.Requireable<string>;
|
|
@@ -110,8 +121,8 @@ declare const propTypes: {
|
|
|
110
121
|
borderRadius: PropTypes.Requireable<string>;
|
|
111
122
|
preset: PropTypes.Requireable<string>;
|
|
112
123
|
size: PropTypes.Requireable<PropTypes.InferProps<{
|
|
113
|
-
faSize: PropTypes.
|
|
114
|
-
wrapperSize: PropTypes.
|
|
124
|
+
faSize: PropTypes.Validator<number>;
|
|
125
|
+
wrapperSize: PropTypes.Validator<number>;
|
|
115
126
|
}>>;
|
|
116
127
|
customStyle: PropTypes.Requireable<{
|
|
117
128
|
[x: string]: NonNullable<string | number | null | undefined> | null | undefined;
|
|
@@ -549,7 +560,7 @@ declare const propTypes: {
|
|
|
549
560
|
'data-name': PropTypes.Requireable<string>;
|
|
550
561
|
titleSize: PropTypes.Requireable<string>;
|
|
551
562
|
subtitleSize: PropTypes.Requireable<string>;
|
|
552
|
-
icon: PropTypes.Requireable<PropTypes.InferProps<any
|
|
563
|
+
icon: PropTypes.Requireable<PropTypes.InferProps<PropTypes.ValidationMap<any>>>;
|
|
553
564
|
tag: PropTypes.Requireable<PropTypes.InferProps<{
|
|
554
565
|
label: PropTypes.Requireable<string>;
|
|
555
566
|
type: PropTypes.Requireable<string>;
|
|
@@ -557,7 +568,17 @@ declare const propTypes: {
|
|
|
557
568
|
customStyle: PropTypes.Requireable<{
|
|
558
569
|
[x: string]: NonNullable<string | number | null | undefined> | null | undefined;
|
|
559
570
|
}>;
|
|
560
|
-
icon: PropTypes.Requireable<PropTypes.InferProps<
|
|
571
|
+
icon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
572
|
+
position: PropTypes.Requireable<string>;
|
|
573
|
+
iconName?: import("react").Validator<string> | undefined;
|
|
574
|
+
iconColor?: import("react").Validator<string | null | undefined> | undefined;
|
|
575
|
+
backgroundColor?: import("react").Validator<string | null | undefined> | undefined;
|
|
576
|
+
gradientBackground?: import("react").Validator<boolean | null | undefined> | undefined;
|
|
577
|
+
borderRadius?: import("react").Validator<string | null | undefined> | undefined;
|
|
578
|
+
preset?: import("react").Validator<string | null | undefined> | undefined;
|
|
579
|
+
size?: import("react").Validator<import("../../atom/icon").IconSize | null | undefined> | undefined;
|
|
580
|
+
customStyle?: import("react").Validator<import("react").CSSProperties | null | undefined> | undefined;
|
|
581
|
+
}>>;
|
|
561
582
|
}>>;
|
|
562
583
|
button: PropTypes.Requireable<PropTypes.InferProps<{
|
|
563
584
|
type: PropTypes.Requireable<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/cm-popin/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAKnC,OAAO,IAAI,MAAM,iBAAiB,CAAC;AACnC,OAAO,EAAC,UAAU,EAAC,MAAM,wBAAwB,CAAC;AAClD,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAClD,OAAO,SAAS,MAAM,2BAA2B,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AAS,CAAC,CAAC;CACpD,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -50,7 +50,7 @@ const propTypes = {
|
|
|
50
50
|
customStyle: _buttonLink.default.propTypes.customStyle
|
|
51
51
|
}),
|
|
52
52
|
onClose: _propTypes.default.func,
|
|
53
|
-
icon: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.shape(_icon.
|
|
53
|
+
icon: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.shape(_icon.propTypes)]),
|
|
54
54
|
backgroundImageUrl: _propTypes.default.string,
|
|
55
55
|
descriptionText: _propTypes.default.string,
|
|
56
56
|
cookieTitle: _propTypes.default.string,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":["_propTypes","_interopRequireDefault","require","_buttonLink","_inputSwitch","_title","_link","_cardsGrid","_listItems","_buttonIcons","_icon","e","__esModule","default","propTypes","content","PropTypes","string","mode","oneOf","header","shape","title","Title","headerIcon","backgroundImage","firstButton","label","handleOnclick","func","largeButton","bool","type","customStyle","ButtonLink","secondButton","icon","position","_keys2","ICONS","thirdButton","onClose","oneOfType","iconPropTypes","backgroundImageUrl","descriptionText","cookieTitle","headerSubtitle","descriptionBtnTxt","listBtnSwicth","arrayOf","InputSwitch","items","list","CardsGrid","ListItems","link","Link","_default","exports"],"sources":["../../../src/molecule/cm-popin/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport {keys} from 'lodash/fp';\nimport ButtonLink from '../../atom/button-link';\nimport InputSwitch from '../../atom/input-switch';\nimport Title from '../../atom/title';\nimport Link from '../../atom/link';\nimport {TitleProps} from '../../atom/title/types';\nimport CardsGrid from '../../organism/cards-grid';\nimport ListItems from '../../organism/list-items';\nimport {ICONS} from '../../util/button-icons';\nimport {iconPropTypes} from '../../atom/icon';\n\nconst propTypes = {\n content: PropTypes.string,\n mode: PropTypes.oneOf(['alert', 'information', 'cookie', 'items', 'list']),\n header: PropTypes.shape({\n title: PropTypes.shape(Title.propTypes),\n headerIcon: PropTypes.string,\n backgroundImage: PropTypes.string\n }),\n firstButton: PropTypes.shape({\n label: PropTypes.string,\n handleOnclick: PropTypes.func,\n 'aria-label': PropTypes.string,\n largeButton: PropTypes.bool,\n type: PropTypes.oneOf(['dangerous', 'primary', 'secondary', 'tertiary']),\n customStyle: ButtonLink.propTypes.customStyle\n }),\n secondButton: PropTypes.shape({\n label: PropTypes.string,\n handleOnclick: PropTypes.func,\n type: PropTypes.oneOf(['dangerous', 'primary', 'secondary']),\n 'aria-label': PropTypes.string,\n largeButton: PropTypes.bool,\n customStyle: ButtonLink.propTypes.customStyle,\n icon: PropTypes.shape({\n position: PropTypes.oneOf(['right', 'left']),\n type: PropTypes.oneOf(keys(ICONS))\n })\n }),\n thirdButton: PropTypes.shape({\n label: PropTypes.string,\n handleOnclick: PropTypes.func,\n type: PropTypes.oneOf(['dangerous', 'primary', 'secondary']),\n 'aria-label': PropTypes.string,\n largeButton: PropTypes.bool,\n customStyle: ButtonLink.propTypes.customStyle\n }),\n onClose: PropTypes.func,\n icon: PropTypes.oneOfType([PropTypes.string, PropTypes.shape(iconPropTypes)]),\n backgroundImageUrl: PropTypes.string,\n descriptionText: PropTypes.string,\n cookieTitle: PropTypes.string,\n headerSubtitle: PropTypes.string,\n descriptionBtnTxt: PropTypes.string,\n listBtnSwicth: PropTypes.arrayOf(PropTypes.shape(InputSwitch.propTypes)),\n items: PropTypes.shape({\n type: PropTypes.oneOf(['content', 'list']),\n list: PropTypes.oneOfType([\n PropTypes.shape(CardsGrid.propTypes),\n PropTypes.shape(ListItems.propTypes)\n ])\n }),\n link: PropTypes.shape(Link.propTypes)\n};\n\ntype PopinHeaderProps = {\n title: TitleProps;\n backgroundImage: string;\n headerIcon: string;\n};\n\nexport type QuitPopinButton = {\n 'aria-label'?: string;\n label: string;\n type: string;\n customStyle?: {\n backgroundColor?: string;\n color?: string;\n };\n handleOnclick: () => void;\n};\n\nexport type CMPopinProps = {\n content: string;\n icon: string | PropTypes.InferProps<typeof iconPropTypes>;\n mode: 'alert' | 'information' | 'cookie' | 'items' | 'list';\n onClose?: () => void;\n popinHeader?: PopinHeaderProps;\n descriptionText: string;\n firstButton?: QuitPopinButton;\n secondButton?: QuitPopinButton;\n items?: {\n type: 'content' | 'list';\n list:\n | PropTypes.InferProps<typeof CardsGrid.propTypes>\n | PropTypes.InferProps<typeof ListItems.propTypes>;\n };\n link?: PropTypes.InferProps<typeof Link.propTypes>;\n};\n\nexport default propTypes;\n"],"mappings":";;;;;AAAA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,YAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,MAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,KAAA,GAAAL,sBAAA,CAAAC,OAAA;AAEA,IAAAK,UAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,UAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AACA,IAAAQ,KAAA,GAAAR,OAAA;
|
|
1
|
+
{"version":3,"file":"types.js","names":["_propTypes","_interopRequireDefault","require","_buttonLink","_inputSwitch","_title","_link","_cardsGrid","_listItems","_buttonIcons","_icon","e","__esModule","default","propTypes","content","PropTypes","string","mode","oneOf","header","shape","title","Title","headerIcon","backgroundImage","firstButton","label","handleOnclick","func","largeButton","bool","type","customStyle","ButtonLink","secondButton","icon","position","_keys2","ICONS","thirdButton","onClose","oneOfType","iconPropTypes","backgroundImageUrl","descriptionText","cookieTitle","headerSubtitle","descriptionBtnTxt","listBtnSwicth","arrayOf","InputSwitch","items","list","CardsGrid","ListItems","link","Link","_default","exports"],"sources":["../../../src/molecule/cm-popin/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport {keys} from 'lodash/fp';\nimport ButtonLink from '../../atom/button-link';\nimport InputSwitch from '../../atom/input-switch';\nimport Title from '../../atom/title';\nimport Link from '../../atom/link';\nimport {TitleProps} from '../../atom/title/types';\nimport CardsGrid from '../../organism/cards-grid';\nimport ListItems from '../../organism/list-items';\nimport {ICONS} from '../../util/button-icons';\nimport {propTypes as iconPropTypes} from '../../atom/icon';\n\nconst propTypes = {\n content: PropTypes.string,\n mode: PropTypes.oneOf(['alert', 'information', 'cookie', 'items', 'list']),\n header: PropTypes.shape({\n title: PropTypes.shape(Title.propTypes),\n headerIcon: PropTypes.string,\n backgroundImage: PropTypes.string\n }),\n firstButton: PropTypes.shape({\n label: PropTypes.string,\n handleOnclick: PropTypes.func,\n 'aria-label': PropTypes.string,\n largeButton: PropTypes.bool,\n type: PropTypes.oneOf(['dangerous', 'primary', 'secondary', 'tertiary']),\n customStyle: ButtonLink.propTypes.customStyle\n }),\n secondButton: PropTypes.shape({\n label: PropTypes.string,\n handleOnclick: PropTypes.func,\n type: PropTypes.oneOf(['dangerous', 'primary', 'secondary']),\n 'aria-label': PropTypes.string,\n largeButton: PropTypes.bool,\n customStyle: ButtonLink.propTypes.customStyle,\n icon: PropTypes.shape({\n position: PropTypes.oneOf(['right', 'left']),\n type: PropTypes.oneOf(keys(ICONS))\n })\n }),\n thirdButton: PropTypes.shape({\n label: PropTypes.string,\n handleOnclick: PropTypes.func,\n type: PropTypes.oneOf(['dangerous', 'primary', 'secondary']),\n 'aria-label': PropTypes.string,\n largeButton: PropTypes.bool,\n customStyle: ButtonLink.propTypes.customStyle\n }),\n onClose: PropTypes.func,\n icon: PropTypes.oneOfType([PropTypes.string, PropTypes.shape(iconPropTypes)]),\n backgroundImageUrl: PropTypes.string,\n descriptionText: PropTypes.string,\n cookieTitle: PropTypes.string,\n headerSubtitle: PropTypes.string,\n descriptionBtnTxt: PropTypes.string,\n listBtnSwicth: PropTypes.arrayOf(PropTypes.shape(InputSwitch.propTypes)),\n items: PropTypes.shape({\n type: PropTypes.oneOf(['content', 'list']),\n list: PropTypes.oneOfType([\n PropTypes.shape(CardsGrid.propTypes),\n PropTypes.shape(ListItems.propTypes)\n ])\n }),\n link: PropTypes.shape(Link.propTypes)\n};\n\ntype PopinHeaderProps = {\n title: TitleProps;\n backgroundImage: string;\n headerIcon: string;\n};\n\nexport type QuitPopinButton = {\n 'aria-label'?: string;\n label: string;\n type: string;\n customStyle?: {\n backgroundColor?: string;\n color?: string;\n };\n handleOnclick: () => void;\n};\n\nexport type CMPopinProps = {\n content: string;\n icon: string | PropTypes.InferProps<typeof iconPropTypes>;\n mode: 'alert' | 'information' | 'cookie' | 'items' | 'list';\n onClose?: () => void;\n popinHeader?: PopinHeaderProps;\n descriptionText: string;\n firstButton?: QuitPopinButton;\n secondButton?: QuitPopinButton;\n items?: {\n type: 'content' | 'list';\n list:\n | PropTypes.InferProps<typeof CardsGrid.propTypes>\n | PropTypes.InferProps<typeof ListItems.propTypes>;\n };\n link?: PropTypes.InferProps<typeof Link.propTypes>;\n};\n\nexport default propTypes;\n"],"mappings":";;;;;AAAA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,YAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,MAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,KAAA,GAAAL,sBAAA,CAAAC,OAAA;AAEA,IAAAK,UAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,UAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AACA,IAAAQ,KAAA,GAAAR,OAAA;AAA2D,SAAAD,uBAAAU,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE3D,MAAMG,SAAS,GAAG;EAChBC,OAAO,EAAEC,kBAAS,CAACC,MAAM;EACzBC,IAAI,EAAEF,kBAAS,CAACG,KAAK,CAAC,CAAC,OAAO,EAAE,aAAa,EAAE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C,IAAI,EAAExC,kBAAS,CAACK,KAAK,CAACoC,aAAI,CAAC3C,SAAS;AACtC,CAAC;AAAC,IAAA4C,QAAA,GAAAC,OAAA,CAAA9C,OAAA,GAqCaC,SAAS","ignoreList":[]}
|
|
@@ -1,44 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}>;
|
|
21
|
-
courses: PropTypes.Requireable<any[]>;
|
|
22
|
-
texts: PropTypes.Requireable<{
|
|
23
|
-
[x: string]: any;
|
|
24
|
-
}>;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { WebContextValues } from '../../atom/provider/web-context';
|
|
3
|
+
import { LearnerSkillCardProps } from './prop-types';
|
|
4
|
+
export declare const updateBackgroundImage: (ref: React.RefObject<HTMLDivElement>, background: string) => void;
|
|
5
|
+
declare const LearnerSkillCard: {
|
|
6
|
+
(props: LearnerSkillCardProps, context: WebContextValues): JSX.Element;
|
|
7
|
+
contextTypes: {
|
|
8
|
+
translate: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
9
|
+
};
|
|
10
|
+
propTypes: {
|
|
11
|
+
'aria-label': import("prop-types").Requireable<string>;
|
|
12
|
+
cardIndex: import("prop-types").Requireable<number>;
|
|
13
|
+
skillTitle: import("prop-types").Requireable<string>;
|
|
14
|
+
skillAriaLabel: import("prop-types").Requireable<string>;
|
|
15
|
+
focus: import("prop-types").Requireable<boolean>;
|
|
16
|
+
metrics: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
17
|
+
content: import("prop-types").Requireable<number>;
|
|
18
|
+
score: import("prop-types").Requireable<number>;
|
|
19
|
+
questionsToReview: import("prop-types").Requireable<number>;
|
|
25
20
|
}>>;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
'aria-label': PropTypes.Requireable<string>;
|
|
30
|
-
skillTitle: PropTypes.Requireable<string>;
|
|
31
|
-
skillAriaLabel: PropTypes.Requireable<string>;
|
|
32
|
-
focus: PropTypes.Requireable<boolean>;
|
|
33
|
-
metrics: PropTypes.Requireable<PropTypes.InferProps<{
|
|
34
|
-
score: PropTypes.Requireable<number>;
|
|
35
|
-
content: PropTypes.Requireable<number>;
|
|
36
|
-
questionsToReview: PropTypes.Requireable<number>;
|
|
21
|
+
icon: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
22
|
+
color: import("prop-types").Requireable<string>;
|
|
23
|
+
name: import("prop-types").Requireable<string>;
|
|
37
24
|
}>>;
|
|
38
|
-
|
|
39
|
-
onReviewClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
40
|
-
onExploreClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
25
|
+
onExploreClick: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
41
26
|
};
|
|
42
|
-
}
|
|
43
|
-
|
|
27
|
+
};
|
|
28
|
+
export default LearnerSkillCard;
|
|
44
29
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/learner-skill-card/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/learner-skill-card/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAE1D,OAAO,EAAC,gBAAgB,EAAC,MAAM,iCAAiC,CAAC;AAKjE,OAAkB,EAAC,qBAAqB,EAAC,MAAM,cAAc,CAAC;AAK9D,eAAO,MAAM,qBAAqB,QAAS,MAAM,SAAS,CAAC,cAAc,CAAC,cAAc,MAAM,SAI7F,CAAC;AAEF,QAAA,MAAM,gBAAgB;YAAW,qBAAqB,WAAW,gBAAgB;;;;;;;;;;;;;;;;;;;;;CA6HhF,CAAC;AAQF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,28 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
exports.default = void 0;
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var _cssColorFunction = require("css-color-function");
|
|
8
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
-
var _icon = _interopRequireDefault(require("../../atom/icon"));
|
|
10
|
-
var _buttonLink = _interopRequireDefault(require("../../atom/button-link"));
|
|
11
|
-
var _provider = _interopRequireDefault(require("../../atom/provider"));
|
|
4
|
+
exports.updateBackgroundImage = exports.default = void 0;
|
|
5
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
6
|
+
var _provider = _interopRequireWildcard(require("../../atom/provider"));
|
|
12
7
|
var _progressBar = _interopRequireDefault(require("../progress-bar"));
|
|
13
8
|
var _colors = require("../../variables/colors");
|
|
9
|
+
var _getBackgroundGradientColor = require("../../util/get-background-gradient-color");
|
|
10
|
+
var _icon = _interopRequireDefault(require("../../atom/icon"));
|
|
11
|
+
var _propTypes = _interopRequireDefault(require("./prop-types"));
|
|
14
12
|
var _style = _interopRequireDefault(require("./style.css"));
|
|
15
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
15
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
16
16
|
const MAX_SCORE = 100;
|
|
17
|
+
const updateBackgroundImage = (ref, background) => {
|
|
18
|
+
if (ref.current) {
|
|
19
|
+
ref.current.style.backgroundImage = background;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
exports.updateBackgroundImage = updateBackgroundImage;
|
|
17
23
|
const LearnerSkillCard = (props, context) => {
|
|
18
24
|
const {
|
|
19
25
|
'aria-label': ariaLabel,
|
|
26
|
+
cardIndex,
|
|
20
27
|
skillTitle,
|
|
21
28
|
skillAriaLabel,
|
|
22
|
-
focus
|
|
29
|
+
focus,
|
|
23
30
|
metrics,
|
|
24
|
-
|
|
25
|
-
onReviewClick,
|
|
31
|
+
icon,
|
|
26
32
|
onExploreClick
|
|
27
33
|
} = props;
|
|
28
34
|
const {
|
|
@@ -30,76 +36,92 @@ const LearnerSkillCard = (props, context) => {
|
|
|
30
36
|
content,
|
|
31
37
|
questionsToReview = 0
|
|
32
38
|
} = metrics;
|
|
39
|
+
const translate = (0, _provider.GetTranslateFromContext)(context);
|
|
33
40
|
const {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
} =
|
|
37
|
-
const primarySkinColor = (0, _get2.default)('common.primary', skin);
|
|
38
|
-
const reviewLocale = translate('Review');
|
|
39
|
-
const exploreLocale = translate('Explore');
|
|
41
|
+
color,
|
|
42
|
+
name
|
|
43
|
+
} = icon;
|
|
40
44
|
const questionsLocale = translate('skill_chart_side_panel_questions_to_review');
|
|
41
|
-
const
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
const [badgeIconName, badgeLocale, tagTextColor, tagBackgroundColor] = focus ? ['bullseye-arrow', translate('skill_focus'), _colors.COLORS.purple_700, _colors.COLORS.purple_100] : ['shapes', translate('skill'), _colors.COLORS.cm_grey_500, _colors.COLORS.gray];
|
|
46
|
+
const headerBackgroundRef = (0, _react.useRef)(null);
|
|
47
|
+
const defaultBackground = (0, _react.useMemo)(() => (0, _getBackgroundGradientColor.createGradientBackground)(color, '93%', '100%'), [color]);
|
|
48
|
+
const focusBackground = (0, _react.useMemo)(() => (0, _getBackgroundGradientColor.createGradientBackground)(color, '83%', '100%'), [color]);
|
|
49
|
+
const handleMouseEnter = (0, _react.useCallback)(() => {
|
|
50
|
+
updateBackgroundImage(headerBackgroundRef, focusBackground);
|
|
51
|
+
}, [focusBackground]);
|
|
52
|
+
const handleMouseLeave = (0, _react.useCallback)(() => {
|
|
53
|
+
updateBackgroundImage(headerBackgroundRef, defaultBackground);
|
|
54
|
+
}, [defaultBackground]);
|
|
55
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
56
|
+
"data-testid": `learner-skill-card-wrapper-${cardIndex}`,
|
|
57
|
+
onClick: onExploreClick,
|
|
58
|
+
className: _style.default.learnerSkillCardContainer,
|
|
59
|
+
"aria-label": ariaLabel,
|
|
60
|
+
onMouseEnter: handleMouseEnter,
|
|
61
|
+
onMouseLeave: handleMouseLeave
|
|
62
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
63
|
+
"data-testid": "learner-skill-card-icon-header-wrapper",
|
|
64
|
+
ref: headerBackgroundRef,
|
|
65
|
+
className: _style.default.iconHeaderWrapper,
|
|
66
|
+
style: {
|
|
67
|
+
backgroundImage: defaultBackground,
|
|
68
|
+
color: tagTextColor
|
|
69
|
+
}
|
|
70
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
71
|
+
className: _style.default.iconWrapper,
|
|
72
|
+
"data-testid": "learner-skill-card-icon-wrapper"
|
|
73
|
+
}, /*#__PURE__*/_react.default.createElement(_icon.default, {
|
|
74
|
+
iconName: name,
|
|
75
|
+
iconColor: color,
|
|
76
|
+
size: {
|
|
77
|
+
faSize: 20,
|
|
78
|
+
wrapperSize: 44
|
|
47
79
|
},
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
'aria-label': `${skillTitle}, ${reviewLocale}`,
|
|
51
|
-
label: reviewLocale,
|
|
52
|
-
'data-name': 'learner-skill-card-review-button'
|
|
53
|
-
};
|
|
54
|
-
const buttonExploreProps = {
|
|
80
|
+
borderRadius: '12px',
|
|
81
|
+
gradientBackground: true,
|
|
55
82
|
customStyle: {
|
|
56
|
-
|
|
57
|
-
color: primarySkinColor,
|
|
58
|
-
transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out'
|
|
59
|
-
},
|
|
60
|
-
hoverColor: '#FFFFFF',
|
|
61
|
-
hoverBackgroundColor: primarySkinColor,
|
|
62
|
-
onClick: onExploreClick,
|
|
63
|
-
'aria-label': `${skillTitle}, ${exploreLocale}`,
|
|
64
|
-
label: exploreLocale,
|
|
65
|
-
'data-name': 'learner-skill-card-explore-button',
|
|
66
|
-
icon: {
|
|
67
|
-
position: 'left',
|
|
68
|
-
faIcon: {
|
|
69
|
-
name: 'compass',
|
|
70
|
-
backgroundColor: (0, _cssColorFunction.convert)(`color(${primarySkinColor} a(0.07))`),
|
|
71
|
-
color: primarySkinColor,
|
|
72
|
-
size: 16
|
|
73
|
-
}
|
|
83
|
+
border: '4px solid white'
|
|
74
84
|
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
className: _style.default.learnerSkillCardWrapper,
|
|
78
|
-
"data-name": "learner-skill-card-wrapper",
|
|
79
|
-
"aria-label": ariaLabel
|
|
80
|
-
}, questionsToReview ? /*#__PURE__*/_react.default.createElement("div", {
|
|
81
|
-
className: _style.default.skillQuestionsWrapper
|
|
85
|
+
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
86
|
+
className: _style.default.learnerSkillCardContent
|
|
82
87
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
83
|
-
className: _style.default.skillInformation,
|
|
84
|
-
"data-name": "skill-questions"
|
|
85
|
-
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
86
|
-
className: _style.default.skillInformationNumber
|
|
87
|
-
}, questionsToReview), "\xA0", questionsLocale)) : null, /*#__PURE__*/_react.default.createElement("div", {
|
|
88
88
|
className: _style.default.skillTitleWrapper
|
|
89
89
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
90
|
+
className: _style.default.skillFocusBadge,
|
|
91
|
+
style: {
|
|
92
|
+
backgroundColor: tagBackgroundColor,
|
|
93
|
+
color: tagTextColor
|
|
94
|
+
}
|
|
95
95
|
}, /*#__PURE__*/_react.default.createElement(_icon.default, {
|
|
96
|
-
iconName:
|
|
97
|
-
backgroundColor:
|
|
96
|
+
iconName: badgeIconName,
|
|
97
|
+
backgroundColor: tagBackgroundColor,
|
|
98
98
|
size: {
|
|
99
99
|
faSize: 10,
|
|
100
100
|
wrapperSize: 16
|
|
101
101
|
}
|
|
102
|
-
}),
|
|
102
|
+
}), badgeLocale), /*#__PURE__*/_react.default.createElement("div", {
|
|
103
|
+
className: _style.default.questionWrapper
|
|
104
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
105
|
+
"data-name": "skill-card-title",
|
|
106
|
+
className: _style.default.skillTitle,
|
|
107
|
+
"aria-label": skillAriaLabel || skillTitle
|
|
108
|
+
}, skillTitle), /*#__PURE__*/_react.default.createElement("div", {
|
|
109
|
+
className: _style.default.contentAndQuestionsWrapper
|
|
110
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
111
|
+
"data-name": "learner-skill-card-skill-content-number"
|
|
112
|
+
}, content, " ", translate('content')), questionsToReview ? /*#__PURE__*/_react.default.createElement("div", {
|
|
113
|
+
className: _style.default.skillInformation,
|
|
114
|
+
"data-name": "learner-skill-card-skill-questions-wrapper"
|
|
115
|
+
}, /*#__PURE__*/_react.default.createElement(_icon.default, {
|
|
116
|
+
iconName: 'circle',
|
|
117
|
+
iconColor: _colors.COLORS.cm_grey_400,
|
|
118
|
+
size: {
|
|
119
|
+
faSize: 4,
|
|
120
|
+
wrapperSize: 0
|
|
121
|
+
}
|
|
122
|
+
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
123
|
+
"data-name": "learner-skill-card-questions-to-review"
|
|
124
|
+
}, questionsToReview), "\xA0", questionsLocale) : null)))), /*#__PURE__*/_react.default.createElement("div", {
|
|
103
125
|
className: _style.default.progressInformations
|
|
104
126
|
}, /*#__PURE__*/_react.default.createElement(_progressBar.default, {
|
|
105
127
|
value: score,
|
|
@@ -107,38 +129,13 @@ const LearnerSkillCard = (props, context) => {
|
|
|
107
129
|
max: MAX_SCORE,
|
|
108
130
|
className: _style.default.progressWrapper,
|
|
109
131
|
style: {
|
|
110
|
-
backgroundColor: _colors.COLORS.
|
|
132
|
+
backgroundColor: _colors.COLORS.cm_positive_500
|
|
111
133
|
}
|
|
112
|
-
})
|
|
113
|
-
className: _style.default.progressInformation,
|
|
114
|
-
"data-name": "completed-percentage"
|
|
115
|
-
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
116
|
-
className: _style.default.progressInformationNumber
|
|
117
|
-
}, score, "%"))) : null, /*#__PURE__*/_react.default.createElement("div", {
|
|
118
|
-
className: _style.default.ctaWrapper,
|
|
119
|
-
"data-name": "cta-wrapper"
|
|
120
|
-
}, /*#__PURE__*/_react.default.createElement(_buttonLink.default, buttonReviewProps), /*#__PURE__*/_react.default.createElement("div", {
|
|
121
|
-
className: _style.default.buttonWrapper,
|
|
122
|
-
"data-name": "button-explore-wrapper"
|
|
123
|
-
}, /*#__PURE__*/_react.default.createElement(_buttonLink.default, buttonExploreProps))));
|
|
134
|
+
})));
|
|
124
135
|
};
|
|
125
136
|
LearnerSkillCard.contextTypes = {
|
|
126
|
-
skin: _provider.default.childContextTypes.skin,
|
|
127
137
|
translate: _provider.default.childContextTypes.translate
|
|
128
138
|
};
|
|
129
|
-
LearnerSkillCard.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
130
|
-
'aria-label': _propTypes.default.string,
|
|
131
|
-
skillTitle: _propTypes.default.string,
|
|
132
|
-
skillAriaLabel: _propTypes.default.string,
|
|
133
|
-
focus: _propTypes.default.bool,
|
|
134
|
-
metrics: _propTypes.default.shape({
|
|
135
|
-
score: _propTypes.default.number,
|
|
136
|
-
content: _propTypes.default.number,
|
|
137
|
-
questionsToReview: _propTypes.default.number
|
|
138
|
-
}),
|
|
139
|
-
review: _propTypes.default.bool,
|
|
140
|
-
onReviewClick: _propTypes.default.func,
|
|
141
|
-
onExploreClick: _propTypes.default.func
|
|
142
|
-
} : {};
|
|
139
|
+
LearnerSkillCard.propTypes = process.env.NODE_ENV !== "production" ? _propTypes.default : {};
|
|
143
140
|
var _default = exports.default = LearnerSkillCard;
|
|
144
141
|
//# sourceMappingURL=index.js.map
|