@coorpacademy/components 11.30.1 → 11.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/atom/button-link/index.d.ts.map +1 -1
- package/es/atom/button-link/index.js +17 -9
- package/es/atom/button-link/index.js.map +1 -1
- package/es/atom/button-link/types.d.ts +8 -1
- package/es/atom/button-link/types.d.ts.map +1 -1
- 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/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/learner-skill-card/index.d.ts +21 -0
- package/es/molecule/learner-skill-card/index.d.ts.map +1 -0
- package/es/molecule/learner-skill-card/index.js +159 -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/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/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/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.map +1 -1
- package/lib/atom/button-link/index.js +18 -9
- package/lib/atom/button-link/index.js.map +1 -1
- package/lib/atom/button-link/types.d.ts +8 -1
- package/lib/atom/button-link/types.d.ts.map +1 -1
- 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/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/learner-skill-card/index.d.ts +21 -0
- package/lib/molecule/learner-skill-card/index.d.ts.map +1 -0
- package/lib/molecule/learner-skill-card/index.js +177 -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/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/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/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 +6 -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 +2 -2
|
@@ -0,0 +1,177 @@
|
|
|
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
|
+
metrics,
|
|
36
|
+
onReviewClick,
|
|
37
|
+
onExploreClick
|
|
38
|
+
} = props;
|
|
39
|
+
const {
|
|
40
|
+
skillCourses,
|
|
41
|
+
skillQuestions,
|
|
42
|
+
completedCourses = 0
|
|
43
|
+
} = metrics;
|
|
44
|
+
const {
|
|
45
|
+
skin,
|
|
46
|
+
translate
|
|
47
|
+
} = context;
|
|
48
|
+
const [hovered, setHovered] = (0, _react.useState)(false);
|
|
49
|
+
const primarySkinColor = (0, _getOr2.default)('#0061FF', 'common.primary', skin);
|
|
50
|
+
const reviewLocale = translate('Review');
|
|
51
|
+
const exploreLocale = translate('Explore');
|
|
52
|
+
const coursesLocale = translate('courses');
|
|
53
|
+
const questionsLocale = translate('questions');
|
|
54
|
+
const skillFocusLocale = translate('skill_focus');
|
|
55
|
+
const coursesCompletedLocale = translate('courses_completed');
|
|
56
|
+
const handleMouseOver = (0, _react.useCallback)(() => setHovered(true), [setHovered]);
|
|
57
|
+
const handleMouseLeave = (0, _react.useCallback)(() => setHovered(false), [setHovered]);
|
|
58
|
+
const buttonReviewProps = {
|
|
59
|
+
customStyle: {
|
|
60
|
+
backgroundColor: '#FFF',
|
|
61
|
+
transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out'
|
|
62
|
+
},
|
|
63
|
+
onReviewClick,
|
|
64
|
+
'aria-label': `${skillTitle}, ${reviewLocale}`,
|
|
65
|
+
label: reviewLocale,
|
|
66
|
+
'data-name': 'learner-skill-card-review-button'
|
|
67
|
+
};
|
|
68
|
+
const buttonExploreProps = {
|
|
69
|
+
customStyle: {
|
|
70
|
+
backgroundColor: hovered ? primarySkinColor : (0, _cssColorFunction.convert)(`color(${primarySkinColor} a(0.07))`),
|
|
71
|
+
color: hovered ? '#FFFFFF' : primarySkinColor,
|
|
72
|
+
transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out'
|
|
73
|
+
},
|
|
74
|
+
onExploreClick,
|
|
75
|
+
'aria-label': `${skillTitle}, ${exploreLocale}`,
|
|
76
|
+
label: exploreLocale,
|
|
77
|
+
'data-name': 'learner-skill-card-explore-button',
|
|
78
|
+
icon: {
|
|
79
|
+
position: 'left',
|
|
80
|
+
faIcon: {
|
|
81
|
+
name: 'compass',
|
|
82
|
+
backgroundColor: hovered ? primarySkinColor : (0, _cssColorFunction.convert)(`color(${primarySkinColor} a(0.07))`),
|
|
83
|
+
color: hovered ? '#FFFFFF' : primarySkinColor,
|
|
84
|
+
size: 16
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
const completedPercentage = skillCourses && Number.parseInt(completedCourses / skillCourses * 100);
|
|
89
|
+
const ProgressBar = (0, _react.useCallback)(() => {
|
|
90
|
+
if (!skillCourses) return null;
|
|
91
|
+
const progressBarColor = '#3EC483';
|
|
92
|
+
const inlineProgressValueStyle = {
|
|
93
|
+
backgroundColor: progressBarColor,
|
|
94
|
+
width: `${completedPercentage}%`
|
|
95
|
+
};
|
|
96
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
97
|
+
className: _style.default.progressWrapper
|
|
98
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
99
|
+
"data-name": "progress",
|
|
100
|
+
className: _style.default.progress,
|
|
101
|
+
style: inlineProgressValueStyle,
|
|
102
|
+
role: "progressbar",
|
|
103
|
+
"aria-label": (0, _get2.default)('progression', ariaLabel)
|
|
104
|
+
}));
|
|
105
|
+
}, [completedPercentage, ariaLabel, skillCourses]);
|
|
106
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
107
|
+
className: _style.default.learnerSkillCardWrapper,
|
|
108
|
+
"data-name": "learner-skill-card-wrapper",
|
|
109
|
+
"aria-label": ariaLabel
|
|
110
|
+
}, skillCourses || skillQuestions ? /*#__PURE__*/_react.default.createElement("div", {
|
|
111
|
+
className: _style.default.skillCoursesAndQuestionsWrapper
|
|
112
|
+
}, skillCourses ? /*#__PURE__*/_react.default.createElement("div", {
|
|
113
|
+
className: _style.default.skillInformation,
|
|
114
|
+
"data-name": "skill-courses"
|
|
115
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
116
|
+
className: _style.default.skillInformationNumber
|
|
117
|
+
}, skillCourses), " ", coursesLocale) : null, skillQuestions ? /*#__PURE__*/_react.default.createElement("div", {
|
|
118
|
+
className: _style.default.skillInformation,
|
|
119
|
+
"data-name": "skill-questions"
|
|
120
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
121
|
+
className: _style.default.skillInformationNumber
|
|
122
|
+
}, skillQuestions), "\xA0", questionsLocale) : null) : null, /*#__PURE__*/_react.default.createElement("div", {
|
|
123
|
+
className: _style.default.skillTitleWrapper
|
|
124
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
125
|
+
"data-name": "skill-title",
|
|
126
|
+
className: _style.default.skillTitle,
|
|
127
|
+
"aria-label": skillAriaLabel || skillTitle
|
|
128
|
+
}, skillTitle), /*#__PURE__*/_react.default.createElement("div", {
|
|
129
|
+
className: _style.default.skillFocusBadge
|
|
130
|
+
}, /*#__PURE__*/_react.default.createElement(_icon.default, {
|
|
131
|
+
iconName: "bullseye-arrow",
|
|
132
|
+
backgroundColor: "#DDD1FF",
|
|
133
|
+
size: {
|
|
134
|
+
faSize: 10,
|
|
135
|
+
wrapperSize: 16
|
|
136
|
+
}
|
|
137
|
+
}), skillFocusLocale)), /*#__PURE__*/_react.default.createElement(ProgressBar, null), /*#__PURE__*/_react.default.createElement("div", {
|
|
138
|
+
className: _style.default.progressInformations
|
|
139
|
+
}, skillCourses && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
140
|
+
className: _style.default.progressInformation,
|
|
141
|
+
"data-name": "skill-completed-courses"
|
|
142
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
143
|
+
className: _style.default.progressInformationNumber
|
|
144
|
+
}, completedCourses), coursesCompletedLocale), /*#__PURE__*/_react.default.createElement("div", {
|
|
145
|
+
className: _style.default.progressInformation,
|
|
146
|
+
"data-name": "completed-percentage"
|
|
147
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
148
|
+
className: _style.default.progressInformationNumber
|
|
149
|
+
}, completedPercentage, "%")))), /*#__PURE__*/_react.default.createElement("div", {
|
|
150
|
+
className: _style.default.ctaWrapper,
|
|
151
|
+
"data-name": "cta-wrapper"
|
|
152
|
+
}, /*#__PURE__*/_react.default.createElement(_buttonLink.default, buttonReviewProps), /*#__PURE__*/_react.default.createElement("div", {
|
|
153
|
+
className: _style.default.buttonWrapper,
|
|
154
|
+
onMouseOver: handleMouseOver,
|
|
155
|
+
onMouseLeave: handleMouseLeave,
|
|
156
|
+
"data-name": "button-explore-wrapper"
|
|
157
|
+
}, /*#__PURE__*/_react.default.createElement(_buttonLink.default, buttonExploreProps))));
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
LearnerSkillCard.contextTypes = {
|
|
161
|
+
translate: _provider.default.childContextTypes.translate
|
|
162
|
+
};
|
|
163
|
+
LearnerSkillCard.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
164
|
+
'aria-label': _propTypes.default.string,
|
|
165
|
+
skillTitle: _propTypes.default.string,
|
|
166
|
+
skillAriaLabel: _propTypes.default.string,
|
|
167
|
+
metrics: _propTypes.default.shape({
|
|
168
|
+
skillCourses: _propTypes.default.number,
|
|
169
|
+
skillQuestions: _propTypes.default.number,
|
|
170
|
+
completedCourses: _propTypes.default.number
|
|
171
|
+
}),
|
|
172
|
+
onReviewClick: _propTypes.default.func,
|
|
173
|
+
onExploreClick: _propTypes.default.func
|
|
174
|
+
} : {};
|
|
175
|
+
var _default = LearnerSkillCard;
|
|
176
|
+
exports.default = _default;
|
|
177
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["LearnerSkillCard","props","context","ariaLabel","skillTitle","skillAriaLabel","metrics","onReviewClick","onExploreClick","skillCourses","skillQuestions","completedCourses","skin","translate","hovered","setHovered","useState","primarySkinColor","reviewLocale","exploreLocale","coursesLocale","questionsLocale","skillFocusLocale","coursesCompletedLocale","handleMouseOver","useCallback","handleMouseLeave","buttonReviewProps","customStyle","backgroundColor","transition","label","buttonExploreProps","convert","color","icon","position","faIcon","name","size","completedPercentage","Number","parseInt","ProgressBar","progressBarColor","inlineProgressValueStyle","width","style","progressWrapper","progress","learnerSkillCardWrapper","skillCoursesAndQuestionsWrapper","skillInformation","skillInformationNumber","skillTitleWrapper","skillFocusBadge","faSize","wrapperSize","progressInformations","progressInformation","progressInformationNumber","ctaWrapper","buttonWrapper","contextTypes","Provider","childContextTypes","propTypes","PropTypes","string","shape","number","func"],"sources":["../../../src/molecule/learner-skill-card/index.js"],"sourcesContent":["import React, {useCallback, useState} from 'react';\nimport {convert} from 'css-color-function';\nimport {get, getOr} from 'lodash/fp';\nimport PropTypes from 'prop-types';\nimport Icon from '../../atom/icon';\nimport ButtonLink from '../../atom/button-link';\nimport Provider from '../../atom/provider';\nimport style from './style.css';\n\nconst LearnerSkillCard = (props, context) => {\n const {\n 'aria-label': ariaLabel,\n skillTitle,\n skillAriaLabel,\n metrics,\n onReviewClick,\n onExploreClick\n } = props;\n const {skillCourses, skillQuestions, completedCourses = 0} = metrics;\n const {skin, translate} = context;\n const [hovered, setHovered] = useState(false);\n const primarySkinColor = getOr('#0061FF', 'common.primary', skin);\n\n const reviewLocale = translate('Review');\n const exploreLocale = translate('Explore');\n const coursesLocale = translate('courses');\n const questionsLocale = translate('questions');\n const skillFocusLocale = translate('skill_focus');\n const coursesCompletedLocale = translate('courses_completed');\n\n const handleMouseOver = useCallback(() => setHovered(true), [setHovered]);\n\n const handleMouseLeave = useCallback(() => setHovered(false), [setHovered]);\n\n const buttonReviewProps = {\n customStyle: {\n backgroundColor: '#FFF',\n transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out'\n },\n onReviewClick,\n 'aria-label': `${skillTitle}, ${reviewLocale}`,\n label: reviewLocale,\n 'data-name': 'learner-skill-card-review-button'\n };\n\n const buttonExploreProps = {\n customStyle: {\n backgroundColor: hovered ? primarySkinColor : convert(`color(${primarySkinColor} a(0.07))`),\n color: hovered ? '#FFFFFF' : primarySkinColor,\n transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out'\n },\n onExploreClick,\n 'aria-label': `${skillTitle}, ${exploreLocale}`,\n label: exploreLocale,\n 'data-name': 'learner-skill-card-explore-button',\n icon: {\n position: 'left',\n faIcon: {\n name: 'compass',\n backgroundColor: hovered ? primarySkinColor : convert(`color(${primarySkinColor} a(0.07))`),\n color: hovered ? '#FFFFFF' : primarySkinColor,\n size: 16\n }\n }\n };\n\n const completedPercentage =\n skillCourses && Number.parseInt((completedCourses / skillCourses) * 100);\n\n const ProgressBar = useCallback(() => {\n if (!skillCourses) return null;\n\n const progressBarColor = '#3EC483';\n const inlineProgressValueStyle = {\n backgroundColor: progressBarColor,\n width: `${completedPercentage}%`\n };\n\n return (\n <div className={style.progressWrapper}>\n <div\n data-name=\"progress\"\n className={style.progress}\n style={inlineProgressValueStyle}\n role=\"progressbar\"\n aria-label={get('progression', ariaLabel)}\n />\n </div>\n );\n }, [completedPercentage, ariaLabel, skillCourses]);\n\n return (\n <div\n className={style.learnerSkillCardWrapper}\n data-name=\"learner-skill-card-wrapper\"\n aria-label={ariaLabel}\n >\n {skillCourses || skillQuestions ? (\n <div className={style.skillCoursesAndQuestionsWrapper}>\n {skillCourses ? (\n <div className={style.skillInformation} data-name=\"skill-courses\">\n <span className={style.skillInformationNumber}>{skillCourses}</span> {coursesLocale}\n </div>\n ) : null}\n {skillQuestions ? (\n <div className={style.skillInformation} data-name=\"skill-questions\">\n <span className={style.skillInformationNumber}>{skillQuestions}</span>\n {questionsLocale}\n </div>\n ) : null}\n </div>\n ) : null}\n <div className={style.skillTitleWrapper}>\n <div\n data-name=\"skill-title\"\n className={style.skillTitle}\n aria-label={skillAriaLabel || skillTitle}\n >\n {skillTitle}\n </div>\n <div className={style.skillFocusBadge}>\n <Icon\n iconName=\"bullseye-arrow\"\n backgroundColor=\"#DDD1FF\"\n size={{\n faSize: 10,\n wrapperSize: 16\n }}\n />\n {skillFocusLocale}\n </div>\n </div>\n <ProgressBar />\n <div className={style.progressInformations}>\n {skillCourses && (\n <>\n <div className={style.progressInformation} data-name=\"skill-completed-courses\">\n <span className={style.progressInformationNumber}>{completedCourses}</span>\n {coursesCompletedLocale}\n </div>\n <div className={style.progressInformation} data-name=\"completed-percentage\">\n <span className={style.progressInformationNumber}>{completedPercentage}%</span>\n </div>\n </>\n )}\n </div>\n <div className={style.ctaWrapper} data-name=\"cta-wrapper\">\n <ButtonLink {...buttonReviewProps} />\n <div\n className={style.buttonWrapper}\n onMouseOver={handleMouseOver}\n onMouseLeave={handleMouseLeave}\n data-name=\"button-explore-wrapper\"\n >\n <ButtonLink {...buttonExploreProps} />\n </div>\n </div>\n </div>\n );\n};\n\nLearnerSkillCard.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nLearnerSkillCard.propTypes = {\n 'aria-label': PropTypes.string,\n skillTitle: PropTypes.string,\n skillAriaLabel: PropTypes.string,\n metrics: PropTypes.shape({\n skillCourses: PropTypes.number,\n skillQuestions: PropTypes.number,\n completedCourses: PropTypes.number\n }),\n onReviewClick: PropTypes.func,\n onExploreClick: PropTypes.func\n};\n\nexport default LearnerSkillCard;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA,MAAMA,gBAAgB,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EAC3C,MAAM;IACJ,cAAcC,SADV;IAEJC,UAFI;IAGJC,cAHI;IAIJC,OAJI;IAKJC,aALI;IAMJC;EANI,IAOFP,KAPJ;EAQA,MAAM;IAACQ,YAAD;IAAeC,cAAf;IAA+BC,gBAAgB,GAAG;EAAlD,IAAuDL,OAA7D;EACA,MAAM;IAACM,IAAD;IAAOC;EAAP,IAAoBX,OAA1B;EACA,MAAM,CAACY,OAAD,EAAUC,UAAV,IAAwB,IAAAC,eAAA,EAAS,KAAT,CAA9B;EACA,MAAMC,gBAAgB,GAAG,qBAAM,SAAN,EAAiB,gBAAjB,EAAmCL,IAAnC,CAAzB;EAEA,MAAMM,YAAY,GAAGL,SAAS,CAAC,QAAD,CAA9B;EACA,MAAMM,aAAa,GAAGN,SAAS,CAAC,SAAD,CAA/B;EACA,MAAMO,aAAa,GAAGP,SAAS,CAAC,SAAD,CAA/B;EACA,MAAMQ,eAAe,GAAGR,SAAS,CAAC,WAAD,CAAjC;EACA,MAAMS,gBAAgB,GAAGT,SAAS,CAAC,aAAD,CAAlC;EACA,MAAMU,sBAAsB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AAA,CAAUE,KAAV,CAAgB;IACvB5D,YAAY,EAAE0D,kBAAA,CAAUG,MADD;IAEvB5D,cAAc,EAAEyD,kBAAA,CAAUG,MAFH;IAGvB3D,gBAAgB,EAAEwD,kBAAA,CAAUG;EAHL,CAAhB,CAJkB;EAS3B/D,aAAa,EAAE4D,kBAAA,CAAUI,IATE;EAU3B/D,cAAc,EAAE2D,kBAAA,CAAUI;AAVC,CAA7B;eAaevE,gB"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
@value breakpoints: "../../variables/breakpoints.css";
|
|
2
|
+
@value mobile from breakpoints;
|
|
3
|
+
@value colors: "../../variables/colors.css";
|
|
4
|
+
@value cm_grey_400 from colors;
|
|
5
|
+
@value white from colors;
|
|
6
|
+
@value light from colors;
|
|
7
|
+
@value box_shadow_light_dark from colors;
|
|
8
|
+
@value box_shadow_medium_dark from colors;
|
|
9
|
+
|
|
10
|
+
@keyframes progressbar {
|
|
11
|
+
0% {
|
|
12
|
+
width: 0;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.textBase {
|
|
17
|
+
font-family: "Gilroy";
|
|
18
|
+
font-style: normal;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.learnerSkillCardWrapper {
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-direction: column;
|
|
24
|
+
max-width: 258px;
|
|
25
|
+
width: 100%;
|
|
26
|
+
min-height: 252px;
|
|
27
|
+
box-shadow: 0px 4px 16px 0px rgba(0, 0, 0, 0.04);
|
|
28
|
+
transition: box-shadow 0.15s ease-in-out;
|
|
29
|
+
border-radius: 12px;
|
|
30
|
+
padding: 24px;
|
|
31
|
+
box-sizing: border-box;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.learnerSkillCardWrapper:hover {
|
|
35
|
+
box-shadow: 0px 4px 16px 0px rgba(0, 0, 0, 0.10);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.skillCoursesAndQuestionsWrapper,
|
|
39
|
+
.progressInformations {
|
|
40
|
+
display: flex;
|
|
41
|
+
justify-content: space-between;
|
|
42
|
+
margin-bottom: 8px;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.skillInformation,
|
|
46
|
+
.progressInformation {
|
|
47
|
+
composes: textBase;
|
|
48
|
+
font-weight: 400;
|
|
49
|
+
font-size: 10px;
|
|
50
|
+
line-height: 12px;
|
|
51
|
+
color: cm_grey_400;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.skillInformationNumber,
|
|
55
|
+
.progressInformationNumber {
|
|
56
|
+
color: #000;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.skillTitleWrapper {
|
|
60
|
+
display: flex;
|
|
61
|
+
flex-direction: column;
|
|
62
|
+
min-height: 68px;
|
|
63
|
+
margin-bottom: 24px;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.skillTitle {
|
|
67
|
+
composes: textBase;
|
|
68
|
+
font-weight: 600;
|
|
69
|
+
font-size: 16px;
|
|
70
|
+
line-height: 22px;
|
|
71
|
+
margin-bottom: 8px;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.skillFocusBadge {
|
|
75
|
+
composes: textBase;
|
|
76
|
+
display: flex;
|
|
77
|
+
height: 12px;
|
|
78
|
+
width: 62px;
|
|
79
|
+
align-items: center;
|
|
80
|
+
background-color: #DDD1FF;
|
|
81
|
+
border-radius: 24px;
|
|
82
|
+
padding: 2px 4px;
|
|
83
|
+
font-size: 10px;
|
|
84
|
+
line-height: 12px;
|
|
85
|
+
font-weight: 600;
|
|
86
|
+
color: #3900D6;
|
|
87
|
+
margin-right: 8px;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.progressWrapper {
|
|
91
|
+
position: relative;
|
|
92
|
+
left: 0;
|
|
93
|
+
width: 100%;
|
|
94
|
+
height: 4px;
|
|
95
|
+
border-radius: 2px;
|
|
96
|
+
overflow: hidden;
|
|
97
|
+
background: light;
|
|
98
|
+
margin-bottom: 8px;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.progress {
|
|
102
|
+
display: block;
|
|
103
|
+
height: 4px;
|
|
104
|
+
animation: progressbar 2s ease-in-out;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.progressInformations {
|
|
108
|
+
min-height: 12px;
|
|
109
|
+
margin-bottom: 24px;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.ctaWrapper {
|
|
113
|
+
margin-top: auto;
|
|
114
|
+
display: flex;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.buttonWrapper {
|
|
118
|
+
display: flex;
|
|
119
|
+
}
|
|
@@ -29,7 +29,7 @@ declare namespace Template {
|
|
|
29
29
|
theme: PropTypes.Requireable<string>;
|
|
30
30
|
'aria-label': PropTypes.Requireable<string>;
|
|
31
31
|
groupAriaLabel: PropTypes.Requireable<string>;
|
|
32
|
-
}, "aria-label" | "
|
|
32
|
+
}, "aria-label" | "onChange" | "theme" | "options" | "groupAriaLabel">>>) | null | undefined)[]>;
|
|
33
33
|
const groupAriaLabel: PropTypes.Requireable<string>;
|
|
34
34
|
}
|
|
35
35
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/quick-access-card/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/quick-access-card/index.js"],"names":[],"mappings":";AAoIA,wEAkEC"}
|
|
@@ -11,10 +11,16 @@ var _novaIcons = require("@coorpacademy/nova-icons");
|
|
|
11
11
|
|
|
12
12
|
var _link = _interopRequireDefault(require("../../atom/link"));
|
|
13
13
|
|
|
14
|
+
var _colors = require("../../variables/colors");
|
|
15
|
+
|
|
14
16
|
var _style = _interopRequireDefault(require("./style.css"));
|
|
15
17
|
|
|
16
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
19
|
|
|
20
|
+
const {
|
|
21
|
+
cm_primary_blue
|
|
22
|
+
} = _colors.COLORS;
|
|
23
|
+
|
|
18
24
|
const getIcon = feature => {
|
|
19
25
|
switch (feature) {
|
|
20
26
|
case 'manage_users':
|
|
@@ -116,7 +122,7 @@ const getBackgroudRadialColors = feature => {
|
|
|
116
122
|
return {
|
|
117
123
|
iconBackgroundColor: '#F1F6FE',
|
|
118
124
|
degrees: '0',
|
|
119
|
-
iconColor:
|
|
125
|
+
iconColor: cm_primary_blue
|
|
120
126
|
};
|
|
121
127
|
|
|
122
128
|
case 'network':
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["getIcon","feature","ManageUserIcon","UploadUserIcon","ManageEmailIcon","MassiveBattleIcon","CmsIcon","LookAndFeelIcon","DashboardIcon","CockpitIcon","AnalyticsIcon","Binoculaire","ContentBook","NetworkAlert","ChatBubbleCircleQuestionMark","MobilePhone","getBackgroudRadialColors","iconBackgroundColor","degrees","iconColor","QuickAccessCard","props","context","title","description","href","openInNewTab","isMoocCard","Icon","newTabOnClick","style","newTabIcon","quickAccess","link","background","content","iconFeatureWrapper","backgroundColor","iconFeature","color","cta","iconGotoWrapper","hoverMooc","hover","iconGoto","propTypes","PropTypes","string","bool","oneOf"],"sources":["../../../src/molecule/quick-access-card/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {\n NovaSolidContentContentBookAdd as CockpitIcon,\n NovaSolidUsersActionsUser as ManageUserIcon,\n NovaSolidFilesBasicFileUpload2 as UploadUserIcon,\n NovaSolidEmailAtSign as ManageEmailIcon,\n NovaSolidDesignPaintBrush2 as LookAndFeelIcon,\n NovaSolidContentContentViewList as DashboardIcon,\n NovaSolidContentEditionFlash as MassiveBattleIcon,\n NovaSolidApplicationsWindowApplication5 as CmsIcon,\n NovaSolidBusinessBusinessGraphLine2 as AnalyticsIcon,\n NovaCompositionNavigationArrowRight as ActionIcon,\n NovaCompositionCoorpacademyOpenInNewTab as NewTabIcon,\n NovaLinePhoneMobilePhone as MobilePhone,\n NovaLineMessagesChatChatBubbleCircleQuestionMark as ChatBubbleCircleQuestionMark,\n NovaLineNetworkNetworkAlert as NetworkAlert,\n NovaLineObjectsBinoculars as Binoculaire,\n NovaLineContentEditionContentBook as ContentBook\n} from '@coorpacademy/nova-icons';\nimport Link from '../../atom/link';\nimport style from './style.css';\n\nconst getIcon = feature => {\n switch (feature) {\n case 'manage_users':\n return ManageUserIcon;\n case 'upload_users':\n return UploadUserIcon;\n case 'manage_email':\n return ManageEmailIcon;\n case 'massive_battle':\n return MassiveBattleIcon;\n case 'cms':\n return CmsIcon;\n case 'look_and_feel':\n return LookAndFeelIcon;\n case 'dashboard':\n return DashboardIcon;\n case 'cockpit':\n return CockpitIcon;\n case 'analytics':\n return AnalyticsIcon;\n case 'binoculaire':\n return Binoculaire;\n case 'book':\n return ContentBook;\n case 'network':\n return NetworkAlert;\n case 'chat-bubble-question':\n return ChatBubbleCircleQuestionMark;\n case 'mobile-phone':\n return MobilePhone;\n default:\n return CockpitIcon;\n }\n};\n\nconst getBackgroudRadialColors = feature => {\n switch (feature) {\n case 'manage_users':\n case 'upload_users':\n return {\n iconBackgroundColor: '#2EC1D6',\n degrees: '187',\n iconColor: null\n };\n case 'look_and_feel':\n case 'dashboard':\n return {\n iconBackgroundColor: '#18BB98',\n degrees: '167',\n iconColor: null\n };\n case 'cockpit':\n return {\n iconBackgroundColor: '#FF7043',\n degrees: '14',\n iconColor: null\n };\n case 'manage_email':\n case 'massive_battle':\n case 'cms':\n return {\n iconBackgroundColor: '#7340FF',\n degrees: '256',\n iconColor: null\n };\n case 'analytics':\n return {\n iconBackgroundColor: '#FF4040',\n degrees: '0',\n iconColor: null\n };\n case 'binoculaire':\n return {\n iconBackgroundColor: '#FFEFEB',\n iconColor: '#FF541F',\n degrees: '0'\n };\n case 'book':\n return {\n iconBackgroundColor: '#F1F6FE',\n degrees: '0',\n iconColor: '#0061FF'\n };\n case 'network':\n return {\n iconBackgroundColor: '#FFE5E6',\n iconColor: '#FF0A0A',\n degrees: '0'\n };\n case 'chat-bubble-question':\n return {\n iconBackgroundColor: '#E8FCF8',\n iconColor: '#16AC8C',\n degrees: '0'\n };\n case 'mobile-phone':\n return {\n iconBackgroundColor: '#F4F0FF',\n degrees: '0',\n iconColor: '#5C21FF'\n };\n default:\n return null;\n }\n};\n\nconst QuickAccessCard = (props, context) => {\n const {title, description, feature, href, openInNewTab = false, isMoocCard = false} = props;\n const {iconBackgroundColor, degrees, iconColor} = getBackgroudRadialColors(feature);\n const Icon = getIcon(feature);\n const newTabOnClick = openInNewTab ? <NewTabIcon className={style.newTabIcon} /> : null;\n\n return (\n <div data-name=\"quick-access-card\" data-type={feature} className={style.quickAccess}>\n <Link href={href} target={openInNewTab ? '_blank' : '_self'} className={style.link}>\n <div\n style={\n !isMoocCard\n ? {\n background: `radial-gradient(62.12% 56.45% at 0% 77.29%, \n hsl(${degrees}deg 68% 40% / 20%) 0%, \n hsl(${degrees}deg 68% 40% / 0%) 100%), \n radial-gradient(113.85% 103.46% at 93.27% 7.88%,\n hsl(${degrees}deg 67% 51% / 15%) 0%, \n hsl(${degrees}deg 67% 51% / 0%) 100%),\n radial-gradient(49.66% 49.63% at 78.65% 86.26%, \n hsl(${degrees}deg 87% 91%) 0%, \n hsl(${degrees}deg 87% 91% / 0%) 100%), \n #FAFAFA`\n }\n : null\n }\n className={style.content}\n >\n <div\n className={style.iconFeatureWrapper}\n style={{\n backgroundColor: iconBackgroundColor\n }}\n >\n <Icon className={style.iconFeature} style={{color: iconColor}} />\n </div>\n <div className={style.title}>\n {title}\n {newTabOnClick}\n </div>\n <div className={style.description}>{description}</div>\n <div className={style.cta}>\n <div\n className={!isMoocCard ? style.iconGotoWrapper : null}\n style={\n !isMoocCard\n ? {\n backgroundColor: iconBackgroundColor\n }\n : null\n }\n >\n <div\n className={isMoocCard ? style.hoverMooc : style.hover}\n style={{\n color: isMoocCard ? '#FFFFFF' : iconBackgroundColor\n }}\n >\n <ActionIcon className={style.iconGoto} />\n </div>\n </div>\n </div>\n </div>\n </Link>\n </div>\n );\n};\n\nQuickAccessCard.propTypes = {\n title: PropTypes.string,\n description: PropTypes.string,\n href: PropTypes.string,\n openInNewTab: PropTypes.bool,\n isMoocCard: PropTypes.bool,\n feature: PropTypes.oneOf([\n 'analytics',\n 'cms',\n 'cockpit',\n 'massive_battle',\n 'manage_email',\n 'dashboard',\n 'look_and_feel',\n 'manage_users',\n 'upload_users',\n 'binoculaire',\n 'book',\n 'network',\n 'chat-bubble-question',\n 'mobile-phone'\n ])\n};\n\nexport default QuickAccessCard;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AAkBA;;AACA;;;;AAEA,MAAMA,OAAO,GAAGC,OAAO,IAAI;EACzB,QAAQA,OAAR;IACE,KAAK,cAAL;MACE,OAAOC,oCAAP;;IACF,KAAK,cAAL;MACE,OAAOC,yCAAP;;IACF,KAAK,cAAL;MACE,OAAOC,+BAAP;;IACF,KAAK,gBAAL;MACE,OAAOC,uCAAP;;IACF,KAAK,KAAL;MACE,OAAOC,kDAAP;;IACF,KAAK,eAAL;MACE,OAAOC,qCAAP;;IACF,KAAK,WAAL;MACE,OAAOC,0CAAP;;IACF,KAAK,SAAL;MACE,OAAOC,yCAAP;;IACF,KAAK,WAAL;MACE,OAAOC,8CAAP;;IACF,KAAK,aAAL;MACE,OAAOC,oCAAP;;IACF,KAAK,MAAL;MACE,OAAOC,4CAAP;;IACF,KAAK,SAAL;MACE,OAAOC,sCAAP;;IACF,KAAK,sBAAL;MACE,OAAOC,2DAAP;;IACF,KAAK,cAAL;MACE,OAAOC,mCAAP;;IACF;MACE,OAAON,yCAAP;EA9BJ;AAgCD,CAjCD;;AAmCA,MAAMO,wBAAwB,GAAGf,OAAO,IAAI;EAC1C,QAAQA,OAAR;IACE,KAAK,cAAL;IACA,KAAK,cAAL;MACE,OAAO;QACLgB,mBAAmB,EAAE,SADhB;QAELC,OAAO,EAAE,KAFJ;QA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AAtB,GAAoCA,WAApC,CA/BF,eAgCE;IAAK,SAAS,EAAEM,cAAA,CAAMU;EAAtB,gBACE;IACE,SAAS,EAAE,CAACb,UAAD,GAAcG,cAAA,CAAMW,eAApB,GAAsC,IADnD;IAEE,KAAK,EACH,CAACd,UAAD,GACI;MACEU,eAAe,EAAEpB;IADnB,CADJ,GAII;EAPR,gBAUE;IACE,SAAS,EAAEU,UAAU,GAAGG,cAAA,CAAMY,SAAT,GAAqBZ,cAAA,CAAMa,KADlD;IAEE,KAAK,EAAE;MACLJ,KAAK,EAAEZ,UAAU,GAAG,SAAH,GAAeV;IAD3B;EAFT,gBAME,6BAAC,8CAAD;IAAY,SAAS,EAAEa,cAAA,CAAMc;EAA7B,EANF,CAVF,CADF,CAhCF,CADF,CADF,CADF;AA4DD,CAlED;;AAoEAxB,eAAe,CAACyB,SAAhB,2CAA4B;EAC1BtB,KAAK,EAAEuB,kBAAA,CAAUC,MADS;EAE1BvB,WAAW,EAAEsB,kBAAA,CAAUC,MAFG;EAG1BtB,IAAI,EAAEqB,kBAAA,CAAUC,MAHU;EAI1BrB,YAAY,EAAEoB,kBAAA,CAAUE,IAJE;EAK1BrB,UAAU,EAAEmB,kBAAA,CAAUE,IALI;EAM1B/C,OAAO,EAAE6C,kBAAA,CAAUG,KAAV,CAAgB,CACvB,WADuB,EAEvB,KAFuB,EAGvB,SAHuB,EAIvB,gBAJuB,EAKvB,cALuB,EAMvB,WANuB,EAOvB,eAPuB,EAQvB,cARuB,EASvB,cATuB,EAUvB,aAVuB,EAWvB,MAXuB,EAYvB,SAZuB,EAavB,sBAbuB,EAcvB,cAduB,CAAhB;AANiB,CAA5B;eAwBe7B,e"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["cm_primary_blue","COLORS","getIcon","feature","ManageUserIcon","UploadUserIcon","ManageEmailIcon","MassiveBattleIcon","CmsIcon","LookAndFeelIcon","DashboardIcon","CockpitIcon","AnalyticsIcon","Binoculaire","ContentBook","NetworkAlert","ChatBubbleCircleQuestionMark","MobilePhone","getBackgroudRadialColors","iconBackgroundColor","degrees","iconColor","QuickAccessCard","props","context","title","description","href","openInNewTab","isMoocCard","Icon","newTabOnClick","style","newTabIcon","quickAccess","link","background","content","iconFeatureWrapper","backgroundColor","iconFeature","color","cta","iconGotoWrapper","hoverMooc","hover","iconGoto","propTypes","PropTypes","string","bool","oneOf"],"sources":["../../../src/molecule/quick-access-card/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {\n NovaSolidContentContentBookAdd as CockpitIcon,\n NovaSolidUsersActionsUser as ManageUserIcon,\n NovaSolidFilesBasicFileUpload2 as UploadUserIcon,\n NovaSolidEmailAtSign as ManageEmailIcon,\n NovaSolidDesignPaintBrush2 as LookAndFeelIcon,\n NovaSolidContentContentViewList as DashboardIcon,\n NovaSolidContentEditionFlash as MassiveBattleIcon,\n NovaSolidApplicationsWindowApplication5 as CmsIcon,\n NovaSolidBusinessBusinessGraphLine2 as AnalyticsIcon,\n NovaCompositionNavigationArrowRight as ActionIcon,\n NovaCompositionCoorpacademyOpenInNewTab as NewTabIcon,\n NovaLinePhoneMobilePhone as MobilePhone,\n NovaLineMessagesChatChatBubbleCircleQuestionMark as ChatBubbleCircleQuestionMark,\n NovaLineNetworkNetworkAlert as NetworkAlert,\n NovaLineObjectsBinoculars as Binoculaire,\n NovaLineContentEditionContentBook as ContentBook\n} from '@coorpacademy/nova-icons';\nimport Link from '../../atom/link';\nimport {COLORS} from '../../variables/colors';\nimport style from './style.css';\n\nconst {cm_primary_blue} = COLORS;\n\nconst getIcon = feature => {\n switch (feature) {\n case 'manage_users':\n return ManageUserIcon;\n case 'upload_users':\n return UploadUserIcon;\n case 'manage_email':\n return ManageEmailIcon;\n case 'massive_battle':\n return MassiveBattleIcon;\n case 'cms':\n return CmsIcon;\n case 'look_and_feel':\n return LookAndFeelIcon;\n case 'dashboard':\n return DashboardIcon;\n case 'cockpit':\n return CockpitIcon;\n case 'analytics':\n return AnalyticsIcon;\n case 'binoculaire':\n return Binoculaire;\n case 'book':\n return ContentBook;\n case 'network':\n return NetworkAlert;\n case 'chat-bubble-question':\n return ChatBubbleCircleQuestionMark;\n case 'mobile-phone':\n return MobilePhone;\n default:\n return CockpitIcon;\n }\n};\n\nconst getBackgroudRadialColors = feature => {\n switch (feature) {\n case 'manage_users':\n case 'upload_users':\n return {\n iconBackgroundColor: '#2EC1D6',\n degrees: '187',\n iconColor: null\n };\n case 'look_and_feel':\n case 'dashboard':\n return {\n iconBackgroundColor: '#18BB98',\n degrees: '167',\n iconColor: null\n };\n case 'cockpit':\n return {\n iconBackgroundColor: '#FF7043',\n degrees: '14',\n iconColor: null\n };\n case 'manage_email':\n case 'massive_battle':\n case 'cms':\n return {\n iconBackgroundColor: '#7340FF',\n degrees: '256',\n iconColor: null\n };\n case 'analytics':\n return {\n iconBackgroundColor: '#FF4040',\n degrees: '0',\n iconColor: null\n };\n case 'binoculaire':\n return {\n iconBackgroundColor: '#FFEFEB',\n iconColor: '#FF541F',\n degrees: '0'\n };\n case 'book':\n return {\n iconBackgroundColor: '#F1F6FE',\n degrees: '0',\n iconColor: cm_primary_blue\n };\n case 'network':\n return {\n iconBackgroundColor: '#FFE5E6',\n iconColor: '#FF0A0A',\n degrees: '0'\n };\n case 'chat-bubble-question':\n return {\n iconBackgroundColor: '#E8FCF8',\n iconColor: '#16AC8C',\n degrees: '0'\n };\n case 'mobile-phone':\n return {\n iconBackgroundColor: '#F4F0FF',\n degrees: '0',\n iconColor: '#5C21FF'\n };\n default:\n return null;\n }\n};\n\nconst QuickAccessCard = (props, context) => {\n const {title, description, feature, href, openInNewTab = false, isMoocCard = false} = props;\n const {iconBackgroundColor, degrees, iconColor} = getBackgroudRadialColors(feature);\n const Icon = getIcon(feature);\n const newTabOnClick = openInNewTab ? <NewTabIcon className={style.newTabIcon} /> : null;\n\n return (\n <div data-name=\"quick-access-card\" data-type={feature} className={style.quickAccess}>\n <Link href={href} target={openInNewTab ? '_blank' : '_self'} className={style.link}>\n <div\n style={\n !isMoocCard\n ? {\n background: `radial-gradient(62.12% 56.45% at 0% 77.29%, \n hsl(${degrees}deg 68% 40% / 20%) 0%, \n hsl(${degrees}deg 68% 40% / 0%) 100%), \n radial-gradient(113.85% 103.46% at 93.27% 7.88%,\n hsl(${degrees}deg 67% 51% / 15%) 0%, \n hsl(${degrees}deg 67% 51% / 0%) 100%),\n radial-gradient(49.66% 49.63% at 78.65% 86.26%, \n hsl(${degrees}deg 87% 91%) 0%, \n hsl(${degrees}deg 87% 91% / 0%) 100%), \n #FAFAFA`\n }\n : null\n }\n className={style.content}\n >\n <div\n className={style.iconFeatureWrapper}\n style={{\n backgroundColor: iconBackgroundColor\n }}\n >\n <Icon className={style.iconFeature} style={{color: iconColor}} />\n </div>\n <div className={style.title}>\n {title}\n {newTabOnClick}\n </div>\n <div className={style.description}>{description}</div>\n <div className={style.cta}>\n <div\n className={!isMoocCard ? style.iconGotoWrapper : null}\n style={\n !isMoocCard\n ? {\n backgroundColor: iconBackgroundColor\n }\n : null\n }\n >\n <div\n className={isMoocCard ? style.hoverMooc : style.hover}\n style={{\n color: isMoocCard ? '#FFFFFF' : iconBackgroundColor\n }}\n >\n <ActionIcon className={style.iconGoto} />\n </div>\n </div>\n </div>\n </div>\n </Link>\n </div>\n );\n};\n\nQuickAccessCard.propTypes = {\n title: PropTypes.string,\n description: PropTypes.string,\n href: PropTypes.string,\n openInNewTab: PropTypes.bool,\n isMoocCard: PropTypes.bool,\n feature: PropTypes.oneOf([\n 'analytics',\n 'cms',\n 'cockpit',\n 'massive_battle',\n 'manage_email',\n 'dashboard',\n 'look_and_feel',\n 'manage_users',\n 'upload_users',\n 'binoculaire',\n 'book',\n 'network',\n 'chat-bubble-question',\n 'mobile-phone'\n ])\n};\n\nexport default QuickAccessCard;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AAkBA;;AACA;;AACA;;;;AAEA,MAAM;EAACA;AAAD,IAAoBC,cAA1B;;AAEA,MAAMC,OAAO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CAVF,CADF,CAhCF,CADF,CADF,CADF;AA4DD,CAlED;;AAoEAxB,eAAe,CAACyB,SAAhB,2CAA4B;EAC1BtB,KAAK,EAAEuB,kBAAA,CAAUC,MADS;EAE1BvB,WAAW,EAAEsB,kBAAA,CAAUC,MAFG;EAG1BtB,IAAI,EAAEqB,kBAAA,CAAUC,MAHU;EAI1BrB,YAAY,EAAEoB,kBAAA,CAAUE,IAJE;EAK1BrB,UAAU,EAAEmB,kBAAA,CAAUE,IALI;EAM1B/C,OAAO,EAAE6C,kBAAA,CAAUG,KAAV,CAAgB,CACvB,WADuB,EAEvB,KAFuB,EAGvB,SAHuB,EAIvB,gBAJuB,EAKvB,cALuB,EAMvB,WANuB,EAOvB,eAPuB,EAQvB,cARuB,EASvB,cATuB,EAUvB,aAVuB,EAWvB,MAXuB,EAYvB,SAZuB,EAavB,sBAbuB,EAcvB,cAduB,CAAhB;AANiB,CAA5B;eAwBe7B,e"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../src/template/mobile-login/welcome/index.native.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../src/template/mobile-login/welcome/index.native.tsx"],"names":[],"mappings":";AAiLA,oBAAY,KAAK,GAAG;IAClB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC,yBAAyB,EAAE,MAAM,IAAI,CAAC;IACtC,OAAO,EAAE;QACP,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,EAAE,MAAM,CAAC;QACpB,SAAS,EAAE,MAAM,CAAC;QAClB,cAAc,EAAE,MAAM,CAAC;QACvB,SAAS,EAAE,MAAM,CAAC;QAClB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH,CAAC;AAEF,QAAA,MAAM,OAAO,UAAW,KAAK,uBAuI5B,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -19,12 +19,18 @@ var _templateContext = require("../../app-review/template-context");
|
|
|
19
19
|
|
|
20
20
|
var _index2 = _interopRequireDefault(require("../../../atom/text/index.native"));
|
|
21
21
|
|
|
22
|
+
var _colors = require("../../../variables/colors");
|
|
23
|
+
|
|
22
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
25
|
|
|
24
26
|
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
27
|
|
|
26
28
|
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
29
|
|
|
30
|
+
const {
|
|
31
|
+
cm_primary_blue
|
|
32
|
+
} = _colors.COLORS;
|
|
33
|
+
|
|
28
34
|
const createStyleSheet = theme => _reactNative.StyleSheet.create({
|
|
29
35
|
wrapper: {
|
|
30
36
|
top: 0,
|
|
@@ -244,7 +250,7 @@ const Welcome = props => {
|
|
|
244
250
|
}, /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, {
|
|
245
251
|
style: [styleSheet.gradients, translateGradients.animatedStyle]
|
|
246
252
|
}, /*#__PURE__*/_react.default.createElement(_reactNativeLinearGradient.default, {
|
|
247
|
-
colors: [
|
|
253
|
+
colors: [cm_primary_blue, '#fff'],
|
|
248
254
|
locations: [0, 0.95],
|
|
249
255
|
style: styleSheet.gradient
|
|
250
256
|
}), /*#__PURE__*/_react.default.createElement(_reactNativeLinearGradient.default, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","names":["createStyleSheet","theme","StyleSheet","create","wrapper","top","bottom","left","right","flex","justifyContent","alignItems","paddingHorizontal","content","width","gradients","position","gradient","opacity","transform","rotate","gradient2","animatedLogoWrapper","animatedLogo","height","logo","padding","logoBG","backgroundColor","title","color","fontWeight","fontSize","lineHeight","paddingVertical","description","actions","buttons","button","marginVertical","flexDirection","borderRadius","overflow","ctaQrCode","colors","cta","ctaQrCodeText","marginLeft","qrCodeIcon","fill","ctaReceiveMail","ctaReceiveMailText","mailIcon","help","titleHelp","ctaHelp","textDecorationLine","Welcome","props","locales","onDemoPress","onQRCodeButtonPress","onHelpPress","onReceiveEmailButtonPress","useTemplateContext","styleSheet","setStylesheet","useState","translateGradients","useTranslateY","fromValue","toValue","duration","delay","translateContent","fadeInContent","useAnimateProp","property","fadeOutStartLogo","fadeInFinalLogo","scaleAnim","useRef","Animated","Value","current","interpolateScale","interpolate","inputRange","outputRange","useEffect","_stylesheet","start","animatedScale","timing","useNativeDriver","animatedStyle","scale"],"sources":["../../../../src/template/mobile-login/welcome/index.native.tsx"],"sourcesContent":["import React, {useEffect, useRef, useState} from 'react';\nimport {Animated, StyleSheet, TextStyle, View, ViewStyle} from 'react-native';\nimport LinearGradient from 'react-native-linear-gradient';\nimport {\n NovaCompositionCoorpacademyLogoCoorp as LogoCoorp,\n NovaCompositionCoorpacademyQrCode as QrCodeIcon,\n NovaCompositionCoorpacademyEmail as MailIcon\n} from '@coorpacademy/nova-icons';\nimport {useAnimateProp, useTranslateY} from '@coorpacademy/react-native-animation';\nimport Touchable from '../../../hoc/touchable/index.native';\nimport {useTemplateContext} from '../../app-review/template-context';\nimport {Theme} from '../../../variables/theme.native';\nimport Text from '../../../atom/text/index.native';\n\ntype StyleSheetType = {\n wrapper: ViewStyle;\n animatedLogoWrapper: ViewStyle;\n animatedLogo: ViewStyle;\n logo: ViewStyle;\n logoBG: ViewStyle;\n content: ViewStyle;\n gradients: ViewStyle;\n gradient: ViewStyle;\n gradient2: ViewStyle;\n title: TextStyle;\n description: TextStyle;\n actions: ViewStyle;\n buttons: ViewStyle;\n button: ViewStyle;\n qrCodeIcon: ViewStyle;\n mailIcon: ViewStyle;\n ctaQrCode: ViewStyle;\n ctaQrCodeText: TextStyle;\n ctaReceiveMail: ViewStyle;\n ctaReceiveMailText: TextStyle;\n help: ViewStyle;\n titleHelp: TextStyle;\n ctaHelp: ViewStyle;\n};\n\nconst createStyleSheet = (theme: Theme): StyleSheetType =>\n StyleSheet.create({\n wrapper: {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n flex: 1,\n justifyContent: 'space-around',\n alignItems: 'center',\n paddingHorizontal: 24\n },\n content: {\n width: '100%',\n alignItems: 'flex-start'\n },\n gradients: {\n position: 'absolute',\n top: 400,\n bottom: 400,\n left: 0,\n right: 0,\n flex: 1\n },\n gradient: {\n position: 'absolute',\n top: -730,\n bottom: 0,\n left: -380,\n right: -380,\n opacity: 1,\n transform: [{rotate: '35deg'}]\n },\n gradient2: {\n position: 'absolute',\n top: -630,\n bottom: -200,\n left: -300,\n right: -400,\n opacity: 0.6,\n transform: [{rotate: '-35deg'}]\n },\n animatedLogoWrapper: {\n alignItems: 'center'\n },\n animatedLogo: {\n position: 'absolute',\n width: 77,\n height: 100\n },\n logo: {\n padding: 100\n },\n logoBG: {\n backgroundColor: '#fff',\n top: 20,\n width: 60,\n height: 60\n },\n title: {\n color: '#1D1D2B',\n fontWeight: '600',\n fontSize: 28,\n lineHeight: 36,\n paddingVertical: 8\n },\n description: {\n color: '#1D1D2B',\n fontWeight: '400',\n fontSize: 17,\n lineHeight: 24,\n paddingVertical: 8\n },\n actions: {\n width: '100%'\n },\n buttons: {\n paddingVertical: 20,\n alignItems: 'center'\n },\n button: {\n paddingVertical: 12,\n marginVertical: 4,\n width: '100%',\n flexDirection: 'row',\n justifyContent: 'center',\n borderRadius: 12,\n alignItems: 'center',\n overflow: 'hidden'\n },\n ctaQrCode: {\n backgroundColor: theme.colors.cta\n },\n ctaQrCodeText: {\n marginLeft: 8,\n color: '#fff',\n fontWeight: '700',\n fontSize: 14,\n lineHeight: 24\n },\n qrCodeIcon: {\n fill: '#fff',\n height: 14,\n width: 14\n },\n ctaReceiveMail: {\n backgroundColor: '#eaeaeb'\n },\n ctaReceiveMailText: {\n marginLeft: 8,\n color: '#1D1D2B',\n fontWeight: '700',\n fontSize: 14,\n lineHeight: 24\n },\n mailIcon: {\n fill: '#1D1D2B',\n height: 12,\n width: 16\n },\n help: {\n flexDirection: 'row',\n justifyContent: 'center'\n },\n titleHelp: {\n color: '#9999A8'\n },\n ctaHelp: {\n marginLeft: 5,\n textDecorationLine: 'underline',\n color: '#9999A8'\n }\n });\n\nexport type Props = {\n onDemoPress: () => void;\n onHelpPress: () => void;\n onQRCodeButtonPress: () => void;\n onReceiveEmailButtonPress: () => void;\n locales: {\n title: string;\n description: string;\n ctaQrCode: string;\n ctaReceiveMail: string;\n titleHelp: string;\n ctaHelp: string;\n };\n};\n\nconst Welcome = (props: Props) => {\n const {locales, onDemoPress, onQRCodeButtonPress, onHelpPress, onReceiveEmailButtonPress} = props;\n const {theme} = useTemplateContext();\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n\n const translateGradients = useTranslateY({\n fromValue: 0,\n toValue: -200,\n duration: 300,\n delay: 750\n });\n\n const translateContent = useTranslateY({\n fromValue: 170,\n toValue: 0,\n duration: 450,\n delay: 750\n });\n\n const fadeInContent = useAnimateProp({\n property: 'opacity',\n fromValue: 0,\n toValue: 1,\n duration: 650,\n delay: 750\n });\n\n const fadeOutStartLogo = useAnimateProp({\n property: 'opacity',\n fromValue: 1,\n toValue: 0,\n duration: 450,\n delay: 1000\n });\n\n const fadeInFinalLogo = useAnimateProp({\n property: 'opacity',\n fromValue: 0,\n toValue: 1,\n duration: 250,\n delay: 900\n });\n\n const scaleAnim = useRef<Animated.Value>(new Animated.Value(0)).current;\n const interpolateScale = scaleAnim.interpolate({\n inputRange: [0, 0.4, 0.5, 0.6, 1],\n outputRange: [1, 1.7, 1.7, 1.7, 1]\n });\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme);\n setStylesheet(_stylesheet);\n }, [theme]);\n\n useEffect(() => {\n fadeInContent.start();\n fadeInFinalLogo.start();\n fadeOutStartLogo.start();\n translateContent.start();\n translateGradients.start();\n\n const animatedScale = Animated.timing(scaleAnim, {\n toValue: 1,\n duration: 1000,\n useNativeDriver: true\n });\n\n animatedScale.start();\n\n // on mount only\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n if (!styleSheet) {\n return null;\n }\n return (\n <Animated.View style={[styleSheet.wrapper, translateContent.animatedStyle]} testID=\"welcome\">\n <Animated.View style={[styleSheet.gradients, translateGradients.animatedStyle]}>\n <LinearGradient\n colors={['#0061FF', '#fff']}\n locations={[0, 0.95]}\n style={styleSheet.gradient}\n />\n <LinearGradient\n colors={['#2199AB', '#fff']}\n locations={[0, 0.95]}\n style={styleSheet.gradient2}\n />\n </Animated.View>\n\n <Touchable onLongPress={onDemoPress} style={styleSheet.logo}>\n <Animated.View\n style={[styleSheet.animatedLogoWrapper, {transform: [{scale: interpolateScale}]}]}\n >\n <Animated.View style={[styleSheet.logoBG, fadeInFinalLogo.animatedStyle]} />\n <Animated.View style={[styleSheet.animatedLogo, fadeInFinalLogo.animatedStyle]}>\n <LogoCoorp fill=\"#0061FF\" />\n </Animated.View>\n <Animated.View style={[styleSheet.animatedLogo, fadeOutStartLogo.animatedStyle]}>\n <LogoCoorp fill=\"#fff\" />\n </Animated.View>\n </Animated.View>\n </Touchable>\n <Animated.View style={[styleSheet.content, fadeInContent.animatedStyle]}>\n <Text style={styleSheet.title}>{locales.title}</Text>\n <Text style={styleSheet.description}>{locales.description}</Text>\n\n <View style={styleSheet.actions}>\n <View style={styleSheet.buttons}>\n <Touchable\n style={[styleSheet.button, styleSheet.ctaQrCode]}\n onPress={onQRCodeButtonPress}\n testID=\"qr-code-button\"\n >\n <QrCodeIcon style={styleSheet.qrCodeIcon} />\n <Text style={styleSheet.ctaQrCodeText}>{locales.ctaQrCode}</Text>\n </Touchable>\n <Touchable\n style={[styleSheet.button, styleSheet.ctaReceiveMail]}\n onPress={onReceiveEmailButtonPress}\n testID=\"receive-email-button\"\n >\n <MailIcon style={styleSheet.mailIcon} />\n <Text style={styleSheet.ctaReceiveMailText}>{locales.ctaReceiveMail}</Text>\n </Touchable>\n </View>\n <Touchable onPress={onHelpPress} style={styleSheet.help}>\n <Text style={styleSheet.titleHelp}>{locales.titleHelp}</Text>\n <Text style={styleSheet.ctaHelp}>{locales.ctaHelp}</Text>\n </Touchable>\n </View>\n </Animated.View>\n </Animated.View>\n );\n};\n\nexport default Welcome;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AAKA;;AACA;;AACA;;AAEA;;;;;;;;AA4BA,MAAMA,gBAAgB,GAAIC,KAAD,IACvBC,uBAAA,CAAWC,MAAX,CAAkB;EAChBC,OAAO,EAAE;IACPC,GAAG,EAAE,CADE;IAEPC,MAAM,EAAE,CAFD;IAGPC,IAAI,EAAE,CAHC;IAIPC,KAAK,EAAE,CAJA;IAKPC,IAAI,EAAE,CALC;IAMPC,cAAc,EAAE,cANT;IAOPC,UAAU,EAAE,QAPL;IAQPC,iBAAiB,EAAE;EARZ,CADO;EAWhBC,OAAO,EAAE;IACPC,KAAK,EAAE,MADA;IAEPH,UAAU,EAAE;EAFL,CAXO;EAehBI,SAAS,EAAE;IACTC,QAAQ,EAAE,UADD;IAETX,GAAG,EAAE,GAFI;IAGTC,MAAM,EAAE,GAHC;IAITC,IAAI,EA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3BF,CADF;AA2DD,CAvID;;eAyIeE,O"}
|
|
1
|
+
{"version":3,"file":"index.native.js","names":["cm_primary_blue","COLORS","createStyleSheet","theme","StyleSheet","create","wrapper","top","bottom","left","right","flex","justifyContent","alignItems","paddingHorizontal","content","width","gradients","position","gradient","opacity","transform","rotate","gradient2","animatedLogoWrapper","animatedLogo","height","logo","padding","logoBG","backgroundColor","title","color","fontWeight","fontSize","lineHeight","paddingVertical","description","actions","buttons","button","marginVertical","flexDirection","borderRadius","overflow","ctaQrCode","colors","cta","ctaQrCodeText","marginLeft","qrCodeIcon","fill","ctaReceiveMail","ctaReceiveMailText","mailIcon","help","titleHelp","ctaHelp","textDecorationLine","Welcome","props","locales","onDemoPress","onQRCodeButtonPress","onHelpPress","onReceiveEmailButtonPress","useTemplateContext","styleSheet","setStylesheet","useState","translateGradients","useTranslateY","fromValue","toValue","duration","delay","translateContent","fadeInContent","useAnimateProp","property","fadeOutStartLogo","fadeInFinalLogo","scaleAnim","useRef","Animated","Value","current","interpolateScale","interpolate","inputRange","outputRange","useEffect","_stylesheet","start","animatedScale","timing","useNativeDriver","animatedStyle","scale"],"sources":["../../../../src/template/mobile-login/welcome/index.native.tsx"],"sourcesContent":["import React, {useEffect, useRef, useState} from 'react';\nimport {Animated, StyleSheet, TextStyle, View, ViewStyle} from 'react-native';\nimport LinearGradient from 'react-native-linear-gradient';\nimport {\n NovaCompositionCoorpacademyLogoCoorp as LogoCoorp,\n NovaCompositionCoorpacademyQrCode as QrCodeIcon,\n NovaCompositionCoorpacademyEmail as MailIcon\n} from '@coorpacademy/nova-icons';\nimport {useAnimateProp, useTranslateY} from '@coorpacademy/react-native-animation';\nimport Touchable from '../../../hoc/touchable/index.native';\nimport {useTemplateContext} from '../../app-review/template-context';\nimport {Theme} from '../../../variables/theme.native';\nimport Text from '../../../atom/text/index.native';\nimport {COLORS} from '../../../variables/colors';\n\nconst {cm_primary_blue} = COLORS;\n\ntype StyleSheetType = {\n wrapper: ViewStyle;\n animatedLogoWrapper: ViewStyle;\n animatedLogo: ViewStyle;\n logo: ViewStyle;\n logoBG: ViewStyle;\n content: ViewStyle;\n gradients: ViewStyle;\n gradient: ViewStyle;\n gradient2: ViewStyle;\n title: TextStyle;\n description: TextStyle;\n actions: ViewStyle;\n buttons: ViewStyle;\n button: ViewStyle;\n qrCodeIcon: ViewStyle;\n mailIcon: ViewStyle;\n ctaQrCode: ViewStyle;\n ctaQrCodeText: TextStyle;\n ctaReceiveMail: ViewStyle;\n ctaReceiveMailText: TextStyle;\n help: ViewStyle;\n titleHelp: TextStyle;\n ctaHelp: ViewStyle;\n};\n\nconst createStyleSheet = (theme: Theme): StyleSheetType =>\n StyleSheet.create({\n wrapper: {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n flex: 1,\n justifyContent: 'space-around',\n alignItems: 'center',\n paddingHorizontal: 24\n },\n content: {\n width: '100%',\n alignItems: 'flex-start'\n },\n gradients: {\n position: 'absolute',\n top: 400,\n bottom: 400,\n left: 0,\n right: 0,\n flex: 1\n },\n gradient: {\n position: 'absolute',\n top: -730,\n bottom: 0,\n left: -380,\n right: -380,\n opacity: 1,\n transform: [{rotate: '35deg'}]\n },\n gradient2: {\n position: 'absolute',\n top: -630,\n bottom: -200,\n left: -300,\n right: -400,\n opacity: 0.6,\n transform: [{rotate: '-35deg'}]\n },\n animatedLogoWrapper: {\n alignItems: 'center'\n },\n animatedLogo: {\n position: 'absolute',\n width: 77,\n height: 100\n },\n logo: {\n padding: 100\n },\n logoBG: {\n backgroundColor: '#fff',\n top: 20,\n width: 60,\n height: 60\n },\n title: {\n color: '#1D1D2B',\n fontWeight: '600',\n fontSize: 28,\n lineHeight: 36,\n paddingVertical: 8\n },\n description: {\n color: '#1D1D2B',\n fontWeight: '400',\n fontSize: 17,\n lineHeight: 24,\n paddingVertical: 8\n },\n actions: {\n width: '100%'\n },\n buttons: {\n paddingVertical: 20,\n alignItems: 'center'\n },\n button: {\n paddingVertical: 12,\n marginVertical: 4,\n width: '100%',\n flexDirection: 'row',\n justifyContent: 'center',\n borderRadius: 12,\n alignItems: 'center',\n overflow: 'hidden'\n },\n ctaQrCode: {\n backgroundColor: theme.colors.cta\n },\n ctaQrCodeText: {\n marginLeft: 8,\n color: '#fff',\n fontWeight: '700',\n fontSize: 14,\n lineHeight: 24\n },\n qrCodeIcon: {\n fill: '#fff',\n height: 14,\n width: 14\n },\n ctaReceiveMail: {\n backgroundColor: '#eaeaeb'\n },\n ctaReceiveMailText: {\n marginLeft: 8,\n color: '#1D1D2B',\n fontWeight: '700',\n fontSize: 14,\n lineHeight: 24\n },\n mailIcon: {\n fill: '#1D1D2B',\n height: 12,\n width: 16\n },\n help: {\n flexDirection: 'row',\n justifyContent: 'center'\n },\n titleHelp: {\n color: '#9999A8'\n },\n ctaHelp: {\n marginLeft: 5,\n textDecorationLine: 'underline',\n color: '#9999A8'\n }\n });\n\nexport type Props = {\n onDemoPress: () => void;\n onHelpPress: () => void;\n onQRCodeButtonPress: () => void;\n onReceiveEmailButtonPress: () => void;\n locales: {\n title: string;\n description: string;\n ctaQrCode: string;\n ctaReceiveMail: string;\n titleHelp: string;\n ctaHelp: string;\n };\n};\n\nconst Welcome = (props: Props) => {\n const {locales, onDemoPress, onQRCodeButtonPress, onHelpPress, onReceiveEmailButtonPress} = props;\n const {theme} = useTemplateContext();\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n\n const translateGradients = useTranslateY({\n fromValue: 0,\n toValue: -200,\n duration: 300,\n delay: 750\n });\n\n const translateContent = useTranslateY({\n fromValue: 170,\n toValue: 0,\n duration: 450,\n delay: 750\n });\n\n const fadeInContent = useAnimateProp({\n property: 'opacity',\n fromValue: 0,\n toValue: 1,\n duration: 650,\n delay: 750\n });\n\n const fadeOutStartLogo = useAnimateProp({\n property: 'opacity',\n fromValue: 1,\n toValue: 0,\n duration: 450,\n delay: 1000\n });\n\n const fadeInFinalLogo = useAnimateProp({\n property: 'opacity',\n fromValue: 0,\n toValue: 1,\n duration: 250,\n delay: 900\n });\n\n const scaleAnim = useRef<Animated.Value>(new Animated.Value(0)).current;\n const interpolateScale = scaleAnim.interpolate({\n inputRange: [0, 0.4, 0.5, 0.6, 1],\n outputRange: [1, 1.7, 1.7, 1.7, 1]\n });\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme);\n setStylesheet(_stylesheet);\n }, [theme]);\n\n useEffect(() => {\n fadeInContent.start();\n fadeInFinalLogo.start();\n fadeOutStartLogo.start();\n translateContent.start();\n translateGradients.start();\n\n const animatedScale = Animated.timing(scaleAnim, {\n toValue: 1,\n duration: 1000,\n useNativeDriver: true\n });\n\n animatedScale.start();\n\n // on mount only\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n if (!styleSheet) {\n return null;\n }\n return (\n <Animated.View style={[styleSheet.wrapper, translateContent.animatedStyle]} testID=\"welcome\">\n <Animated.View style={[styleSheet.gradients, translateGradients.animatedStyle]}>\n <LinearGradient\n colors={[cm_primary_blue, '#fff']}\n locations={[0, 0.95]}\n style={styleSheet.gradient}\n />\n <LinearGradient\n colors={['#2199AB', '#fff']}\n locations={[0, 0.95]}\n style={styleSheet.gradient2}\n />\n </Animated.View>\n\n <Touchable onLongPress={onDemoPress} style={styleSheet.logo}>\n <Animated.View\n style={[styleSheet.animatedLogoWrapper, {transform: [{scale: interpolateScale}]}]}\n >\n <Animated.View style={[styleSheet.logoBG, fadeInFinalLogo.animatedStyle]} />\n <Animated.View style={[styleSheet.animatedLogo, fadeInFinalLogo.animatedStyle]}>\n <LogoCoorp fill=\"#0061FF\" />\n </Animated.View>\n <Animated.View style={[styleSheet.animatedLogo, fadeOutStartLogo.animatedStyle]}>\n <LogoCoorp fill=\"#fff\" />\n </Animated.View>\n </Animated.View>\n </Touchable>\n <Animated.View style={[styleSheet.content, fadeInContent.animatedStyle]}>\n <Text style={styleSheet.title}>{locales.title}</Text>\n <Text style={styleSheet.description}>{locales.description}</Text>\n\n <View style={styleSheet.actions}>\n <View style={styleSheet.buttons}>\n <Touchable\n style={[styleSheet.button, styleSheet.ctaQrCode]}\n onPress={onQRCodeButtonPress}\n testID=\"qr-code-button\"\n >\n <QrCodeIcon style={styleSheet.qrCodeIcon} />\n <Text style={styleSheet.ctaQrCodeText}>{locales.ctaQrCode}</Text>\n </Touchable>\n <Touchable\n style={[styleSheet.button, styleSheet.ctaReceiveMail]}\n onPress={onReceiveEmailButtonPress}\n testID=\"receive-email-button\"\n >\n <MailIcon style={styleSheet.mailIcon} />\n <Text style={styleSheet.ctaReceiveMailText}>{locales.ctaReceiveMail}</Text>\n </Touchable>\n </View>\n <Touchable onPress={onHelpPress} style={styleSheet.help}>\n <Text style={styleSheet.titleHelp}>{locales.titleHelp}</Text>\n <Text style={styleSheet.ctaHelp}>{locales.ctaHelp}</Text>\n </Touchable>\n </View>\n </Animated.View>\n </Animated.View>\n );\n};\n\nexport default Welcome;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AAKA;;AACA;;AACA;;AAEA;;AACA;;;;;;;;AAEA,MAAM;EAACA;AAAD,IAAoBC,cAA1B;;AA4BA,MAAMC,gBAAgB,GAAIC,KAAD,IACvBC,uBAAA,CAAWC,MAAX,CAAkB;EAChBC,OAAO,EAAE;IACPC,GAAG,EAAE,CADE;IAEPC,MAAM,EAAE,CAFD;IAGPC,IAAI,EAAE,CAHC;IAIPC,KAAK,EAAE,CAJA;IAKPC,IAAI,EAAE,CALC;IAMPC,cAAc,EAAE,cANT;IAOPC,UAAU,EAAE,QAPL;IAQPC,iBAAiB,EAAE;EARZ,CADO;EAWhBC,OAAO,EAAE;IACPC,KAAK,EAAE,MADA;IAEPH,UAAU,EAAE;EAFL,CAXO;EAehBI,SAAS,EAAE;IACTC,QAAQ,EAAE,UADD;IAETX,GAAG,EAAE,GAFI;IAGTC,MAAM,EAAE,GAHC;IAITC,IAAI,EAAE,CAJG;IAKTC,KAAK,EAAE,CALE;IAMTC,IAAI,EAAE;EANG,CAfK;EAuBhBQ,QAAQ,EAAE;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
|
-
gray:
|
|
3
|
-
negative:
|
|
4
|
-
positive:
|
|
5
|
-
cm_grey_800:
|
|
1
|
+
export declare const COLORS: {
|
|
2
|
+
readonly gray: "#EAEAEB";
|
|
3
|
+
readonly negative: "#ed3436";
|
|
4
|
+
readonly positive: "#35CC7F";
|
|
5
|
+
readonly cm_grey_800: "#171721";
|
|
6
|
+
readonly cm_primary_blue: "#0061FF";
|
|
6
7
|
};
|
|
7
|
-
export declare
|
|
8
|
-
export {};
|
|
8
|
+
export declare type Colors = typeof COLORS;
|
|
9
9
|
//# sourceMappingURL=colors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/variables/colors.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/variables/colors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;CAMT,CAAC;AAEX,oBAAY,MAAM,GAAG,OAAO,MAAM,CAAC"}
|
package/lib/variables/colors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colors.js","names":["COLORS","gray","negative","positive","cm_grey_800"],"sources":["../../src/variables/colors.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"colors.js","names":["COLORS","gray","negative","positive","cm_grey_800","cm_primary_blue"],"sources":["../../src/variables/colors.ts"],"sourcesContent":["export const COLORS = {\n gray: '#EAEAEB',\n negative: '#ed3436',\n positive: '#35CC7F',\n cm_grey_800: '#171721',\n cm_primary_blue: '#0061FF'\n} as const;\n\nexport type Colors = typeof COLORS;\n"],"mappings":";;;;AAAO,MAAMA,MAAM,GAAG;EACpBC,IAAI,EAAE,SADc;EAEpBC,QAAQ,EAAE,SAFU;EAGpBC,QAAQ,EAAE,SAHU;EAIpBC,WAAW,EAAE,SAJO;EAKpBC,eAAe,EAAE;AALG,CAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.native.d.ts","sourceRoot":"","sources":["../../src/variables/theme.native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAGvC,oBAAY,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE5F,eAAO,MAAM,sBAAsB,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"theme.native.d.ts","sourceRoot":"","sources":["../../src/variables/theme.native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAGvC,oBAAY,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE5F,eAAO,MAAM,sBAAsB,YAAY,CAAC;AAIhD,oBAAY,MAAM,GAAG;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;QAChB,WAAW,EAAE,MAAM,CAAC;QACpB,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,OAAO,EAAE;QACP,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,IAAI,EAAE;QACJ,OAAO,EAAE,MAAM,CAAC;QAChB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CA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AAM,EAAE,MAAM,CAAC;KAChB,CAAC;CACH,CAAC;AAEF,QAAA,MAAM,YAAY,EAAE,KAkEnB,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -7,6 +7,9 @@ var _colors = require("./colors");
|
|
|
7
7
|
|
|
8
8
|
const HTML_ANCHOR_TEXT_COLOR = '#002BDB';
|
|
9
9
|
exports.HTML_ANCHOR_TEXT_COLOR = HTML_ANCHOR_TEXT_COLOR;
|
|
10
|
+
const {
|
|
11
|
+
cm_primary_blue
|
|
12
|
+
} = _colors.COLORS;
|
|
10
13
|
const defaultTheme = {
|
|
11
14
|
colors: {
|
|
12
15
|
border: 'rgba(0, 0, 0, 0.1)',
|
|
@@ -23,7 +26,7 @@ const defaultTheme = {
|
|
|
23
26
|
primary: '#06265B',
|
|
24
27
|
secondary: '#FFFFFF'
|
|
25
28
|
},
|
|
26
|
-
cta:
|
|
29
|
+
cta: cm_primary_blue,
|
|
27
30
|
negative: _colors.COLORS.negative,
|
|
28
31
|
positive: _colors.COLORS.positive,
|
|
29
32
|
white: '#FFFFFF',
|