@coorpacademy/components 11.30.1 → 11.32.1-alpha.16
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.d.ts +1 -0
- package/es/atom/button-link/index.d.ts.map +1 -1
- package/es/atom/button-link/index.js +21 -12
- package/es/atom/button-link/index.js.map +1 -1
- package/es/atom/button-link/types.d.ts +11 -1
- package/es/atom/button-link/types.d.ts.map +1 -1
- package/es/atom/button-link/types.js +1 -0
- package/es/atom/button-link/types.js.map +1 -1
- package/es/atom/chip/index.d.ts +37 -0
- package/es/atom/chip/index.d.ts.map +1 -0
- package/es/atom/chip/index.js +85 -0
- package/es/atom/chip/index.js.map +1 -0
- package/es/atom/chip/style.css +65 -0
- package/es/atom/chips/index.d.ts.map +1 -1
- package/es/atom/chips/index.js +1 -0
- package/es/atom/chips/index.js.map +1 -1
- package/es/atom/icon/index.js +2 -2
- package/es/atom/icon/index.js.map +1 -1
- package/es/molecule/base-modal/index.d.ts +33 -0
- package/es/molecule/base-modal/index.d.ts.map +1 -0
- package/es/molecule/base-modal/index.js +142 -0
- package/es/molecule/base-modal/index.js.map +1 -0
- package/es/molecule/base-modal/style.css +125 -0
- package/es/molecule/bulk-progress-bar/index.d.ts.map +1 -1
- package/es/molecule/bulk-progress-bar/index.js +6 -3
- package/es/molecule/bulk-progress-bar/index.js.map +1 -1
- package/es/molecule/cm-popin/types.d.ts +2 -0
- package/es/molecule/cm-popin/types.d.ts.map +1 -1
- package/es/molecule/expandible-actionable-table/index.d.ts +1 -0
- package/es/molecule/expandible-actionable-table/index.d.ts.map +1 -1
- package/es/molecule/expandible-actionable-table/types.d.ts +1 -0
- package/es/molecule/expandible-actionable-table/types.d.ts.map +1 -1
- package/es/molecule/learner-skill-card/index.d.ts +23 -0
- package/es/molecule/learner-skill-card/index.d.ts.map +1 -0
- package/es/molecule/learner-skill-card/index.js +164 -0
- package/es/molecule/learner-skill-card/index.js.map +1 -0
- package/es/molecule/learner-skill-card/style.css +119 -0
- package/es/molecule/learning-profile-radar-chart/index.d.ts +1 -1
- package/es/molecule/learning-profile-radar-chart/index.d.ts.map +1 -1
- package/es/molecule/learning-profile-radar-chart/index.js +16 -11
- package/es/molecule/learning-profile-radar-chart/index.js.map +1 -1
- package/es/molecule/learning-profile-radar-chart/types.d.ts +7 -1
- package/es/molecule/learning-profile-radar-chart/types.d.ts.map +1 -1
- package/es/molecule/learning-profile-radar-chart/types.js.map +1 -1
- package/es/molecule/questions/template/index.d.ts +1 -1
- package/es/molecule/quick-access-card/index.d.ts.map +1 -1
- package/es/molecule/quick-access-card/index.js +5 -1
- package/es/molecule/quick-access-card/index.js.map +1 -1
- package/es/molecule/skill-picker-modal/index.d.ts +23 -0
- package/es/molecule/skill-picker-modal/index.d.ts.map +1 -0
- package/es/molecule/skill-picker-modal/index.js +138 -0
- package/es/molecule/skill-picker-modal/index.js.map +1 -0
- package/es/molecule/skill-picker-modal/style.css +28 -0
- package/es/molecule/skills-chart-side-information-item/index.d.ts +1 -1
- package/es/molecule/skills-chart-side-information-item/index.js +1 -1
- package/es/molecule/skills-chart-side-information-item/index.js.map +1 -1
- package/es/molecule/skills-chart-side-information-panel/index.d.ts +1 -1
- package/es/organism/list-items/index.d.ts +2 -0
- package/es/organism/setup-header/index.d.ts +4 -0
- package/es/organism/wizard-contents/index.d.ts +3 -0
- package/es/template/app-player/loading/index.d.ts +2 -0
- package/es/template/app-player/player/index.d.ts +4 -0
- package/es/template/app-player/player/slides/index.d.ts +2 -0
- package/es/template/app-player/player/slides/index.d.ts.map +1 -1
- package/es/template/app-player/popin-correction/index.d.ts +2 -0
- package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/es/template/app-player/popin-end/index.d.ts +2 -0
- package/es/template/app-review/index.d.ts +2 -0
- package/es/template/app-review/index.d.ts.map +1 -1
- package/es/template/app-review/player/prop-types.d.ts +2 -0
- package/es/template/app-review/player/prop-types.d.ts.map +1 -1
- package/es/template/app-review/prop-types.d.ts +2 -0
- package/es/template/app-review/prop-types.d.ts.map +1 -1
- package/es/template/back-office/brand-create/index.d.ts +4 -0
- package/es/template/back-office/brand-create/index.d.ts.map +1 -1
- package/es/template/back-office/brand-list/index.d.ts +4 -0
- package/es/template/back-office/brand-list/index.d.ts.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +11 -0
- package/es/template/back-office/dashboard-preview/index.d.ts +4 -0
- package/es/template/back-office/layout/index.d.ts +4 -0
- package/es/template/back-office/layout/index.d.ts.map +1 -1
- package/es/template/common/dashboard/index.d.ts +4 -0
- package/es/template/common/search-page/index.d.ts +2 -0
- package/es/template/external-course/index.d.ts +2 -0
- package/es/template/mobile-login/welcome/index.native.d.ts.map +1 -1
- package/es/template/mobile-login/welcome/index.native.js +5 -1
- package/es/template/mobile-login/welcome/index.native.js.map +1 -1
- package/es/template/my-learning/index.d.ts +34 -0
- package/es/template/my-learning/index.d.ts.map +1 -0
- package/es/template/my-learning/index.js +354 -0
- package/es/template/my-learning/index.js.map +1 -0
- package/es/template/my-learning/style.css +179 -0
- package/es/variables/colors.d.ts +7 -7
- package/es/variables/colors.d.ts.map +1 -1
- package/es/variables/colors.js +2 -1
- package/es/variables/colors.js.map +1 -1
- package/es/variables/theme.native.d.ts.map +1 -1
- package/es/variables/theme.native.js +4 -1
- package/es/variables/theme.native.js.map +1 -1
- package/lib/atom/button-link/index.d.ts +1 -0
- package/lib/atom/button-link/index.d.ts.map +1 -1
- package/lib/atom/button-link/index.js +22 -12
- package/lib/atom/button-link/index.js.map +1 -1
- package/lib/atom/button-link/types.d.ts +11 -1
- package/lib/atom/button-link/types.d.ts.map +1 -1
- package/lib/atom/button-link/types.js +1 -0
- package/lib/atom/button-link/types.js.map +1 -1
- package/lib/atom/chip/index.d.ts +37 -0
- package/lib/atom/chip/index.d.ts.map +1 -0
- package/lib/atom/chip/index.js +109 -0
- package/lib/atom/chip/index.js.map +1 -0
- package/lib/atom/chip/style.css +65 -0
- package/lib/atom/chips/index.d.ts.map +1 -1
- package/lib/atom/chips/index.js +1 -0
- package/lib/atom/chips/index.js.map +1 -1
- package/lib/atom/icon/index.js +2 -2
- package/lib/atom/icon/index.js.map +1 -1
- package/lib/molecule/base-modal/index.d.ts +33 -0
- package/lib/molecule/base-modal/index.d.ts.map +1 -0
- package/lib/molecule/base-modal/index.js +158 -0
- package/lib/molecule/base-modal/index.js.map +1 -0
- package/lib/molecule/base-modal/style.css +125 -0
- package/lib/molecule/bulk-progress-bar/index.d.ts.map +1 -1
- package/lib/molecule/bulk-progress-bar/index.js +7 -3
- package/lib/molecule/bulk-progress-bar/index.js.map +1 -1
- package/lib/molecule/cm-popin/types.d.ts +2 -0
- package/lib/molecule/cm-popin/types.d.ts.map +1 -1
- package/lib/molecule/expandible-actionable-table/index.d.ts +1 -0
- package/lib/molecule/expandible-actionable-table/index.d.ts.map +1 -1
- package/lib/molecule/expandible-actionable-table/types.d.ts +1 -0
- package/lib/molecule/expandible-actionable-table/types.d.ts.map +1 -1
- package/lib/molecule/learner-skill-card/index.d.ts +23 -0
- package/lib/molecule/learner-skill-card/index.d.ts.map +1 -0
- package/lib/molecule/learner-skill-card/index.js +182 -0
- package/lib/molecule/learner-skill-card/index.js.map +1 -0
- package/lib/molecule/learner-skill-card/style.css +119 -0
- package/lib/molecule/learning-profile-radar-chart/index.d.ts +1 -1
- package/lib/molecule/learning-profile-radar-chart/index.d.ts.map +1 -1
- package/lib/molecule/learning-profile-radar-chart/index.js +16 -11
- package/lib/molecule/learning-profile-radar-chart/index.js.map +1 -1
- package/lib/molecule/learning-profile-radar-chart/types.d.ts +7 -1
- package/lib/molecule/learning-profile-radar-chart/types.d.ts.map +1 -1
- package/lib/molecule/learning-profile-radar-chart/types.js.map +1 -1
- package/lib/molecule/questions/template/index.d.ts +1 -1
- package/lib/molecule/quick-access-card/index.d.ts.map +1 -1
- package/lib/molecule/quick-access-card/index.js +7 -1
- package/lib/molecule/quick-access-card/index.js.map +1 -1
- package/lib/molecule/skill-picker-modal/index.d.ts +23 -0
- package/lib/molecule/skill-picker-modal/index.d.ts.map +1 -0
- package/lib/molecule/skill-picker-modal/index.js +156 -0
- package/lib/molecule/skill-picker-modal/index.js.map +1 -0
- package/lib/molecule/skill-picker-modal/style.css +28 -0
- package/lib/molecule/skills-chart-side-information-item/index.d.ts +1 -1
- package/lib/molecule/skills-chart-side-information-item/index.js +1 -1
- package/lib/molecule/skills-chart-side-information-item/index.js.map +1 -1
- package/lib/molecule/skills-chart-side-information-panel/index.d.ts +1 -1
- package/lib/organism/list-items/index.d.ts +2 -0
- package/lib/organism/setup-header/index.d.ts +4 -0
- package/lib/organism/wizard-contents/index.d.ts +3 -0
- package/lib/template/app-player/loading/index.d.ts +2 -0
- package/lib/template/app-player/player/index.d.ts +4 -0
- package/lib/template/app-player/player/slides/index.d.ts +2 -0
- package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-correction/index.d.ts +2 -0
- package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-end/index.d.ts +2 -0
- package/lib/template/app-review/index.d.ts +2 -0
- package/lib/template/app-review/index.d.ts.map +1 -1
- package/lib/template/app-review/player/prop-types.d.ts +2 -0
- package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
- package/lib/template/app-review/prop-types.d.ts +2 -0
- package/lib/template/app-review/prop-types.d.ts.map +1 -1
- package/lib/template/back-office/brand-create/index.d.ts +4 -0
- package/lib/template/back-office/brand-create/index.d.ts.map +1 -1
- package/lib/template/back-office/brand-list/index.d.ts +4 -0
- package/lib/template/back-office/brand-list/index.d.ts.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +11 -0
- package/lib/template/back-office/dashboard-preview/index.d.ts +4 -0
- package/lib/template/back-office/layout/index.d.ts +4 -0
- package/lib/template/back-office/layout/index.d.ts.map +1 -1
- package/lib/template/common/dashboard/index.d.ts +4 -0
- package/lib/template/common/search-page/index.d.ts +2 -0
- package/lib/template/external-course/index.d.ts +2 -0
- package/lib/template/mobile-login/welcome/index.native.d.ts.map +1 -1
- package/lib/template/mobile-login/welcome/index.native.js +7 -1
- package/lib/template/mobile-login/welcome/index.native.js.map +1 -1
- package/lib/template/my-learning/index.d.ts +34 -0
- package/lib/template/my-learning/index.d.ts.map +1 -0
- package/lib/template/my-learning/index.js +375 -0
- package/lib/template/my-learning/index.js.map +1 -0
- package/lib/template/my-learning/style.css +179 -0
- package/lib/variables/colors.d.ts +7 -7
- package/lib/variables/colors.d.ts.map +1 -1
- package/lib/variables/colors.js +2 -1
- package/lib/variables/colors.js.map +1 -1
- package/lib/variables/theme.native.d.ts.map +1 -1
- package/lib/variables/theme.native.js +4 -1
- package/lib/variables/theme.native.js.map +1 -1
- package/locales/bs/global.json +7 -1
- package/locales/cs/global.json +7 -1
- package/locales/de/global.json +7 -1
- package/locales/en/global.json +31 -0
- package/locales/es/global.json +6 -0
- package/locales/et/global.json +7 -1
- package/locales/fi/global.json +7 -1
- package/locales/fr/global.json +6 -0
- package/locales/hr/global.json +7 -1
- package/locales/hu/global.json +7 -1
- package/locales/hy/global.json +7 -1
- package/locales/it/global.json +6 -0
- package/locales/ja/global.json +7 -1
- package/locales/ko/global.json +7 -1
- package/locales/nl/global.json +6 -0
- package/locales/pl/global.json +7 -1
- package/locales/pt/global.json +7 -1
- package/locales/ro/global.json +7 -1
- package/locales/ru/global.json +7 -1
- package/locales/sk/global.json +7 -1
- package/locales/sl/global.json +7 -1
- package/locales/sv/global.json +7 -1
- package/locales/tl/global.json +7 -1
- package/locales/tr/global.json +7 -1
- package/locales/uk/global.json +7 -1
- package/locales/vi/global.json +7 -1
- package/locales/zh/global.json +7 -1
- package/locales/zh_TW/global.json +7 -1
- package/package.json +3 -3
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
|
|
6
|
+
var _isEmpty2 = _interopRequireDefault(require("lodash/fp/isEmpty"));
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
|
|
12
|
+
var _icon = _interopRequireDefault(require("../../atom/icon"));
|
|
13
|
+
|
|
14
|
+
var _buttonLink = _interopRequireDefault(require("../../atom/button-link"));
|
|
15
|
+
|
|
16
|
+
var _style = _interopRequireDefault(require("./style.css"));
|
|
17
|
+
|
|
18
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
|
+
|
|
20
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
|
+
|
|
22
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
|
+
|
|
24
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
25
|
+
|
|
26
|
+
const BaseModal = props => {
|
|
27
|
+
const {
|
|
28
|
+
title,
|
|
29
|
+
description,
|
|
30
|
+
headerIcon,
|
|
31
|
+
children,
|
|
32
|
+
isOpen,
|
|
33
|
+
footer,
|
|
34
|
+
onClose
|
|
35
|
+
} = props;
|
|
36
|
+
const Footer = (0, _react.useCallback)(() => {
|
|
37
|
+
if ((0, _isEmpty2.default)(footer)) return null;
|
|
38
|
+
if (typeof footer === 'function') return footer();
|
|
39
|
+
const {
|
|
40
|
+
cancelButton,
|
|
41
|
+
confirmButton,
|
|
42
|
+
text,
|
|
43
|
+
isError
|
|
44
|
+
} = footer;
|
|
45
|
+
const {
|
|
46
|
+
label: cancelLabel,
|
|
47
|
+
onCancel,
|
|
48
|
+
disabled: cancelDisabled
|
|
49
|
+
} = cancelButton || {};
|
|
50
|
+
const {
|
|
51
|
+
label: confirmLabel,
|
|
52
|
+
onConfirm,
|
|
53
|
+
disabled: confirmDisabled,
|
|
54
|
+
iconName
|
|
55
|
+
} = confirmButton || {};
|
|
56
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
57
|
+
className: _style.default.footer
|
|
58
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
59
|
+
className: _style.default.footerCTAWrapper
|
|
60
|
+
}, onCancel && cancelLabel ? /*#__PURE__*/_react.default.createElement(_buttonLink.default, {
|
|
61
|
+
className: _style.default.footerCancelButton,
|
|
62
|
+
type: 'secondary',
|
|
63
|
+
onClick: onCancel,
|
|
64
|
+
label: cancelLabel,
|
|
65
|
+
disabled: cancelDisabled
|
|
66
|
+
}) : null, onConfirm && confirmLabel ? /*#__PURE__*/_react.default.createElement(_buttonLink.default, _extends({
|
|
67
|
+
className: _style.default.footerConfirmButton,
|
|
68
|
+
type: 'primary',
|
|
69
|
+
onClick: onConfirm,
|
|
70
|
+
label: confirmLabel,
|
|
71
|
+
disabled: confirmDisabled
|
|
72
|
+
}, iconName ? {
|
|
73
|
+
icon: {
|
|
74
|
+
position: 'left',
|
|
75
|
+
faIcon: {
|
|
76
|
+
name: iconName,
|
|
77
|
+
color: '#FFFFFF',
|
|
78
|
+
size: 16
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
} : {})) : null), text ? /*#__PURE__*/_react.default.createElement("div", {
|
|
82
|
+
className: `${_style.default.footerDescription} ${isError ? _style.default.footerDescriptionError : ''}`
|
|
83
|
+
}, text) : null);
|
|
84
|
+
}, [footer]);
|
|
85
|
+
if (!isOpen || !title || !children) return null;
|
|
86
|
+
|
|
87
|
+
function handleOnClose(e) {
|
|
88
|
+
e?.stopPropagation();
|
|
89
|
+
onClose();
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
93
|
+
className: _style.default.modalWrapper
|
|
94
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
95
|
+
className: _style.default.modal
|
|
96
|
+
}, /*#__PURE__*/_react.default.createElement("header", {
|
|
97
|
+
className: _style.default.header
|
|
98
|
+
}, headerIcon?.name ? /*#__PURE__*/_react.default.createElement("div", {
|
|
99
|
+
className: _style.default.headerIcon
|
|
100
|
+
}, /*#__PURE__*/_react.default.createElement(_icon.default, {
|
|
101
|
+
iconName: headerIcon.name,
|
|
102
|
+
iconColor: headerIcon.color,
|
|
103
|
+
backgroundColor: headerIcon.backgroundColor,
|
|
104
|
+
size: {
|
|
105
|
+
faSize: 20,
|
|
106
|
+
wrapperSize: 48
|
|
107
|
+
}
|
|
108
|
+
})) : null, /*#__PURE__*/_react.default.createElement("div", {
|
|
109
|
+
className: _style.default.headerContent
|
|
110
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
111
|
+
className: _style.default.headerTitle
|
|
112
|
+
}, title), description ? /*#__PURE__*/_react.default.createElement("div", {
|
|
113
|
+
className: _style.default.headerDescription
|
|
114
|
+
}, description) : null), /*#__PURE__*/_react.default.createElement("div", {
|
|
115
|
+
className: _style.default.headerCloseIcon,
|
|
116
|
+
onClick: handleOnClose
|
|
117
|
+
}, /*#__PURE__*/_react.default.createElement(_icon.default, {
|
|
118
|
+
iconName: "close",
|
|
119
|
+
backgroundColor: "#F4F4F5",
|
|
120
|
+
size: {
|
|
121
|
+
faSize: 14,
|
|
122
|
+
wrapperSize: 28
|
|
123
|
+
}
|
|
124
|
+
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
125
|
+
className: _style.default.body
|
|
126
|
+
}, children), /*#__PURE__*/_react.default.createElement(Footer, null)));
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
BaseModal.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
130
|
+
title: _propTypes.default.string,
|
|
131
|
+
headerIcon: _propTypes.default.shape({
|
|
132
|
+
name: _propTypes.default.string,
|
|
133
|
+
color: _propTypes.default.string,
|
|
134
|
+
backgroundColor: _propTypes.default.string
|
|
135
|
+
}),
|
|
136
|
+
description: _propTypes.default.string,
|
|
137
|
+
children: _propTypes.default.node,
|
|
138
|
+
isOpen: _propTypes.default.bool,
|
|
139
|
+
footer: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.shape({
|
|
140
|
+
text: _propTypes.default.string,
|
|
141
|
+
isError: _propTypes.default.boolean,
|
|
142
|
+
cancelButton: _propTypes.default.shape({
|
|
143
|
+
label: _propTypes.default.string,
|
|
144
|
+
onCancel: _propTypes.default.func,
|
|
145
|
+
disabled: _propTypes.default.bool
|
|
146
|
+
}),
|
|
147
|
+
confirmButton: _propTypes.default.shape({
|
|
148
|
+
label: _propTypes.default.string,
|
|
149
|
+
onConfirm: _propTypes.default.func,
|
|
150
|
+
iconName: _propTypes.default.string,
|
|
151
|
+
disabled: _propTypes.default.bool
|
|
152
|
+
})
|
|
153
|
+
})]),
|
|
154
|
+
onClose: _propTypes.default.func
|
|
155
|
+
} : {};
|
|
156
|
+
var _default = BaseModal;
|
|
157
|
+
exports.default = _default;
|
|
158
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["BaseModal","props","title","description","headerIcon","children","isOpen","footer","onClose","Footer","useCallback","cancelButton","confirmButton","text","isError","label","cancelLabel","onCancel","disabled","cancelDisabled","confirmLabel","onConfirm","confirmDisabled","iconName","style","footerCTAWrapper","className","footerCancelButton","type","onClick","footerConfirmButton","icon","position","faIcon","name","color","size","footerDescription","footerDescriptionError","handleOnClose","e","stopPropagation","modalWrapper","modal","header","backgroundColor","faSize","wrapperSize","headerContent","headerTitle","headerDescription","headerCloseIcon","body","propTypes","PropTypes","string","shape","node","bool","oneOfType","func","boolean"],"sources":["../../../src/molecule/base-modal/index.js"],"sourcesContent":["import React, {useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport {isEmpty} from 'lodash/fp';\nimport Icon from '../../atom/icon';\nimport ButtonLink from '../../atom/button-link';\nimport style from './style.css';\n\nconst BaseModal = props => {\n const {title, description, headerIcon, children, isOpen, footer, onClose} = props;\n\n const Footer = useCallback(() => {\n if (isEmpty(footer)) return null;\n if (typeof footer === 'function') return footer();\n\n const {cancelButton, confirmButton, text, isError} = footer;\n const {label: cancelLabel, onCancel, disabled: cancelDisabled} = cancelButton || {};\n const {\n label: confirmLabel,\n onConfirm,\n disabled: confirmDisabled,\n iconName\n } = confirmButton || {};\n\n return (\n <div className={style.footer}>\n <div className={style.footerCTAWrapper}>\n {onCancel && cancelLabel ? (\n <ButtonLink\n {...{\n className: style.footerCancelButton,\n type: 'secondary',\n onClick: onCancel,\n label: cancelLabel,\n disabled: cancelDisabled\n }}\n />\n ) : null}\n {onConfirm && confirmLabel ? (\n <ButtonLink\n {...{\n className: style.footerConfirmButton,\n type: 'primary',\n onClick: onConfirm,\n label: confirmLabel,\n disabled: confirmDisabled,\n ...(iconName\n ? {\n icon: {\n position: 'left',\n faIcon: {\n name: iconName,\n color: '#FFFFFF',\n size: 16\n }\n }\n }\n : {})\n }}\n />\n ) : null}\n </div>\n {text ? (\n <div\n className={`${style.footerDescription} ${isError ? style.footerDescriptionError : ''}`}\n >\n {text}\n </div>\n ) : null}\n </div>\n );\n }, [footer]);\n\n if (!isOpen || !title || !children) return null;\n\n function handleOnClose(e) {\n e?.stopPropagation();\n onClose();\n }\n\n return (\n <div className={style.modalWrapper}>\n <div className={style.modal}>\n <header className={style.header}>\n {headerIcon?.name ? (\n <div className={style.headerIcon}>\n <Icon\n iconName={headerIcon.name}\n iconColor={headerIcon.color}\n backgroundColor={headerIcon.backgroundColor}\n size={{faSize: 20, wrapperSize: 48}}\n />\n </div>\n ) : null}\n <div className={style.headerContent}>\n <div className={style.headerTitle}>{title}</div>\n {description ? <div className={style.headerDescription}>{description}</div> : null}\n </div>\n <div className={style.headerCloseIcon} onClick={handleOnClose}>\n <Icon iconName=\"close\" backgroundColor=\"#F4F4F5\" size={{faSize: 14, wrapperSize: 28}} />\n </div>\n </header>\n <div className={style.body}>{children}</div>\n <Footer />\n </div>\n </div>\n );\n};\n\nBaseModal.propTypes = {\n title: PropTypes.string,\n headerIcon: PropTypes.shape({\n name: PropTypes.string,\n color: PropTypes.string,\n backgroundColor: PropTypes.string\n }),\n description: PropTypes.string,\n children: PropTypes.node,\n isOpen: PropTypes.bool,\n footer: PropTypes.oneOfType([\n PropTypes.func,\n PropTypes.shape({\n text: PropTypes.string,\n isError: PropTypes.boolean,\n cancelButton: PropTypes.shape({\n label: PropTypes.string,\n onCancel: PropTypes.func,\n disabled: PropTypes.bool\n }),\n confirmButton: PropTypes.shape({\n label: PropTypes.string,\n onConfirm: PropTypes.func,\n iconName: PropTypes.string,\n disabled: PropTypes.bool\n })\n })\n ]),\n onClose: PropTypes.func\n};\n\nexport default BaseModal;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,SAAS,GAAGC,KAAK,IAAI;EACzB,MAAM;IAACC,KAAD;IAAQC,WAAR;IAAqBC,UAArB;IAAiCC,QAAjC;IAA2CC,MAA3C;IAAmDC,MAAnD;IAA2DC;EAA3D,IAAsEP,KAA5E;EAEA,MAAMQ,M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lD,OAAO,EAAE8C,kBAAA,CAAUM;AA5BC,CAAtB;eA+Be5D,S"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
@value colors: "../../variables/colors.css";
|
|
2
|
+
@value breakpoints: "../../variables/breakpoints.css";
|
|
3
|
+
@value tablet from breakpoints;
|
|
4
|
+
@value mobile from breakpoints;
|
|
5
|
+
@value white from colors;
|
|
6
|
+
@value lightDark from colors;
|
|
7
|
+
@value dark from colors;
|
|
8
|
+
@value light from colors;
|
|
9
|
+
@value xtraLightGrey from colors;
|
|
10
|
+
@value cm_grey_150 from colors;
|
|
11
|
+
|
|
12
|
+
.modalWrapper {
|
|
13
|
+
position: fixed;
|
|
14
|
+
z-index: 1000;
|
|
15
|
+
bottom: 0;
|
|
16
|
+
right: 0;
|
|
17
|
+
height: 100vh;
|
|
18
|
+
width: 100vw;
|
|
19
|
+
display: flex;
|
|
20
|
+
font-family: "Gilroy";
|
|
21
|
+
justify-content: center;
|
|
22
|
+
align-items: center;
|
|
23
|
+
background-color: lightDark;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.modal {
|
|
27
|
+
max-width: 660px;
|
|
28
|
+
min-width: 450px;
|
|
29
|
+
min-height: 165px;
|
|
30
|
+
overflow: hidden;
|
|
31
|
+
border-radius: 16px;
|
|
32
|
+
background-color: white;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.header {
|
|
36
|
+
padding: 24px;
|
|
37
|
+
display: flex;
|
|
38
|
+
position: relative;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.headerIcon {
|
|
42
|
+
border-radius: 12px;
|
|
43
|
+
overflow: hidden;
|
|
44
|
+
margin-right: 16px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.headerContent {
|
|
48
|
+
flex: 1;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.headerTitle {
|
|
52
|
+
font-size: 18px;
|
|
53
|
+
font-weight: 600;
|
|
54
|
+
line-height: 24px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.headerDescription {
|
|
58
|
+
font-size: 14px;
|
|
59
|
+
font-weight: 500;
|
|
60
|
+
line-height: 20px;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.headerCloseIcon {
|
|
64
|
+
position: absolute;
|
|
65
|
+
top: 12px;
|
|
66
|
+
right: 12px;
|
|
67
|
+
cursor: pointer;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.body {
|
|
71
|
+
background-color: xtraLightGrey;
|
|
72
|
+
padding: 32px 32px 16px 32px;
|
|
73
|
+
min-height: 100px;
|
|
74
|
+
border-top: 1px solid cm_grey_150;
|
|
75
|
+
border-bottom: 1px solid cm_grey_150;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.footer {
|
|
79
|
+
padding: 24px;
|
|
80
|
+
display: flex;
|
|
81
|
+
flex-direction: row-reverse;
|
|
82
|
+
justify-content: space-between;
|
|
83
|
+
align-items: center;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.footerDescriptionError {
|
|
87
|
+
color: #991100;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.footerCTAWrapper {
|
|
91
|
+
display: flex;
|
|
92
|
+
gap: 8px;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.footerCancelButton {
|
|
96
|
+
width: 94px;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.footerConfirmButton {
|
|
100
|
+
width: 121px;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
@media mobile {
|
|
104
|
+
.modal {
|
|
105
|
+
min-width: unset;
|
|
106
|
+
flex: 1;
|
|
107
|
+
margin: 0 16px;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.footerCTAWrapper,
|
|
111
|
+
.footer {
|
|
112
|
+
flex-direction: column-reverse;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.footerCTAWrapper,
|
|
116
|
+
.footerCancelButton,
|
|
117
|
+
.footerConfirmButton,
|
|
118
|
+
.footerDescription {
|
|
119
|
+
width: 100%;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.footerDescription {
|
|
123
|
+
margin-bottom: 16px;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/bulk-progress-bar/index.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/bulk-progress-bar/index.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAC,KAAK,EAAoB,MAAM,SAAS,CAAC;AA8BjD,QAAA,MAAM,eAAe;YAAW,KAAK;;;;;;CAepC,CAAC;AAIF,eAAe,eAAe,CAAC"}
|
|
@@ -9,15 +9,19 @@ var _progressBar = _interopRequireDefault(require("../progress-bar"));
|
|
|
9
9
|
|
|
10
10
|
var _statusItem = _interopRequireDefault(require("../../atom/status-item"));
|
|
11
11
|
|
|
12
|
+
var _colors = require("../../variables/colors");
|
|
13
|
+
|
|
12
14
|
var _style = _interopRequireDefault(require("./style.css"));
|
|
13
15
|
|
|
14
16
|
var _types = require("./types");
|
|
15
17
|
|
|
16
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
19
|
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
const {
|
|
21
|
+
negative: cm_negative_100,
|
|
22
|
+
cm_primary_blue,
|
|
23
|
+
positive: cm_positive_100
|
|
24
|
+
} = _colors.COLORS;
|
|
21
25
|
const STATUS = {
|
|
22
26
|
inProgress: 'inProgress',
|
|
23
27
|
fail: 'fail'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["cm_negative_100","cm_primary_blue","cm_positive_100","STATUS","inProgress","fail","renderStatusIcon","status","progress","style","progressText","statusItemWrapper","resolveProgressBarColor","BulkProgressBar","props","dataName","container","progressBar","backgroundColor","borderRadius","propTypes"],"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 style from './style.css';\nimport {Props, propTypes, Status} from './types';\n\nconst cm_negative_100
|
|
1
|
+
{"version":3,"file":"index.js","names":["negative","cm_negative_100","cm_primary_blue","positive","cm_positive_100","COLORS","STATUS","inProgress","fail","renderStatusIcon","status","progress","style","progressText","statusItemWrapper","resolveProgressBarColor","BulkProgressBar","props","dataName","container","progressBar","backgroundColor","borderRadius","propTypes"],"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, positive: cm_positive_100} = 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_100;\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 />\n {renderStatusIcon(status, progress)}\n </div>\n );\n};\n\nBulkProgressBar.propTypes = propTypes;\n\nexport default BulkProgressBar;\n"],"mappings":";;;;;AAAA;;AACA;;AAC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b,gBAAgB,CAACC,MAAD,EAASC,QAAT,CARnB,CADF;AAYD,CAfD;;AAiBAK,eAAe,CAACO,SAAhB,2CAA4BA,gBAA5B;eAEeP,e"}
|
|
@@ -80,6 +80,7 @@ declare const propTypes: {
|
|
|
80
80
|
buttonLink: PropTypes.Requireable<PropTypes.InferProps<{
|
|
81
81
|
type: PropTypes.Requireable<string>;
|
|
82
82
|
label: PropTypes.Requireable<string>;
|
|
83
|
+
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
83
84
|
'aria-label': PropTypes.Requireable<string>;
|
|
84
85
|
'data-name': PropTypes.Requireable<string>;
|
|
85
86
|
'data-testid': PropTypes.Requireable<string>;
|
|
@@ -211,6 +212,7 @@ declare const propTypes: {
|
|
|
211
212
|
componentType: PropTypes.Requireable<string>;
|
|
212
213
|
type: PropTypes.Requireable<string>;
|
|
213
214
|
label: PropTypes.Requireable<string>;
|
|
215
|
+
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
214
216
|
'aria-label': PropTypes.Requireable<string>;
|
|
215
217
|
'data-name': PropTypes.Requireable<string>;
|
|
216
218
|
'data-testid': 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,CAAC;AAGlD,QAAA,MAAM,SAAS
|
|
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,OA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;IAC/B,KAAK,CAAC,EAAE;QACN,IAAI,EAAE,SAAS,GAAG,MAAM,CAAC;QACzB,IAAI,EACA,SAAS,CAAC,UAAU,CAAC,OAAO,SAAS,CAAC,SAAS,CAAC,GAChD,SAAS,CAAC,UAAU,CAAC,OAAO,SAAS,CAAC,SAAS,CAAC,CAAC;KACtD,CAAC;IACF,IAAI,CAAC,EAAE,SAAS,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC;CACpD,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -65,6 +65,7 @@ declare const ActionableExpandableTable: {
|
|
|
65
65
|
componentType: import("prop-types").Requireable<string>;
|
|
66
66
|
type: import("prop-types").Requireable<string>;
|
|
67
67
|
label: import("prop-types").Requireable<string>;
|
|
68
|
+
content: import("prop-types").Requireable<import("prop-types").ReactNodeLike>;
|
|
68
69
|
'aria-label': import("prop-types").Requireable<string>;
|
|
69
70
|
'data-name': import("prop-types").Requireable<string>;
|
|
70
71
|
'data-testid': import("prop-types").Requireable<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/expandible-actionable-table/index.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAC,gBAAgB,EAAC,MAAM,iCAAiC,CAAC;AAOjE,OAAO,EAA2C,KAAK,EAAY,MAAM,SAAS,CAAC;AAqCnF,QAAA,MAAM,yBAAyB;YAAW,KAAK,iBAAiB,gBAAgB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/expandible-actionable-table/index.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAC,gBAAgB,EAAC,MAAM,iCAAiC,CAAC;AAOjE,OAAO,EAA2C,KAAK,EAAY,MAAM,SAAS,CAAC;AAqCnF,QAAA,MAAM,yBAAyB;YAAW,KAAK,iBAAiB,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoL/E,CAAC;AASF,eAAe,yBAAyB,CAAC"}
|
|
@@ -42,6 +42,7 @@ export declare const propTypes: {
|
|
|
42
42
|
componentType: PropTypes.Requireable<string>;
|
|
43
43
|
type: PropTypes.Requireable<string>;
|
|
44
44
|
label: PropTypes.Requireable<string>;
|
|
45
|
+
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
45
46
|
'aria-label': PropTypes.Requireable<string>;
|
|
46
47
|
'data-name': PropTypes.Requireable<string>;
|
|
47
48
|
'data-testid': PropTypes.Requireable<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/expandible-actionable-table/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAInC,OAAO,EAAC,0BAA0B,EAAC,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAC,KAAK,IAAI,gBAAgB,EAAC,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAC,KAAK,IAAI,oBAAoB,EAAC,MAAM,4BAA4B,CAAC;AA0BzE,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/expandible-actionable-table/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAInC,OAAO,EAAC,0BAA0B,EAAC,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAC,KAAK,IAAI,gBAAgB,EAAC,MAAM,uBAAuB,CAAC;AAChE,OAA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AAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC,CAAC;AAEF,oBAAY,WAAW,GAAG;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export default LearnerSkillCard;
|
|
2
|
+
declare function LearnerSkillCard(props: any, context: any): JSX.Element;
|
|
3
|
+
declare namespace LearnerSkillCard {
|
|
4
|
+
namespace contextTypes {
|
|
5
|
+
const translate: PropTypes.Requireable<(...args: any[]) => any>;
|
|
6
|
+
}
|
|
7
|
+
const propTypes: {
|
|
8
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
9
|
+
skillTitle: PropTypes.Requireable<string>;
|
|
10
|
+
skillAriaLabel: PropTypes.Requireable<string>;
|
|
11
|
+
focus: PropTypes.Requireable<boolean>;
|
|
12
|
+
metrics: PropTypes.Requireable<PropTypes.InferProps<{
|
|
13
|
+
skillCourses: PropTypes.Requireable<number>;
|
|
14
|
+
skillQuestions: PropTypes.Requireable<number>;
|
|
15
|
+
completedCourses: PropTypes.Requireable<number>;
|
|
16
|
+
}>>;
|
|
17
|
+
review: PropTypes.Requireable<boolean>;
|
|
18
|
+
onReviewClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
19
|
+
onExploreClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
import PropTypes from "prop-types";
|
|
23
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/learner-skill-card/index.js"],"names":[],"mappings":";AASA,yEA2JC"}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
|
|
6
|
+
var _getOr2 = _interopRequireDefault(require("lodash/fp/getOr"));
|
|
7
|
+
|
|
8
|
+
var _get2 = _interopRequireDefault(require("lodash/fp/get"));
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _cssColorFunction = require("css-color-function");
|
|
13
|
+
|
|
14
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
|
+
|
|
16
|
+
var _icon = _interopRequireDefault(require("../../atom/icon"));
|
|
17
|
+
|
|
18
|
+
var _buttonLink = _interopRequireDefault(require("../../atom/button-link"));
|
|
19
|
+
|
|
20
|
+
var _provider = _interopRequireDefault(require("../../atom/provider"));
|
|
21
|
+
|
|
22
|
+
var _style = _interopRequireDefault(require("./style.css"));
|
|
23
|
+
|
|
24
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
|
+
|
|
26
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
|
+
|
|
28
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
29
|
+
|
|
30
|
+
const LearnerSkillCard = (props, context) => {
|
|
31
|
+
const {
|
|
32
|
+
'aria-label': ariaLabel,
|
|
33
|
+
skillTitle,
|
|
34
|
+
skillAriaLabel,
|
|
35
|
+
focus = false,
|
|
36
|
+
metrics,
|
|
37
|
+
review = false,
|
|
38
|
+
onReviewClick,
|
|
39
|
+
onExploreClick
|
|
40
|
+
} = props;
|
|
41
|
+
const {
|
|
42
|
+
skillCourses,
|
|
43
|
+
skillQuestions,
|
|
44
|
+
completedCourses = 0
|
|
45
|
+
} = metrics;
|
|
46
|
+
const {
|
|
47
|
+
skin,
|
|
48
|
+
translate
|
|
49
|
+
} = context;
|
|
50
|
+
const [hovered, setHovered] = (0, _react.useState)(false);
|
|
51
|
+
const primarySkinColor = (0, _getOr2.default)('#0061FF', 'common.primary', skin);
|
|
52
|
+
const reviewLocale = translate('Review');
|
|
53
|
+
const exploreLocale = translate('Explore');
|
|
54
|
+
const coursesLocale = translate('courses');
|
|
55
|
+
const questionsLocale = translate('questions');
|
|
56
|
+
const skillFocusLocale = translate('skill_focus');
|
|
57
|
+
const coursesCompletedLocale = translate('courses_completed');
|
|
58
|
+
const handleMouseOver = (0, _react.useCallback)(() => setHovered(true), [setHovered]);
|
|
59
|
+
const handleMouseLeave = (0, _react.useCallback)(() => setHovered(false), [setHovered]);
|
|
60
|
+
const buttonReviewProps = {
|
|
61
|
+
customStyle: {
|
|
62
|
+
backgroundColor: '#FFF',
|
|
63
|
+
transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out'
|
|
64
|
+
},
|
|
65
|
+
disabled: !review,
|
|
66
|
+
onClick: () => onReviewClick(skillTitle),
|
|
67
|
+
'aria-label': `${skillTitle}, ${reviewLocale}`,
|
|
68
|
+
label: reviewLocale,
|
|
69
|
+
'data-name': 'learner-skill-card-review-button'
|
|
70
|
+
};
|
|
71
|
+
const buttonExploreProps = {
|
|
72
|
+
customStyle: {
|
|
73
|
+
backgroundColor: hovered ? primarySkinColor : (0, _cssColorFunction.convert)(`color(${primarySkinColor} a(0.07))`),
|
|
74
|
+
color: hovered ? '#FFFFFF' : primarySkinColor,
|
|
75
|
+
transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out'
|
|
76
|
+
},
|
|
77
|
+
onClick: () => onExploreClick(skillTitle),
|
|
78
|
+
'aria-label': `${skillTitle}, ${exploreLocale}`,
|
|
79
|
+
label: exploreLocale,
|
|
80
|
+
'data-name': 'learner-skill-card-explore-button',
|
|
81
|
+
icon: {
|
|
82
|
+
position: 'left',
|
|
83
|
+
faIcon: {
|
|
84
|
+
name: 'compass',
|
|
85
|
+
backgroundColor: hovered ? primarySkinColor : (0, _cssColorFunction.convert)(`color(${primarySkinColor} a(0.07))`),
|
|
86
|
+
color: hovered ? '#FFFFFF' : primarySkinColor,
|
|
87
|
+
size: 16
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
const completedPercentage = skillCourses && Number.parseInt(completedCourses / skillCourses * 100);
|
|
92
|
+
const ProgressBar = (0, _react.useCallback)(() => {
|
|
93
|
+
if (!skillCourses) return null;
|
|
94
|
+
const progressBarColor = '#3EC483';
|
|
95
|
+
const inlineProgressValueStyle = {
|
|
96
|
+
backgroundColor: progressBarColor,
|
|
97
|
+
width: `${completedPercentage}%`
|
|
98
|
+
};
|
|
99
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
100
|
+
className: _style.default.progressWrapper
|
|
101
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
102
|
+
"data-name": "progress",
|
|
103
|
+
className: _style.default.progress,
|
|
104
|
+
style: inlineProgressValueStyle,
|
|
105
|
+
role: "progressbar",
|
|
106
|
+
"aria-label": (0, _get2.default)('progression', ariaLabel)
|
|
107
|
+
}));
|
|
108
|
+
}, [completedPercentage, ariaLabel, skillCourses]);
|
|
109
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
110
|
+
className: _style.default.learnerSkillCardWrapper,
|
|
111
|
+
"data-name": "learner-skill-card-wrapper",
|
|
112
|
+
"aria-label": ariaLabel
|
|
113
|
+
}, skillCourses || skillQuestions ? /*#__PURE__*/_react.default.createElement("div", {
|
|
114
|
+
className: _style.default.skillCoursesAndQuestionsWrapper
|
|
115
|
+
}, skillCourses ? /*#__PURE__*/_react.default.createElement("div", {
|
|
116
|
+
className: _style.default.skillInformation,
|
|
117
|
+
"data-name": "skill-courses"
|
|
118
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
119
|
+
className: _style.default.skillInformationNumber
|
|
120
|
+
}, skillCourses), " ", coursesLocale) : null, skillQuestions ? /*#__PURE__*/_react.default.createElement("div", {
|
|
121
|
+
className: _style.default.skillInformation,
|
|
122
|
+
"data-name": "skill-questions"
|
|
123
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
124
|
+
className: _style.default.skillInformationNumber
|
|
125
|
+
}, skillQuestions), "\xA0", questionsLocale) : null) : null, /*#__PURE__*/_react.default.createElement("div", {
|
|
126
|
+
className: _style.default.skillTitleWrapper
|
|
127
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
128
|
+
"data-name": "skill-title",
|
|
129
|
+
className: _style.default.skillTitle,
|
|
130
|
+
"aria-label": skillAriaLabel || skillTitle
|
|
131
|
+
}, skillTitle), focus ? /*#__PURE__*/_react.default.createElement("div", {
|
|
132
|
+
className: _style.default.skillFocusBadge
|
|
133
|
+
}, /*#__PURE__*/_react.default.createElement(_icon.default, {
|
|
134
|
+
iconName: "bullseye-arrow",
|
|
135
|
+
backgroundColor: "#DDD1FF",
|
|
136
|
+
size: {
|
|
137
|
+
faSize: 10,
|
|
138
|
+
wrapperSize: 16
|
|
139
|
+
}
|
|
140
|
+
}), skillFocusLocale) : null), /*#__PURE__*/_react.default.createElement(ProgressBar, null), /*#__PURE__*/_react.default.createElement("div", {
|
|
141
|
+
className: _style.default.progressInformations
|
|
142
|
+
}, skillCourses && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
143
|
+
className: _style.default.progressInformation,
|
|
144
|
+
"data-name": "skill-completed-courses"
|
|
145
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
146
|
+
className: _style.default.progressInformationNumber
|
|
147
|
+
}, completedCourses), coursesCompletedLocale), /*#__PURE__*/_react.default.createElement("div", {
|
|
148
|
+
className: _style.default.progressInformation,
|
|
149
|
+
"data-name": "completed-percentage"
|
|
150
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
151
|
+
className: _style.default.progressInformationNumber
|
|
152
|
+
}, completedPercentage, "%")))), /*#__PURE__*/_react.default.createElement("div", {
|
|
153
|
+
className: _style.default.ctaWrapper,
|
|
154
|
+
"data-name": "cta-wrapper"
|
|
155
|
+
}, /*#__PURE__*/_react.default.createElement(_buttonLink.default, buttonReviewProps), /*#__PURE__*/_react.default.createElement("div", {
|
|
156
|
+
className: _style.default.buttonWrapper,
|
|
157
|
+
onMouseOver: handleMouseOver,
|
|
158
|
+
onMouseLeave: handleMouseLeave,
|
|
159
|
+
"data-name": "button-explore-wrapper"
|
|
160
|
+
}, /*#__PURE__*/_react.default.createElement(_buttonLink.default, buttonExploreProps))));
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
LearnerSkillCard.contextTypes = {
|
|
164
|
+
translate: _provider.default.childContextTypes.translate
|
|
165
|
+
};
|
|
166
|
+
LearnerSkillCard.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
167
|
+
'aria-label': _propTypes.default.string,
|
|
168
|
+
skillTitle: _propTypes.default.string,
|
|
169
|
+
skillAriaLabel: _propTypes.default.string,
|
|
170
|
+
focus: _propTypes.default.bool,
|
|
171
|
+
metrics: _propTypes.default.shape({
|
|
172
|
+
skillCourses: _propTypes.default.number,
|
|
173
|
+
skillQuestions: _propTypes.default.number,
|
|
174
|
+
completedCourses: _propTypes.default.number
|
|
175
|
+
}),
|
|
176
|
+
review: _propTypes.default.bool,
|
|
177
|
+
onReviewClick: _propTypes.default.func,
|
|
178
|
+
onExploreClick: _propTypes.default.func
|
|
179
|
+
} : {};
|
|
180
|
+
var _default = LearnerSkillCard;
|
|
181
|
+
exports.default = _default;
|
|
182
|
+
//# sourceMappingURL=index.js.map
|