@coorpacademy/components 10.12.0 → 10.13.2
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/{molecule → atom}/checkbox-with-title/index.js +0 -0
- package/es/atom/checkbox-with-title/index.js.map +1 -0
- package/es/{molecule → atom}/checkbox-with-title/style.css +0 -0
- package/es/{molecule → atom}/checkbox-with-title/test/fixtures/checked.js +0 -0
- package/es/atom/checkbox-with-title/test/fixtures/checked.js.map +1 -0
- package/es/{molecule → atom}/checkbox-with-title/test/fixtures/unchecked.js +0 -0
- package/es/atom/checkbox-with-title/test/fixtures/unchecked.js.map +1 -0
- package/es/atom/checkbox-with-title/test/fixtures.js +15 -0
- package/es/atom/checkbox-with-title/test/fixtures.js.map +1 -0
- package/es/atom/input-text/index.js +9 -3
- package/es/atom/input-text/index.js.map +1 -1
- package/es/atom/input-text-with-title/index.js +35 -0
- package/es/atom/input-text-with-title/index.js.map +1 -0
- package/es/atom/input-text-with-title/style.css +24 -0
- package/es/atom/input-text-with-title/test/fixtures/default.js +12 -0
- package/es/atom/input-text-with-title/test/fixtures/default.js.map +1 -0
- package/es/atom/input-text-with-title/test/fixtures/error.js +13 -0
- package/es/atom/input-text-with-title/test/fixtures/error.js.map +1 -0
- package/es/atom/input-text-with-title/test/fixtures.js +15 -0
- package/es/atom/input-text-with-title/test/fixtures.js.map +1 -0
- package/es/atom/review-header-step-item/index.js +55 -0
- package/es/atom/review-header-step-item/index.js.map +1 -0
- package/es/atom/review-header-step-item/style.css +71 -0
- package/es/atom/review-header-step-item/test/fixtures/current.js +8 -0
- package/es/atom/review-header-step-item/test/fixtures/current.js.map +1 -0
- package/es/atom/review-header-step-item/test/fixtures/default.js +8 -0
- package/es/atom/review-header-step-item/test/fixtures/default.js.map +1 -0
- package/es/atom/review-header-step-item/test/fixtures/right.js +8 -0
- package/es/atom/review-header-step-item/test/fixtures/right.js.map +1 -0
- package/es/atom/review-header-step-item/test/fixtures/wrong.js +8 -0
- package/es/atom/review-header-step-item/test/fixtures/wrong.js.map +1 -0
- package/es/atom/select/style.css +1 -0
- package/es/molecule/course-sections/index.js +16 -3
- package/es/molecule/course-sections/index.js.map +1 -1
- package/es/molecule/course-sections/style.css +4 -0
- package/es/molecule/course-sections/test/fixtures/with-mandatory-courses-input.js +11 -0
- package/es/molecule/course-sections/test/fixtures/with-mandatory-courses-input.js.map +1 -0
- package/es/molecule/course-sections/test/fixtures.js +2 -0
- package/es/molecule/course-sections/test/fixtures.js.map +1 -1
- package/es/molecule/input-text-with-titeled-checkbox/index.js +63 -0
- package/es/molecule/input-text-with-titeled-checkbox/index.js.map +1 -0
- package/es/molecule/input-text-with-titeled-checkbox/style.css +3 -0
- package/es/molecule/input-text-with-titeled-checkbox/test/fixtures/checked.js +16 -0
- package/es/molecule/input-text-with-titeled-checkbox/test/fixtures/checked.js.map +1 -0
- package/es/molecule/input-text-with-titeled-checkbox/test/fixtures/unchecked.js +18 -0
- package/es/molecule/input-text-with-titeled-checkbox/test/fixtures/unchecked.js.map +1 -0
- package/es/molecule/input-text-with-titeled-checkbox/test/fixtures.js +15 -0
- package/es/molecule/input-text-with-titeled-checkbox/test/fixtures.js.map +1 -0
- package/es/molecule/review-header-steps/index.js +26 -0
- package/es/molecule/review-header-steps/index.js.map +1 -0
- package/es/molecule/review-header-steps/style.css +6 -0
- package/es/molecule/review-header-steps/test/fixtures/all-questions-ok.js +26 -0
- package/es/molecule/review-header-steps/test/fixtures/all-questions-ok.js.map +1 -0
- package/es/molecule/review-header-steps/test/fixtures/current-question-no-aswered.js +26 -0
- package/es/molecule/review-header-steps/test/fixtures/current-question-no-aswered.js.map +1 -0
- package/es/molecule/review-header-steps/test/fixtures/current-question-wrong.js +26 -0
- package/es/molecule/review-header-steps/test/fixtures/current-question-wrong.js.map +1 -0
- package/es/molecule/review-header-steps/test/fixtures/first-question-current-right.js +26 -0
- package/es/molecule/review-header-steps/test/fixtures/first-question-current-right.js.map +1 -0
- package/es/molecule/review-header-steps/test/fixtures/no-answered-question.js +26 -0
- package/es/molecule/review-header-steps/test/fixtures/no-answered-question.js.map +1 -0
- package/es/molecule/review-header-steps/test/fixtures/question-to-repeat.js +26 -0
- package/es/molecule/review-header-steps/test/fixtures/question-to-repeat.js.map +1 -0
- package/es/organism/wizard-contents/style.css +0 -1
- package/es/organism/wizard-contents/test/fixtures/playlist-organize-courses.js +1 -1
- package/es/organism/wizard-contents/test/fixtures/playlist-organize-courses.js.map +1 -1
- package/lib/{molecule → atom}/checkbox-with-title/index.js +0 -0
- package/lib/atom/checkbox-with-title/index.js.map +1 -0
- package/lib/{molecule → atom}/checkbox-with-title/style.css +0 -0
- package/lib/{molecule → atom}/checkbox-with-title/test/fixtures/checked.js +0 -0
- package/lib/atom/checkbox-with-title/test/fixtures/checked.js.map +1 -0
- package/lib/{molecule → atom}/checkbox-with-title/test/fixtures/unchecked.js +0 -0
- package/lib/atom/checkbox-with-title/test/fixtures/unchecked.js.map +1 -0
- package/lib/atom/checkbox-with-title/test/fixtures.js +25 -0
- package/lib/atom/checkbox-with-title/test/fixtures.js.map +1 -0
- package/lib/atom/input-text/index.js +9 -3
- package/lib/atom/input-text/index.js.map +1 -1
- package/lib/atom/input-text-with-title/index.js +46 -0
- package/lib/atom/input-text-with-title/index.js.map +1 -0
- package/lib/atom/input-text-with-title/style.css +24 -0
- package/lib/atom/input-text-with-title/test/fixtures/default.js +21 -0
- package/lib/atom/input-text-with-title/test/fixtures/default.js.map +1 -0
- package/lib/atom/input-text-with-title/test/fixtures/error.js +22 -0
- package/lib/atom/input-text-with-title/test/fixtures/error.js.map +1 -0
- package/lib/atom/input-text-with-title/test/fixtures.js +25 -0
- package/lib/atom/input-text-with-title/test/fixtures.js.map +1 -0
- package/lib/atom/review-header-step-item/index.js +67 -0
- package/lib/atom/review-header-step-item/index.js.map +1 -0
- package/lib/atom/review-header-step-item/style.css +71 -0
- package/lib/atom/review-header-step-item/test/fixtures/current.js +13 -0
- package/lib/atom/review-header-step-item/test/fixtures/current.js.map +1 -0
- package/lib/atom/review-header-step-item/test/fixtures/default.js +13 -0
- package/lib/atom/review-header-step-item/test/fixtures/default.js.map +1 -0
- package/lib/atom/review-header-step-item/test/fixtures/right.js +13 -0
- package/lib/atom/review-header-step-item/test/fixtures/right.js.map +1 -0
- package/lib/atom/review-header-step-item/test/fixtures/wrong.js +13 -0
- package/lib/atom/review-header-step-item/test/fixtures/wrong.js.map +1 -0
- package/lib/atom/select/style.css +1 -0
- package/lib/molecule/course-sections/index.js +17 -3
- package/lib/molecule/course-sections/index.js.map +1 -1
- package/lib/molecule/course-sections/style.css +4 -0
- package/lib/molecule/course-sections/test/fixtures/with-mandatory-courses-input.js +21 -0
- package/lib/molecule/course-sections/test/fixtures/with-mandatory-courses-input.js.map +1 -0
- package/lib/molecule/course-sections/test/fixtures.js +3 -0
- package/lib/molecule/course-sections/test/fixtures.js.map +1 -1
- package/lib/molecule/input-text-with-titeled-checkbox/index.js +75 -0
- package/lib/molecule/input-text-with-titeled-checkbox/index.js.map +1 -0
- package/lib/molecule/input-text-with-titeled-checkbox/style.css +3 -0
- package/lib/molecule/input-text-with-titeled-checkbox/test/fixtures/checked.js +21 -0
- package/lib/molecule/input-text-with-titeled-checkbox/test/fixtures/checked.js.map +1 -0
- package/lib/molecule/input-text-with-titeled-checkbox/test/fixtures/unchecked.js +23 -0
- package/lib/molecule/input-text-with-titeled-checkbox/test/fixtures/unchecked.js.map +1 -0
- package/lib/molecule/input-text-with-titeled-checkbox/test/fixtures.js +25 -0
- package/lib/molecule/input-text-with-titeled-checkbox/test/fixtures.js.map +1 -0
- package/lib/molecule/review-header-steps/index.js +38 -0
- package/lib/molecule/review-header-steps/index.js.map +1 -0
- package/lib/molecule/review-header-steps/style.css +6 -0
- package/lib/molecule/review-header-steps/test/fixtures/all-questions-ok.js +31 -0
- package/lib/molecule/review-header-steps/test/fixtures/all-questions-ok.js.map +1 -0
- package/lib/molecule/review-header-steps/test/fixtures/current-question-no-aswered.js +31 -0
- package/lib/molecule/review-header-steps/test/fixtures/current-question-no-aswered.js.map +1 -0
- package/lib/molecule/review-header-steps/test/fixtures/current-question-wrong.js +31 -0
- package/lib/molecule/review-header-steps/test/fixtures/current-question-wrong.js.map +1 -0
- package/lib/molecule/review-header-steps/test/fixtures/first-question-current-right.js +31 -0
- package/lib/molecule/review-header-steps/test/fixtures/first-question-current-right.js.map +1 -0
- package/lib/molecule/review-header-steps/test/fixtures/no-answered-question.js +31 -0
- package/lib/molecule/review-header-steps/test/fixtures/no-answered-question.js.map +1 -0
- package/lib/molecule/review-header-steps/test/fixtures/question-to-repeat.js +31 -0
- package/lib/molecule/review-header-steps/test/fixtures/question-to-repeat.js.map +1 -0
- package/lib/organism/wizard-contents/style.css +0 -1
- package/lib/organism/wizard-contents/test/fixtures/playlist-organize-courses.js +2 -2
- package/lib/organism/wizard-contents/test/fixtures/playlist-organize-courses.js.map +1 -1
- package/package.json +2 -2
- package/es/molecule/checkbox-with-title/index.js.map +0 -1
- package/es/molecule/checkbox-with-title/test/fixtures/checked.js.map +0 -1
- package/es/molecule/checkbox-with-title/test/fixtures/unchecked.js.map +0 -1
- package/es/molecule/cockpit-popin/test/fixtures.js +0 -17
- package/es/molecule/cockpit-popin/test/fixtures.js.map +0 -1
- package/lib/molecule/checkbox-with-title/index.js.map +0 -1
- package/lib/molecule/checkbox-with-title/test/fixtures/checked.js.map +0 -1
- package/lib/molecule/checkbox-with-title/test/fixtures/unchecked.js.map +0 -1
- package/lib/molecule/cockpit-popin/test/fixtures.js +0 -28
- package/lib/molecule/cockpit-popin/test/fixtures.js.map +0 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
@value colors: "../../variables/colors.css";
|
|
2
|
+
@value white from colors;
|
|
3
|
+
@value dark from colors;
|
|
4
|
+
@value cm_grey_200 from colors;
|
|
5
|
+
@value cm_grey_100 from colors;
|
|
6
|
+
@value black from colors;
|
|
7
|
+
@value cm_primary_blue from colors;
|
|
8
|
+
|
|
9
|
+
.container {
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.title {
|
|
15
|
+
padding-bottom: 8px;
|
|
16
|
+
font-family: "Gilroy";
|
|
17
|
+
font-weight: bold;
|
|
18
|
+
font-size: 16px;
|
|
19
|
+
font-style: normal;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.inputText {
|
|
23
|
+
width: 173px;
|
|
24
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
|
|
6
|
+
var _cmDefault = _interopRequireDefault(require("../../../input-text/test/fixtures/cm-default"));
|
|
7
|
+
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
+
|
|
10
|
+
function _extends() { _extends = Object.assign || 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); }
|
|
11
|
+
|
|
12
|
+
var _default = {
|
|
13
|
+
props: {
|
|
14
|
+
title: 'Mandatory courses to complete certification',
|
|
15
|
+
inputText: _extends(_extends({}, _cmDefault.default.props), {}, {
|
|
16
|
+
hint: ''
|
|
17
|
+
})
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
exports.default = _default;
|
|
21
|
+
//# sourceMappingURL=default.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/input-text-with-title/test/fixtures/default.js"],"names":["props","title","inputText","hint"],"mappings":";;;;;AAAA;;;;;;eAEe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,6CADF;AAELC,IAAAA,SAAS,wBAAMA,mBAAUF,KAAhB;AAAuBG,MAAAA,IAAI,EAAE;AAA7B;AAFJ;AADM,C","sourcesContent":["import inputText from '../../../input-text/test/fixtures/cm-default';\n\nexport default {\n props: {\n title: 'Mandatory courses to complete certification',\n inputText: {...inputText.props, hint: ''}\n }\n};\n"],"file":"default.js"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
|
|
6
|
+
var _cmDefault = _interopRequireDefault(require("../../../input-text/test/fixtures/cm-default"));
|
|
7
|
+
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
+
|
|
10
|
+
function _extends() { _extends = Object.assign || 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); }
|
|
11
|
+
|
|
12
|
+
var _default = {
|
|
13
|
+
props: {
|
|
14
|
+
title: 'Mandatory courses to complete certification',
|
|
15
|
+
inputText: _extends(_extends({}, _cmDefault.default.props), {}, {
|
|
16
|
+
error: 'this is error',
|
|
17
|
+
hint: ''
|
|
18
|
+
})
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
exports.default = _default;
|
|
22
|
+
//# sourceMappingURL=error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/input-text-with-title/test/fixtures/error.js"],"names":["props","title","inputText","error","hint"],"mappings":";;;;;AAAA;;;;;;eAEe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,6CADF;AAELC,IAAAA,SAAS,wBAAMA,mBAAUF,KAAhB;AAAuBG,MAAAA,KAAK,EAAE,eAA9B;AAA+CC,MAAAA,IAAI,EAAE;AAArD;AAFJ;AADM,C","sourcesContent":["import inputText from '../../../input-text/test/fixtures/cm-default';\n\nexport default {\n props: {\n title: 'Mandatory courses to complete certification',\n inputText: {...inputText.props, error: 'this is error', hint: ''}\n }\n};\n"],"file":"error.js"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _ava = _interopRequireDefault(require("ava"));
|
|
4
|
+
|
|
5
|
+
var _forEach = _interopRequireDefault(require("lodash/forEach"));
|
|
6
|
+
|
|
7
|
+
var _renderComponent = _interopRequireDefault(require("../../../test/helpers/render-component"));
|
|
8
|
+
|
|
9
|
+
var _ = _interopRequireDefault(require(".."));
|
|
10
|
+
|
|
11
|
+
var _default = _interopRequireDefault(require("./fixtures/default"));
|
|
12
|
+
|
|
13
|
+
var _error = _interopRequireDefault(require("./fixtures/error"));
|
|
14
|
+
|
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
+
|
|
17
|
+
(0, _ava.default)('Atom › AtomInputTextWithTitle > should have valid propTypes', t => {
|
|
18
|
+
t.pass();
|
|
19
|
+
(0, _forEach.default)(_.default.propTypes, (value, key) => {
|
|
20
|
+
t.not(value, undefined, `PropType for "Atom.AtomInputTextWithTitle.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
(0, _ava.default)('Atom › AtomInputTextWithTitle › Default › should be rendered', _renderComponent.default, _.default, _default.default);
|
|
24
|
+
(0, _ava.default)('Atom › AtomInputTextWithTitle › Error › should be rendered', _renderComponent.default, _.default, _error.default);
|
|
25
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/atom/input-text-with-title/test/fixtures.js"],"names":["t","pass","AtomInputTextWithTitle","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureError"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,6DAAL,EAAoEA,CAAC,IAAI;AACvEA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAuBC,SAA/B,EAA0C,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACxDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,uDAAsDF,GAAI,mEAAnF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,8DAAL,EAAqEG,wBAArE,EAA2FN,SAA3F,EAAmHO,gBAAnH;AACA,kBAAK,4DAAL,EAAmED,wBAAnE,EAAyFN,SAAzF,EAAiHQ,cAAjH","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomInputTextWithTitle from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureError from './fixtures/error';\n\ntest('Atom › AtomInputTextWithTitle > should have valid propTypes', t => {\n t.pass();\n forEach(AtomInputTextWithTitle.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomInputTextWithTitle.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomInputTextWithTitle › Default › should be rendered', renderComponentMacro, AtomInputTextWithTitle, fixtureDefault);\ntest('Atom › AtomInputTextWithTitle › Error › should be rendered', renderComponentMacro, AtomInputTextWithTitle, fixtureError);\n"],"file":"fixtures.js"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
|
|
6
|
+
var _react = _interopRequireDefault(require("react"));
|
|
7
|
+
|
|
8
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
|
+
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
|
|
12
|
+
var _novaIcons = require("@coorpacademy/nova-icons");
|
|
13
|
+
|
|
14
|
+
var _style = _interopRequireDefault(require("./style.css"));
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
const Content = ({
|
|
19
|
+
icon,
|
|
20
|
+
current,
|
|
21
|
+
value
|
|
22
|
+
}) => {
|
|
23
|
+
if (!icon) {
|
|
24
|
+
return /*#__PURE__*/_react.default.createElement("span", {
|
|
25
|
+
className: _style.default.value,
|
|
26
|
+
"aria-label": `step ${value}`
|
|
27
|
+
}, value);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
if (icon === 'right') {
|
|
31
|
+
return /*#__PURE__*/_react.default.createElement("span", {
|
|
32
|
+
className: _style.default.value,
|
|
33
|
+
"aria-label": `step ${value}`
|
|
34
|
+
}, /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionCoorpacademyCheck, {
|
|
35
|
+
className: current ? _style.default.currentRightIcon : _style.default.rightIcon
|
|
36
|
+
}));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if (icon === 'wrong') {
|
|
40
|
+
return /*#__PURE__*/_react.default.createElement("span", {
|
|
41
|
+
className: _style.default.value,
|
|
42
|
+
"aria-label": `step ${value}`
|
|
43
|
+
}, /*#__PURE__*/_react.default.createElement(_novaIcons.NovaSolidStatusClose, {
|
|
44
|
+
className: current ? _style.default.currentWrongIcon : _style.default.wrongIcon
|
|
45
|
+
}));
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const ReviewHeaderStepItem = props => {
|
|
50
|
+
const {
|
|
51
|
+
icon,
|
|
52
|
+
current
|
|
53
|
+
} = props;
|
|
54
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
55
|
+
className: (0, _classnames.default)(icon === 'right' ? _style.default.right : null, icon === 'wrong' ? _style.default.wrong : null, current ? _style.default.current : _style.default.default),
|
|
56
|
+
"data-name": "header-step-item"
|
|
57
|
+
}, /*#__PURE__*/_react.default.createElement(Content, props));
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
ReviewHeaderStepItem.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
61
|
+
icon: _propTypes.default.string,
|
|
62
|
+
current: _propTypes.default.bool,
|
|
63
|
+
value: _propTypes.default.string
|
|
64
|
+
} : {};
|
|
65
|
+
var _default = ReviewHeaderStepItem;
|
|
66
|
+
exports.default = _default;
|
|
67
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/atom/review-header-step-item/index.js"],"names":["Content","icon","current","value","style","currentRightIcon","rightIcon","currentWrongIcon","wrongIcon","ReviewHeaderStepItem","props","right","wrong","default","propTypes","PropTypes","string","bool"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AAIA;;;;AAEA,MAAMA,OAAO,GAAG,CAAC;AAACC,EAAAA,IAAD;AAAOC,EAAAA,OAAP;AAAgBC,EAAAA;AAAhB,CAAD,KAA4B;AAC1C,MAAI,CAACF,IAAL,EAAW;AACT,wBACE;AAAM,MAAA,SAAS,EAAEG,eAAMD,KAAvB;AAA8B,oBAAa,QAAOA,KAAM;AAAxD,OACGA,KADH,CADF;AAKD;;AAED,MAAIF,IAAI,KAAK,OAAb,EAAsB;AACpB,wBACE;AAAM,MAAA,SAAS,EAAEG,eAAMD,KAAvB;AAA8B,oBAAa,QAAOA,KAAM;AAAxD,oBACE,6BAAC,2CAAD;AAAW,MAAA,SAAS,EAAED,OAAO,GAAGE,eAAMC,gBAAT,GAA4BD,eAAME;AAA/D,MADF,CADF;AAKD;;AAED,MAAIL,IAAI,KAAK,OAAb,EAAsB;AACpB,wBACE;AAAM,MAAA,SAAS,EAAEG,eAAMD,KAAvB;AAA8B,oBAAa,QAAOA,KAAM;AAAxD,oBACE,6BAAC,+BAAD;AAAW,MAAA,SAAS,EAAED,OAAO,GAAGE,eAAMG,gBAAT,GAA4BH,eAAMI;AAA/D,MADF,CADF;AAKD;AACF,CAxBD;;AA0BA,MAAMC,oBAAoB,GAAGC,KAAK,IAAI;AACpC,QAAM;AAACT,IAAAA,IAAD;AAAOC,IAAAA;AAAP,MAAkBQ,KAAxB;AACA,sBACE;AACE,IAAA,SAAS,EAAE,yBACTT,IAAI,KAAK,OAAT,GAAmBG,eAAMO,KAAzB,GAAiC,IADxB,EAETV,IAAI,KAAK,OAAT,GAAmBG,eAAMQ,KAAzB,GAAiC,IAFxB,EAGTV,OAAO,GAAGE,eAAMF,OAAT,GAAmBE,eAAMS,OAHvB,CADb;AAME,iBAAU;AANZ,kBAQE,6BAAC,OAAD,EAAaH,KAAb,CARF,CADF;AAYD,CAdD;;AAgBAD,oBAAoB,CAACK,SAArB,2CAAiC;AAC/Bb,EAAAA,IAAI,EAAEc,mBAAUC,MADe;AAE/Bd,EAAAA,OAAO,EAAEa,mBAAUE,IAFY;AAG/Bd,EAAAA,KAAK,EAAEY,mBAAUC;AAHc,CAAjC;eAMeP,oB","sourcesContent":["import React from 'react';\nimport classnames from 'classnames';\nimport PropTypes from 'prop-types';\nimport {\n NovaCompositionCoorpacademyCheck as RightIcon,\n NovaSolidStatusClose as WrongIcon\n} from '@coorpacademy/nova-icons';\nimport style from './style.css';\n\nconst Content = ({icon, current, value}) => {\n if (!icon) {\n return (\n <span className={style.value} aria-label={`step ${value}`}>\n {value}\n </span>\n );\n }\n\n if (icon === 'right') {\n return (\n <span className={style.value} aria-label={`step ${value}`}>\n <RightIcon className={current ? style.currentRightIcon : style.rightIcon} />\n </span>\n );\n }\n\n if (icon === 'wrong') {\n return (\n <span className={style.value} aria-label={`step ${value}`}>\n <WrongIcon className={current ? style.currentWrongIcon : style.wrongIcon} />\n </span>\n );\n }\n};\n\nconst ReviewHeaderStepItem = props => {\n const {icon, current} = props;\n return (\n <div\n className={classnames(\n icon === 'right' ? style.right : null,\n icon === 'wrong' ? style.wrong : null,\n current ? style.current : style.default\n )}\n data-name=\"header-step-item\"\n >\n <Content {...props} />\n </div>\n );\n};\n\nReviewHeaderStepItem.propTypes = {\n icon: PropTypes.string,\n current: PropTypes.bool,\n value: PropTypes.string\n};\n\nexport default ReviewHeaderStepItem;\n"],"file":"index.js"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
@value colors: "../../variables/colors.css";
|
|
2
|
+
@value cm_grey_100 from colors;
|
|
3
|
+
@value cm_positive_100 from colors;
|
|
4
|
+
@value cm_negative_100 from colors;
|
|
5
|
+
@value white from colors;
|
|
6
|
+
|
|
7
|
+
.default {
|
|
8
|
+
width: 32px;
|
|
9
|
+
height: 32px;
|
|
10
|
+
opacity: 0.5;
|
|
11
|
+
border-radius: 50%;
|
|
12
|
+
background-color: cm_grey_100;
|
|
13
|
+
font-weight: 600;
|
|
14
|
+
font-size: 12px;
|
|
15
|
+
line-height: 16px;
|
|
16
|
+
font-family: Gilroy;
|
|
17
|
+
display: flex;
|
|
18
|
+
justify-content: center;
|
|
19
|
+
align-items: center;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.current {
|
|
23
|
+
composes: default;
|
|
24
|
+
width: 40px;
|
|
25
|
+
height: 40px;
|
|
26
|
+
opacity: 1;
|
|
27
|
+
font-size: 16px;
|
|
28
|
+
line-height: 22px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.right {
|
|
32
|
+
background-color: cm_positive_100;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.wrong {
|
|
36
|
+
background-color: cm_negative_100;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.value {
|
|
40
|
+
display: block;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.rightIcon {
|
|
44
|
+
color: white;
|
|
45
|
+
width: 12px;
|
|
46
|
+
height: 10px;
|
|
47
|
+
margin: 2px 0px 0px 1px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.currentRightIcon {
|
|
51
|
+
composes: rightIcon;
|
|
52
|
+
width: 16px;
|
|
53
|
+
height: 14px;
|
|
54
|
+
margin: 3px 0px 0px 1px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.wrongIcon {
|
|
58
|
+
color: white;
|
|
59
|
+
width: 10px;
|
|
60
|
+
height: 10px;
|
|
61
|
+
margin-top: 3px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.currentWrongIcon {
|
|
65
|
+
composes: wrongIcon;
|
|
66
|
+
width: 15px;
|
|
67
|
+
height: 15px;
|
|
68
|
+
margin-top: 5px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/review-header-step-item/test/fixtures/current.js"],"names":["props","icon","current","value"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,IAAI,EAAE,IADD;AAELC,IAAAA,OAAO,EAAE,IAFJ;AAGLC,IAAAA,KAAK,EAAE;AAHF;AADM,C","sourcesContent":["export default {\n props: {\n icon: null,\n current: true,\n value: '2'\n }\n};\n"],"file":"current.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/review-header-step-item/test/fixtures/default.js"],"names":["props","icon","current","value"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,IAAI,EAAE,IADD;AAELC,IAAAA,OAAO,EAAE,KAFJ;AAGLC,IAAAA,KAAK,EAAE;AAHF;AADM,C","sourcesContent":["export default {\n props: {\n icon: null,\n current: false,\n value: '2'\n }\n};\n"],"file":"default.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/review-header-step-item/test/fixtures/right.js"],"names":["props","icon","current","value"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,IAAI,EAAE,OADD;AAELC,IAAAA,OAAO,EAAE,KAFJ;AAGLC,IAAAA,KAAK,EAAE;AAHF;AADM,C","sourcesContent":["export default {\n props: {\n icon: 'right',\n current: false,\n value: '2'\n }\n};\n"],"file":"right.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/review-header-step-item/test/fixtures/wrong.js"],"names":["props","icon","current","value"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,IAAI,EAAE,OADD;AAELC,IAAAA,OAAO,EAAE,KAFJ;AAGLC,IAAAA,KAAK,EAAE;AAHF;AADM,C","sourcesContent":["export default {\n props: {\n icon: 'wrong',\n current: false,\n value: '2'\n }\n};\n"],"file":"wrong.js"}
|
|
@@ -7,6 +7,8 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
7
7
|
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
9
|
|
|
10
|
+
var _inputTextWithTitle = _interopRequireDefault(require("../../atom/input-text-with-title"));
|
|
11
|
+
|
|
10
12
|
var _courseSection = _interopRequireDefault(require("../course-section"));
|
|
11
13
|
|
|
12
14
|
var _draggableList = _interopRequireDefault(require("../draggable-list"));
|
|
@@ -27,10 +29,20 @@ const CourseSections = ({
|
|
|
27
29
|
sections,
|
|
28
30
|
onDrop,
|
|
29
31
|
isLoading,
|
|
30
|
-
title
|
|
32
|
+
title,
|
|
33
|
+
mandatoryCoursesInput,
|
|
34
|
+
inputTitle
|
|
31
35
|
}) => {
|
|
32
36
|
if (isLoading) return /*#__PURE__*/_react.default.createElement(Loading, null);
|
|
33
|
-
return /*#__PURE__*/_react.default.createElement("div", null,
|
|
37
|
+
return /*#__PURE__*/_react.default.createElement("div", null, inputTitle ? /*#__PURE__*/_react.default.createElement("div", {
|
|
38
|
+
className: _style.default.title
|
|
39
|
+
}, /*#__PURE__*/_react.default.createElement(_title.default, {
|
|
40
|
+
title: inputTitle,
|
|
41
|
+
type: 'form-group',
|
|
42
|
+
"data-name": 'mandatory-courses-input-title'
|
|
43
|
+
})) : null, mandatoryCoursesInput ? /*#__PURE__*/_react.default.createElement("div", {
|
|
44
|
+
className: _style.default.mandatoryCoursesInput
|
|
45
|
+
}, /*#__PURE__*/_react.default.createElement(_inputTextWithTitle.default, mandatoryCoursesInput)) : null, title ? /*#__PURE__*/_react.default.createElement("div", {
|
|
34
46
|
className: _style.default.title
|
|
35
47
|
}, /*#__PURE__*/_react.default.createElement(_title.default, {
|
|
36
48
|
title: title,
|
|
@@ -44,10 +56,12 @@ const CourseSections = ({
|
|
|
44
56
|
};
|
|
45
57
|
|
|
46
58
|
CourseSections.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
59
|
+
inputTitle: _propTypes.default.string,
|
|
47
60
|
title: _propTypes.default.string,
|
|
48
61
|
sections: _propTypes.default.arrayOf(_propTypes.default.shape(_courseSection.default.propTypes)),
|
|
49
62
|
onDrop: _propTypes.default.func,
|
|
50
|
-
isLoading: _propTypes.default.bool
|
|
63
|
+
isLoading: _propTypes.default.bool,
|
|
64
|
+
mandatoryCoursesInput: _propTypes.default.shape(_inputTextWithTitle.default.propTypes)
|
|
51
65
|
} : {};
|
|
52
66
|
var _default = CourseSections;
|
|
53
67
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/molecule/course-sections/index.js"],"names":["Loading","CourseSections","sections","onDrop","isLoading","title","style","propTypes","PropTypes","string","arrayOf","shape","CourseSection","func","bool"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,MAAMA,OAAO,GAAG,mBACd,uDACE,6BAAC,eAAD;AAAQ,EAAA,KAAK,EAAC;AAAd,EADF,CADF;;AAMA,MAAMC,cAAc,GAAG,CAAC;
|
|
1
|
+
{"version":3,"sources":["../../../src/molecule/course-sections/index.js"],"names":["Loading","CourseSections","sections","onDrop","isLoading","title","mandatoryCoursesInput","inputTitle","style","propTypes","PropTypes","string","arrayOf","shape","CourseSection","func","bool","InputTextWithTitle"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,MAAMA,OAAO,GAAG,mBACd,uDACE,6BAAC,eAAD;AAAQ,EAAA,KAAK,EAAC;AAAd,EADF,CADF;;AAMA,MAAMC,cAAc,GAAG,CAAC;AACtBC,EAAAA,QADsB;AAEtBC,EAAAA,MAFsB;AAGtBC,EAAAA,SAHsB;AAItBC,EAAAA,KAJsB;AAKtBC,EAAAA,qBALsB;AAMtBC,EAAAA;AANsB,CAAD,KAOjB;AACJ,MAAIH,SAAJ,EAAe,oBAAO,6BAAC,OAAD,OAAP;AAEf,sBACE,0CACGG,UAAU,gBACT;AAAK,IAAA,SAAS,EAAEC,eAAMH;AAAtB,kBACE,6BAAC,cAAD;AACE,IAAA,KAAK,EAAEE,UADT;AAEE,IAAA,IAAI,EAAE,YAFR;AAGE,iBAAW;AAHb,IADF,CADS,GAQP,IATN,EAUGD,qBAAqB,gBACpB;AAAK,IAAA,SAAS,EAAEE,eAAMF;AAAtB,kBACE,6BAAC,2BAAD,EAAwBA,qBAAxB,CADF,CADoB,GAIlB,IAdN,EAeGD,KAAK,gBACJ;AAAK,IAAA,SAAS,EAAEG,eAAMH;AAAtB,kBACE,6BAAC,cAAD;AAAO,IAAA,KAAK,EAAEA,KAAd;AAAqB,IAAA,IAAI,EAAE,YAA3B;AAAyC,iBAAW;AAApD,IADF,CADI,GAIF,IAnBN,eAoBE,6BAAC,sBAAD;AAAe,IAAA,QAAQ,EAAC,gBAAxB;AAAyC,IAAA,KAAK,EAAEH,QAAhD;AAA0D,IAAA,MAAM,EAAEC;AAAlE,IApBF,CADF;AAwBD,CAlCD;;AAoCAF,cAAc,CAACQ,SAAf,2CAA2B;AACzBF,EAAAA,UAAU,EAAEG,mBAAUC,MADG;AAEzBN,EAAAA,KAAK,EAAEK,mBAAUC,MAFQ;AAGzBT,EAAAA,QAAQ,EAAEQ,mBAAUE,OAAV,CAAkBF,mBAAUG,KAAV,CAAgBC,uBAAcL,SAA9B,CAAlB,CAHe;AAIzBN,EAAAA,MAAM,EAAEO,mBAAUK,IAJO;AAKzBX,EAAAA,SAAS,EAAEM,mBAAUM,IALI;AAMzBV,EAAAA,qBAAqB,EAAEI,mBAAUG,KAAV,CAAgBI,4BAAmBR,SAAnC;AANE,CAA3B;eASeR,c","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport InputTextWithTitle from '../../atom/input-text-with-title';\nimport CourseSection from '../course-section';\nimport DraggableList from '../draggable-list';\nimport Loader from '../../atom/loader';\nimport Title from '../../atom/title';\nimport style from './style.css';\n\nconst Loading = () => (\n <div>\n <Loader theme=\"coorpmanager\" />\n </div>\n);\n\nconst CourseSections = ({\n sections,\n onDrop,\n isLoading,\n title,\n mandatoryCoursesInput,\n inputTitle\n}) => {\n if (isLoading) return <Loading />;\n\n return (\n <div>\n {inputTitle ? (\n <div className={style.title}>\n <Title\n title={inputTitle}\n type={'form-group'}\n data-name={'mandatory-courses-input-title'}\n />\n </div>\n ) : null}\n {mandatoryCoursesInput ? (\n <div className={style.mandatoryCoursesInput}>\n <InputTextWithTitle {...mandatoryCoursesInput} />\n </div>\n ) : null}\n {title ? (\n <div className={style.title}>\n <Title title={title} type={'form-group'} data-name={'course-sections-title'} />\n </div>\n ) : null}\n <DraggableList itemType=\"course-section\" items={sections} onDrop={onDrop} />\n </div>\n );\n};\n\nCourseSections.propTypes = {\n inputTitle: PropTypes.string,\n title: PropTypes.string,\n sections: PropTypes.arrayOf(PropTypes.shape(CourseSection.propTypes)),\n onDrop: PropTypes.func,\n isLoading: PropTypes.bool,\n mandatoryCoursesInput: PropTypes.shape(InputTextWithTitle.propTypes)\n};\n\nexport default CourseSections;\n"],"file":"index.js"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
|
|
6
|
+
var _error = _interopRequireDefault(require("../../../../atom/input-text-with-title/test/fixtures/error"));
|
|
7
|
+
|
|
8
|
+
var _default2 = _interopRequireDefault(require("./default"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
function _extends() { _extends = Object.assign || 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); }
|
|
13
|
+
|
|
14
|
+
var _default = {
|
|
15
|
+
props: _extends(_extends({}, _default2.default.props), {}, {
|
|
16
|
+
mandatoryCoursesInput: _error.default.props,
|
|
17
|
+
inputTitle: 'Minimun courses completion'
|
|
18
|
+
})
|
|
19
|
+
};
|
|
20
|
+
exports.default = _default;
|
|
21
|
+
//# sourceMappingURL=with-mandatory-courses-input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/course-sections/test/fixtures/with-mandatory-courses-input.js"],"names":["props","mandatoryCoursesInput","inputTitle"],"mappings":";;;;;AAAA;;AACA;;;;;;eAEe;AACbA,EAAAA,KAAK,wBACAA,kBAAMA,KADN;AAEHC,IAAAA,qBAAqB,EAAEA,eAAsBD,KAF1C;AAGHE,IAAAA,UAAU,EAAE;AAHT;AADQ,C","sourcesContent":["import mandatoryCoursesInput from '../../../../atom/input-text-with-title/test/fixtures/error';\nimport props from './default';\n\nexport default {\n props: {\n ...props.props,\n mandatoryCoursesInput: mandatoryCoursesInput.props,\n inputTitle: 'Minimun courses completion'\n }\n};\n"],"file":"with-mandatory-courses-input.js"}
|
|
@@ -12,6 +12,8 @@ var _default = _interopRequireDefault(require("./fixtures/default"));
|
|
|
12
12
|
|
|
13
13
|
var _loading = _interopRequireDefault(require("./fixtures/loading"));
|
|
14
14
|
|
|
15
|
+
var _withMandatoryCoursesInput = _interopRequireDefault(require("./fixtures/with-mandatory-courses-input"));
|
|
16
|
+
|
|
15
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
18
|
|
|
17
19
|
(0, _ava.default)('Molecule › MoleculeCourseSections > should have valid propTypes', t => {
|
|
@@ -22,4 +24,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
22
24
|
});
|
|
23
25
|
(0, _ava.default)('Molecule › MoleculeCourseSections › Default › should be rendered', _renderComponent.default, _.default, _default.default);
|
|
24
26
|
(0, _ava.default)('Molecule › MoleculeCourseSections › Loading › should be rendered', _renderComponent.default, _.default, _loading.default);
|
|
27
|
+
(0, _ava.default)('Molecule › MoleculeCourseSections › WithMandatoryCoursesInput › should be rendered', _renderComponent.default, _.default, _withMandatoryCoursesInput.default);
|
|
25
28
|
//# sourceMappingURL=fixtures.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/molecule/course-sections/test/fixtures.js"],"names":["t","pass","MoleculeCourseSections","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureLoading"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,iEAAL,EAAwEA,CAAC,IAAI;AAC3EA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAuBC,SAA/B,EAA0C,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACxDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,2DAA0DF,GAAI,mEAAvF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,kEAAL,EAAyEG,wBAAzE,EAA+FN,SAA/F,EAAuHO,gBAAvH;AACA,kBAAK,kEAAL,EAAyED,wBAAzE,EAA+FN,SAA/F,EAAuHQ,gBAAvH","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeCourseSections from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureLoading from './fixtures/loading';\n\ntest('Molecule › MoleculeCourseSections > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeCourseSections.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeCourseSections.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeCourseSections › Default › should be rendered', renderComponentMacro, MoleculeCourseSections, fixtureDefault);\ntest('Molecule › MoleculeCourseSections › Loading › should be rendered', renderComponentMacro, MoleculeCourseSections, fixtureLoading);\n"],"file":"fixtures.js"}
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/course-sections/test/fixtures.js"],"names":["t","pass","MoleculeCourseSections","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureLoading","fixtureWithMandatoryCoursesInput"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,iEAAL,EAAwEA,CAAC,IAAI;AAC3EA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAuBC,SAA/B,EAA0C,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACxDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,2DAA0DF,GAAI,mEAAvF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,kEAAL,EAAyEG,wBAAzE,EAA+FN,SAA/F,EAAuHO,gBAAvH;AACA,kBAAK,kEAAL,EAAyED,wBAAzE,EAA+FN,SAA/F,EAAuHQ,gBAAvH;AACA,kBAAK,oFAAL,EAA2FF,wBAA3F,EAAiHN,SAAjH,EAAyIS,kCAAzI","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeCourseSections from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureLoading from './fixtures/loading';\nimport fixtureWithMandatoryCoursesInput from './fixtures/with-mandatory-courses-input';\n\ntest('Molecule › MoleculeCourseSections > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeCourseSections.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeCourseSections.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeCourseSections › Default › should be rendered', renderComponentMacro, MoleculeCourseSections, fixtureDefault);\ntest('Molecule › MoleculeCourseSections › Loading › should be rendered', renderComponentMacro, MoleculeCourseSections, fixtureLoading);\ntest('Molecule › MoleculeCourseSections › WithMandatoryCoursesInput › should be rendered', renderComponentMacro, MoleculeCourseSections, fixtureWithMandatoryCoursesInput);\n"],"file":"fixtures.js"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
|
|
6
|
+
var _react = _interopRequireDefault(require("react"));
|
|
7
|
+
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
|
|
10
|
+
var _inputText = _interopRequireDefault(require("../../atom/input-text"));
|
|
11
|
+
|
|
12
|
+
var _checkboxWithTitle = _interopRequireDefault(require("../../atom/checkbox-with-title"));
|
|
13
|
+
|
|
14
|
+
var _style = _interopRequireDefault(require("./style.css"));
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
const InputTextWithTiteledCheckbox = props => {
|
|
19
|
+
const {
|
|
20
|
+
title,
|
|
21
|
+
name,
|
|
22
|
+
checked,
|
|
23
|
+
checkBoxOnChange,
|
|
24
|
+
'aria-label': ariaLabel,
|
|
25
|
+
inputTextTitle,
|
|
26
|
+
inputTextValue,
|
|
27
|
+
inputTextPlaceholder,
|
|
28
|
+
inputTextDescription,
|
|
29
|
+
inputTextDisabled,
|
|
30
|
+
inputTextModified,
|
|
31
|
+
inputTextOnChange
|
|
32
|
+
} = props;
|
|
33
|
+
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_checkboxWithTitle.default, {
|
|
34
|
+
title: title,
|
|
35
|
+
name: name,
|
|
36
|
+
checked: checked,
|
|
37
|
+
onChange: checkBoxOnChange,
|
|
38
|
+
"data-name": "check-box",
|
|
39
|
+
"aria-label": ariaLabel.checkbox
|
|
40
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
41
|
+
className: _style.default.inputText
|
|
42
|
+
}, /*#__PURE__*/_react.default.createElement(_inputText.default, {
|
|
43
|
+
title: inputTextTitle,
|
|
44
|
+
value: inputTextValue,
|
|
45
|
+
placeholder: inputTextPlaceholder,
|
|
46
|
+
theme: "coorpmanager",
|
|
47
|
+
description: inputTextDescription,
|
|
48
|
+
disabled: inputTextDisabled,
|
|
49
|
+
modified: inputTextModified,
|
|
50
|
+
onChange: inputTextOnChange,
|
|
51
|
+
"data-name": "input-text",
|
|
52
|
+
"aria-label": ariaLabel.input
|
|
53
|
+
})));
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
InputTextWithTiteledCheckbox.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
57
|
+
title: _propTypes.default.string,
|
|
58
|
+
name: _propTypes.default.string,
|
|
59
|
+
checked: _propTypes.default.bool,
|
|
60
|
+
checkBoxOnChange: _propTypes.default.func,
|
|
61
|
+
'aria-label': _propTypes.default.shape({
|
|
62
|
+
input: _propTypes.default.string,
|
|
63
|
+
checkbox: _propTypes.default.string
|
|
64
|
+
}),
|
|
65
|
+
inputTextTitle: _propTypes.default.string,
|
|
66
|
+
inputTextValue: _propTypes.default.string,
|
|
67
|
+
inputTextPlaceholder: _propTypes.default.string,
|
|
68
|
+
inputTextDescription: _propTypes.default.string,
|
|
69
|
+
inputTextDisabled: _propTypes.default.bool,
|
|
70
|
+
inputTextModified: _propTypes.default.bool,
|
|
71
|
+
inputTextOnChange: _propTypes.default.func
|
|
72
|
+
} : {};
|
|
73
|
+
var _default = InputTextWithTiteledCheckbox;
|
|
74
|
+
exports.default = _default;
|
|
75
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/molecule/input-text-with-titeled-checkbox/index.js"],"names":["InputTextWithTiteledCheckbox","props","title","name","checked","checkBoxOnChange","ariaLabel","inputTextTitle","inputTextValue","inputTextPlaceholder","inputTextDescription","inputTextDisabled","inputTextModified","inputTextOnChange","checkbox","style","inputText","input","propTypes","PropTypes","string","bool","func","shape"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,MAAMA,4BAA4B,GAAGC,KAAK,IAAI;AAC5C,QAAM;AACJC,IAAAA,KADI;AAEJC,IAAAA,IAFI;AAGJC,IAAAA,OAHI;AAIJC,IAAAA,gBAJI;AAKJ,kBAAcC,SALV;AAMJC,IAAAA,cANI;AAOJC,IAAAA,cAPI;AAQJC,IAAAA,oBARI;AASJC,IAAAA,oBATI;AAUJC,IAAAA,iBAVI;AAWJC,IAAAA,iBAXI;AAYJC,IAAAA;AAZI,MAaFZ,KAbJ;AAeA,sBACE,uDACE,6BAAC,0BAAD;AACE,IAAA,KAAK,EAAEC,KADT;AAEE,IAAA,IAAI,EAAEC,IAFR;AAGE,IAAA,OAAO,EAAEC,OAHX;AAIE,IAAA,QAAQ,EAAEC,gBAJZ;AAKE,iBAAU,WALZ;AAME,kBAAYC,SAAS,CAACQ;AANxB,IADF,eASE;AAAK,IAAA,SAAS,EAAEC,eAAMC;AAAtB,kBACE,6BAAC,kBAAD;AACE,IAAA,KAAK,EAAET,cADT;AAEE,IAAA,KAAK,EAAEC,cAFT;AAGE,IAAA,WAAW,EAAEC,oBAHf;AAIE,IAAA,KAAK,EAAC,cAJR;AAKE,IAAA,WAAW,EAAEC,oBALf;AAME,IAAA,QAAQ,EAAEC,iBANZ;AAOE,IAAA,QAAQ,EAAEC,iBAPZ;AAQE,IAAA,QAAQ,EAAEC,iBARZ;AASE,iBAAU,YATZ;AAUE,kBAAYP,SAAS,CAACW;AAVxB,IADF,CATF,CADF;AA0BD,CA1CD;;AA4CAjB,4BAA4B,CAACkB,SAA7B,2CAAyC;AACvChB,EAAAA,KAAK,EAAEiB,mBAAUC,MADsB;AAEvCjB,EAAAA,IAAI,EAAEgB,mBAAUC,MAFuB;AAGvChB,EAAAA,OAAO,EAAEe,mBAAUE,IAHoB;AAIvChB,EAAAA,gBAAgB,EAAEc,mBAAUG,IAJW;AAKvC,gBAAcH,mBAAUI,KAAV,CAAgB;AAC5BN,IAAAA,KAAK,EAAEE,mBAAUC,MADW;AAE5BN,IAAAA,QAAQ,EAAEK,mBAAUC;AAFQ,GAAhB,CALyB;AASvCb,EAAAA,cAAc,EAAEY,mBAAUC,MATa;AAUvCZ,EAAAA,cAAc,EAAEW,mBAAUC,MAVa;AAWvCX,EAAAA,oBAAoB,EAAEU,mBAAUC,MAXO;AAYvCV,EAAAA,oBAAoB,EAAES,mBAAUC,MAZO;AAavCT,EAAAA,iBAAiB,EAAEQ,mBAAUE,IAbU;AAcvCT,EAAAA,iBAAiB,EAAEO,mBAAUE,IAdU;AAevCR,EAAAA,iBAAiB,EAAEM,mBAAUG;AAfU,CAAzC;eAiBetB,4B","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport InputText from '../../atom/input-text';\nimport CheckboxWithTitle from '../../atom/checkbox-with-title';\nimport style from './style.css';\n\nconst InputTextWithTiteledCheckbox = props => {\n const {\n title,\n name,\n checked,\n checkBoxOnChange,\n 'aria-label': ariaLabel,\n inputTextTitle,\n inputTextValue,\n inputTextPlaceholder,\n inputTextDescription,\n inputTextDisabled,\n inputTextModified,\n inputTextOnChange\n } = props;\n\n return (\n <div>\n <CheckboxWithTitle\n title={title}\n name={name}\n checked={checked}\n onChange={checkBoxOnChange}\n data-name=\"check-box\"\n aria-label={ariaLabel.checkbox}\n />\n <div className={style.inputText}>\n <InputText\n title={inputTextTitle}\n value={inputTextValue}\n placeholder={inputTextPlaceholder}\n theme=\"coorpmanager\"\n description={inputTextDescription}\n disabled={inputTextDisabled}\n modified={inputTextModified}\n onChange={inputTextOnChange}\n data-name=\"input-text\"\n aria-label={ariaLabel.input}\n />\n </div>\n </div>\n );\n};\n\nInputTextWithTiteledCheckbox.propTypes = {\n title: PropTypes.string,\n name: PropTypes.string,\n checked: PropTypes.bool,\n checkBoxOnChange: PropTypes.func,\n 'aria-label': PropTypes.shape({\n input: PropTypes.string,\n checkbox: PropTypes.string\n }),\n inputTextTitle: PropTypes.string,\n inputTextValue: PropTypes.string,\n inputTextPlaceholder: PropTypes.string,\n inputTextDescription: PropTypes.string,\n inputTextDisabled: PropTypes.bool,\n inputTextModified: PropTypes.bool,\n inputTextOnChange: PropTypes.func\n};\nexport default InputTextWithTiteledCheckbox;\n"],"file":"index.js"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
var _default = {
|
|
6
|
+
props: {
|
|
7
|
+
title: 'Add stars',
|
|
8
|
+
checked: true,
|
|
9
|
+
checkBoxOnChange: value => console.log(value),
|
|
10
|
+
inputTextTitle: 'Stars amount',
|
|
11
|
+
inputTextValue: '250',
|
|
12
|
+
inputTextDescription: 'This is the tooltip text',
|
|
13
|
+
inputTextOnChange: value => console.log(value),
|
|
14
|
+
'aria-label': {
|
|
15
|
+
checkbox: 'check box',
|
|
16
|
+
input: 'input text'
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
exports.default = _default;
|
|
21
|
+
//# sourceMappingURL=checked.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/input-text-with-titeled-checkbox/test/fixtures/checked.js"],"names":["props","title","checked","checkBoxOnChange","value","console","log","inputTextTitle","inputTextValue","inputTextDescription","inputTextOnChange","checkbox","input"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,WADF;AAELC,IAAAA,OAAO,EAAE,IAFJ;AAGLC,IAAAA,gBAAgB,EAAEC,KAAK,IAAIC,OAAO,CAACC,GAAR,CAAYF,KAAZ,CAHtB;AAILG,IAAAA,cAAc,EAAE,cAJX;AAKLC,IAAAA,cAAc,EAAE,KALX;AAMLC,IAAAA,oBAAoB,EAAE,0BANjB;AAOLC,IAAAA,iBAAiB,EAAEN,KAAK,IAAIC,OAAO,CAACC,GAAR,CAAYF,KAAZ,CAPvB;AAQL,kBAAc;AAACO,MAAAA,QAAQ,EAAE,WAAX;AAAwBC,MAAAA,KAAK,EAAE;AAA/B;AART;AADM,C","sourcesContent":["export default {\n props: {\n title: 'Add stars',\n checked: true,\n checkBoxOnChange: value => console.log(value),\n inputTextTitle: 'Stars amount',\n inputTextValue: '250',\n inputTextDescription: 'This is the tooltip text',\n inputTextOnChange: value => console.log(value),\n 'aria-label': {checkbox: 'check box', input: 'input text'}\n }\n};\n"],"file":"checked.js"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
var _default = {
|
|
6
|
+
props: {
|
|
7
|
+
title: 'Create badge',
|
|
8
|
+
checked: false,
|
|
9
|
+
onChange: value => console.log(value),
|
|
10
|
+
checkBoxOnChange: value => console.log(value),
|
|
11
|
+
inputTextTitle: 'Stars amount',
|
|
12
|
+
inputTextValue: '250',
|
|
13
|
+
inputTextDescription: 'This is the tooltip text',
|
|
14
|
+
inputTextDisabled: true,
|
|
15
|
+
inputTextOnChange: value => console.log(value),
|
|
16
|
+
'aria-label': {
|
|
17
|
+
checkbox: 'check box',
|
|
18
|
+
input: 'input text'
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
exports.default = _default;
|
|
23
|
+
//# sourceMappingURL=unchecked.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/input-text-with-titeled-checkbox/test/fixtures/unchecked.js"],"names":["props","title","checked","onChange","value","console","log","checkBoxOnChange","inputTextTitle","inputTextValue","inputTextDescription","inputTextDisabled","inputTextOnChange","checkbox","input"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,cADF;AAELC,IAAAA,OAAO,EAAE,KAFJ;AAGLC,IAAAA,QAAQ,EAAEC,KAAK,IAAIC,OAAO,CAACC,GAAR,CAAYF,KAAZ,CAHd;AAILG,IAAAA,gBAAgB,EAAEH,KAAK,IAAIC,OAAO,CAACC,GAAR,CAAYF,KAAZ,CAJtB;AAKLI,IAAAA,cAAc,EAAE,cALX;AAMLC,IAAAA,cAAc,EAAE,KANX;AAOLC,IAAAA,oBAAoB,EAAE,0BAPjB;AAQLC,IAAAA,iBAAiB,EAAE,IARd;AASLC,IAAAA,iBAAiB,EAAER,KAAK,IAAIC,OAAO,CAACC,GAAR,CAAYF,KAAZ,CATvB;AAUL,kBAAc;AAACS,MAAAA,QAAQ,EAAE,WAAX;AAAwBC,MAAAA,KAAK,EAAE;AAA/B;AAVT;AADM,C","sourcesContent":["export default {\n props: {\n title: 'Create badge',\n checked: false,\n onChange: value => console.log(value),\n checkBoxOnChange: value => console.log(value),\n inputTextTitle: 'Stars amount',\n inputTextValue: '250',\n inputTextDescription: 'This is the tooltip text',\n inputTextDisabled: true,\n inputTextOnChange: value => console.log(value),\n 'aria-label': {checkbox: 'check box', input: 'input text'}\n }\n};\n"],"file":"unchecked.js"}
|