@coorpacademy/components 10.5.6 → 10.5.7-alpha.3
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/questions/qcm/index.js +40 -25
- package/es/molecule/questions/qcm/index.js.map +1 -1
- package/es/molecule/questions/qcm/style.css +39 -15
- package/es/molecule/questions/qcm/test/fixtures/default.js +8 -0
- package/es/molecule/questions/qcm/test/fixtures/default.js.map +1 -1
- package/es/molecule/questions/qcm/test/qcm.js +105 -0
- package/es/molecule/questions/qcm/test/qcm.js.map +1 -0
- package/es/molecule/questions/qcm-graphic/index.js +38 -17
- package/es/molecule/questions/qcm-graphic/index.js.map +1 -1
- package/es/molecule/questions/qcm-graphic/style.css +60 -15
- package/es/molecule/questions/qcm-graphic/test/qcm-graphic.js +65 -0
- package/es/molecule/questions/qcm-graphic/test/qcm-graphic.js.map +1 -0
- package/es/util/get-shadow-box-color-from-primary.js +4 -0
- package/es/util/get-shadow-box-color-from-primary.js.map +1 -0
- package/es/util/test/get-shadow-box-color-from-primary.js +33 -0
- package/es/util/test/get-shadow-box-color-from-primary.js.map +1 -0
- package/es/variables/colors.css +3 -0
- package/lib/molecule/questions/qcm/index.js +47 -23
- package/lib/molecule/questions/qcm/index.js.map +1 -1
- package/lib/molecule/questions/qcm/style.css +39 -15
- package/lib/molecule/questions/qcm/test/fixtures/default.js +8 -0
- package/lib/molecule/questions/qcm/test/fixtures/default.js.map +1 -1
- package/lib/molecule/questions/qcm/test/qcm.js +117 -0
- package/lib/molecule/questions/qcm/test/qcm.js.map +1 -0
- package/lib/molecule/questions/qcm-graphic/index.js +36 -15
- package/lib/molecule/questions/qcm-graphic/index.js.map +1 -1
- package/lib/molecule/questions/qcm-graphic/style.css +60 -15
- package/lib/molecule/questions/qcm-graphic/test/qcm-graphic.js +76 -0
- package/lib/molecule/questions/qcm-graphic/test/qcm-graphic.js.map +1 -0
- package/lib/util/get-shadow-box-color-from-primary.js +12 -0
- package/lib/util/get-shadow-box-color-from-primary.js.map +1 -0
- package/lib/util/test/get-shadow-box-color-from-primary.js +40 -0
- package/lib/util/test/get-shadow-box-color-from-primary.js.map +1 -0
- package/lib/variables/colors.css +3 -0
- package/package.json +2 -2
- package/es/molecule/search/test/fixtures.js +0 -15
- package/es/molecule/search/test/fixtures.js.map +0 -1
- package/lib/molecule/search/test/fixtures.js +0 -25
- package/lib/molecule/search/test/fixtures.js.map +0 -1
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _identity2 = _interopRequireDefault(require("lodash/fp/identity"));
|
|
4
|
+
|
|
5
|
+
var _browserEnv = _interopRequireDefault(require("browser-env"));
|
|
6
|
+
|
|
7
|
+
var _ava = _interopRequireDefault(require("ava"));
|
|
8
|
+
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
10
|
+
|
|
11
|
+
var _enzyme = require("enzyme");
|
|
12
|
+
|
|
13
|
+
var _enzymeAdapterReact = _interopRequireDefault(require("enzyme-adapter-react-16"));
|
|
14
|
+
|
|
15
|
+
var _ = _interopRequireDefault(require(".."));
|
|
16
|
+
|
|
17
|
+
var _default = _interopRequireDefault(require("./fixtures/default"));
|
|
18
|
+
|
|
19
|
+
var _noSelected = _interopRequireDefault(require("./fixtures/no-selected"));
|
|
20
|
+
|
|
21
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
22
|
+
|
|
23
|
+
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); }
|
|
24
|
+
|
|
25
|
+
(0, _browserEnv.default)();
|
|
26
|
+
(0, _enzyme.configure)({
|
|
27
|
+
adapter: new _enzymeAdapterReact.default()
|
|
28
|
+
});
|
|
29
|
+
const translate = _identity2.default;
|
|
30
|
+
(0, _ava.default)('onClick should be reachable, should match given aria-label', t => {
|
|
31
|
+
let answerWasClicked = false;
|
|
32
|
+
_default.default.props.answers[1] = _extends(_extends({}, _default.default.props.answers[1]), {}, {
|
|
33
|
+
onClick: () => {
|
|
34
|
+
answerWasClicked = true;
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
const wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react.default.createElement(_.default, _default.default.props), {
|
|
38
|
+
context: {
|
|
39
|
+
translate
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
const answers = wrapper.find('[data-name="answer"]');
|
|
43
|
+
t.true(answers.at(1).exists());
|
|
44
|
+
t.is(answers.at(1).props()['aria-label'], 'aria Answer');
|
|
45
|
+
answers.at(1).simulate('click', {});
|
|
46
|
+
t.true(answerWasClicked);
|
|
47
|
+
t.pass();
|
|
48
|
+
});
|
|
49
|
+
(0, _ava.default)("should set: selected's background to Primary w/ alpha 5% && color to primary, unselected's no background && color to a nuance of primary", t => {
|
|
50
|
+
const wrapper = (0, _enzyme.mount)( /*#__PURE__*/_react.default.createElement(_.default, _default.default.props));
|
|
51
|
+
const answers = wrapper.find('[data-name="answer"]');
|
|
52
|
+
const unselectedAnswer = answers.at(1);
|
|
53
|
+
const expectedPrimaryColor = '#00B0FF'; // ---- unselected ----
|
|
54
|
+
// should not have styles on the wrapper
|
|
55
|
+
|
|
56
|
+
t.true(unselectedAnswer.exists());
|
|
57
|
+
t.deepEqual(unselectedAnswer.props().style, {}); // should not have any styles (color should be picked from the css for unselected)
|
|
58
|
+
|
|
59
|
+
const unselectedLabel = unselectedAnswer.children().at(1);
|
|
60
|
+
t.true(unselectedLabel.exists());
|
|
61
|
+
t.deepEqual(unselectedLabel.props().style, {}); // check dangerouslySetInnerHTML
|
|
62
|
+
|
|
63
|
+
t.deepEqual(unselectedLabel.props().dangerouslySetInnerHTML, {
|
|
64
|
+
__html: 'Lorem ipsum'
|
|
65
|
+
});
|
|
66
|
+
t.is(unselectedLabel.text(), 'Lorem ipsum'); // should have a backgroundColor of '#F4F4F5' /* cm_grey_75 */
|
|
67
|
+
|
|
68
|
+
const unselectedBackground = unselectedAnswer.children().at(0);
|
|
69
|
+
t.true(unselectedBackground.exists());
|
|
70
|
+
t.deepEqual(unselectedBackground.props().style, {
|
|
71
|
+
backgroundColor: '#F4F4F5'
|
|
72
|
+
}); // selected
|
|
73
|
+
// should have box-shadow color based on primary
|
|
74
|
+
|
|
75
|
+
const selectedAnswer = answers.at(2);
|
|
76
|
+
t.true(selectedAnswer.exists());
|
|
77
|
+
t.deepEqual(selectedAnswer.props().style, {
|
|
78
|
+
boxShadow: '0 4px 16px rgba(0, 122, 179, 0.25)'
|
|
79
|
+
}); // should have only color prop in label style, w/o transforming expectedPrimaryColor
|
|
80
|
+
|
|
81
|
+
const selectedLabel = selectedAnswer.children().at(1);
|
|
82
|
+
t.true(selectedLabel.exists());
|
|
83
|
+
t.deepEqual(selectedLabel.props().style, {
|
|
84
|
+
color: expectedPrimaryColor
|
|
85
|
+
}); // check dangerouslySetInnerHTML
|
|
86
|
+
|
|
87
|
+
t.deepEqual(selectedLabel.props().dangerouslySetInnerHTML, {
|
|
88
|
+
__html: 'Lorem'
|
|
89
|
+
});
|
|
90
|
+
t.is(selectedLabel.text(), 'Lorem'); // should have backgroundColor as expectedPrimaryColor (primary to be overlayed by the css)
|
|
91
|
+
|
|
92
|
+
const selectedBackground = selectedAnswer.children().at(0);
|
|
93
|
+
t.true(selectedBackground.exists());
|
|
94
|
+
t.deepEqual(selectedBackground.props().style, {
|
|
95
|
+
backgroundColor: expectedPrimaryColor
|
|
96
|
+
});
|
|
97
|
+
t.pass();
|
|
98
|
+
});
|
|
99
|
+
(0, _ava.default)('should set className to longAnswer if the answer is the longest of the set', t => {
|
|
100
|
+
const wrapper = (0, _enzyme.mount)( /*#__PURE__*/_react.default.createElement(_.default, _default.default.props));
|
|
101
|
+
const answer = wrapper.find('[data-name="answer"]'); // regular answer
|
|
102
|
+
|
|
103
|
+
t.true(answer.at(4).exists());
|
|
104
|
+
t.is(answer.at(4).props().className, 'qcm__answer label__innerHTML qcm__selectedAnswer'); // long answer
|
|
105
|
+
|
|
106
|
+
t.true(answer.at(5).exists());
|
|
107
|
+
t.is(answer.at(5).props().className, 'qcm__longestAnswer qcm__answer qcm__answer label__innerHTML qcm__unselectedAnswer');
|
|
108
|
+
t.pass();
|
|
109
|
+
});
|
|
110
|
+
(0, _ava.default)('should use title as default aria-label if no aria-label is provided', t => {
|
|
111
|
+
const wrapper = (0, _enzyme.mount)( /*#__PURE__*/_react.default.createElement(_.default, _noSelected.default.props));
|
|
112
|
+
const answers = wrapper.find('[data-name="answer"]');
|
|
113
|
+
t.is(answers.at(6).text(), 'Lorem ipsum dolor');
|
|
114
|
+
t.is(answers.at(6).props()['aria-label'], 'Lorem ipsum dolor');
|
|
115
|
+
t.pass();
|
|
116
|
+
});
|
|
117
|
+
//# sourceMappingURL=qcm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/questions/qcm/test/qcm.js"],"names":["adapter","Adapter","translate","t","answerWasClicked","defaultFixture","props","answers","onClick","wrapper","context","find","true","at","exists","is","simulate","pass","unselectedAnswer","expectedPrimaryColor","deepEqual","style","unselectedLabel","children","dangerouslySetInnerHTML","__html","text","unselectedBackground","backgroundColor","selectedAnswer","boxShadow","selectedLabel","color","selectedBackground","answer","className","noAriaLabelFixture"],"mappings":";;;;AAAA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;AAEA;AACA,uBAAU;AAACA,EAAAA,OAAO,EAAE,IAAIC,2BAAJ;AAAV,CAAV;AACA,MAAMC,SAAS,qBAAf;AAEA,kBAAK,4DAAL,EAAmEC,CAAC,IAAI;AACtE,MAAIC,gBAAgB,GAAG,KAAvB;AACAC,mBAAeC,KAAf,CAAqBC,OAArB,CAA6B,CAA7B,0BACKF,iBAAeC,KAAf,CAAqBC,OAArB,CAA6B,CAA7B,CADL;AAEEC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AAC,CAACc,IAAF;AACD,CAdD;AAgBA,kBAAK,qEAAL,EAA4Ed,CAAC,IAAI;AAC/E,QAAMM,OAAO,GAAG,iCAAM,6BAAC,SAAD,EAAS2B,oBAAmB9B,KAA5B,CAAN,CAAhB;AACA,QAAMC,OAAO,GAAGE,OAAO,CAACE,IAAR,CAAa,sBAAb,CAAhB;AACAR,EAAAA,CAAC,CAACY,EAAF,CAAKR,OAAO,CAACM,EAAR,CAAW,CAAX,EAAca,IAAd,EAAL,EAA2B,mBAA3B;AACAvB,EAAAA,CAAC,CAACY,EAAF,CAAKR,OAAO,CAACM,EAAR,CAAW,CAAX,EAAcP,KAAd,GAAsB,YAAtB,CAAL,EAA0C,mBAA1C;AACAH,EAAAA,CAAC,CAACc,IAAF;AACD,CAND","sourcesContent":["import browserEnv from 'browser-env';\nimport test from 'ava';\nimport React from 'react';\nimport {shallow, mount, configure} from 'enzyme';\nimport {identity} from 'lodash/fp';\nimport Adapter from 'enzyme-adapter-react-16';\nimport Qcm from '..';\nimport defaultFixture from './fixtures/default';\nimport noAriaLabelFixture from './fixtures/no-selected';\n\nbrowserEnv();\nconfigure({adapter: new Adapter()});\nconst translate = identity;\n\ntest('onClick should be reachable, should match given aria-label', t => {\n let answerWasClicked = false;\n defaultFixture.props.answers[1] = {\n ...defaultFixture.props.answers[1],\n onClick: () => {\n answerWasClicked = true;\n }\n };\n const wrapper = shallow(<Qcm {...defaultFixture.props} />, {\n context: {translate}\n });\n const answers = wrapper.find('[data-name=\"answer\"]');\n t.true(answers.at(1).exists());\n t.is(answers.at(1).props()['aria-label'], 'aria Answer');\n answers.at(1).simulate('click', {});\n t.true(answerWasClicked);\n t.pass();\n});\n\ntest(\"should set: selected's background to Primary w/ alpha 5% && color to primary, unselected's no background && color to a nuance of primary\", t => {\n const wrapper = mount(<Qcm {...defaultFixture.props} />);\n const answers = wrapper.find('[data-name=\"answer\"]');\n const unselectedAnswer = answers.at(1);\n const expectedPrimaryColor = '#00B0FF';\n // ---- unselected ----\n // should not have styles on the wrapper\n t.true(unselectedAnswer.exists());\n t.deepEqual(unselectedAnswer.props().style, {});\n\n // should not have any styles (color should be picked from the css for unselected)\n const unselectedLabel = unselectedAnswer.children().at(1);\n t.true(unselectedLabel.exists());\n t.deepEqual(unselectedLabel.props().style, {});\n\n // check dangerouslySetInnerHTML\n t.deepEqual(unselectedLabel.props().dangerouslySetInnerHTML, {\n __html: 'Lorem ipsum'\n });\n t.is(unselectedLabel.text(), 'Lorem ipsum');\n\n // should have a backgroundColor of '#F4F4F5' /* cm_grey_75 */\n const unselectedBackground = unselectedAnswer.children().at(0);\n t.true(unselectedBackground.exists());\n t.deepEqual(unselectedBackground.props().style, {\n backgroundColor: '#F4F4F5'\n });\n\n // selected\n // should have box-shadow color based on primary\n const selectedAnswer = answers.at(2);\n t.true(selectedAnswer.exists());\n t.deepEqual(selectedAnswer.props().style, {\n boxShadow: '0 4px 16px rgba(0, 122, 179, 0.25)'\n });\n\n // should have only color prop in label style, w/o transforming expectedPrimaryColor\n const selectedLabel = selectedAnswer.children().at(1);\n t.true(selectedLabel.exists());\n t.deepEqual(selectedLabel.props().style, {\n color: expectedPrimaryColor\n });\n\n // check dangerouslySetInnerHTML\n t.deepEqual(selectedLabel.props().dangerouslySetInnerHTML, {\n __html: 'Lorem'\n });\n\n t.is(selectedLabel.text(), 'Lorem');\n\n // should have backgroundColor as expectedPrimaryColor (primary to be overlayed by the css)\n const selectedBackground = selectedAnswer.children().at(0);\n t.true(selectedBackground.exists());\n t.deepEqual(selectedBackground.props().style, {\n backgroundColor: expectedPrimaryColor\n });\n\n t.pass();\n});\n\ntest('should set className to longAnswer if the answer is the longest of the set', t => {\n const wrapper = mount(<Qcm {...defaultFixture.props} />);\n const answer = wrapper.find('[data-name=\"answer\"]');\n // regular answer\n t.true(answer.at(4).exists());\n t.is(answer.at(4).props().className, 'qcm__answer label__innerHTML qcm__selectedAnswer');\n\n // long answer\n t.true(answer.at(5).exists());\n t.is(\n answer.at(5).props().className,\n 'qcm__longestAnswer qcm__answer qcm__answer label__innerHTML qcm__unselectedAnswer'\n );\n t.pass();\n});\n\ntest('should use title as default aria-label if no aria-label is provided', t => {\n const wrapper = mount(<Qcm {...noAriaLabelFixture.props} />);\n const answers = wrapper.find('[data-name=\"answer\"]');\n t.is(answers.at(6).text(), 'Lorem ipsum dolor');\n t.is(answers.at(6).props()['aria-label'], 'Lorem ipsum dolor');\n t.pass();\n});\n"],"file":"qcm.js"}
|
|
@@ -15,48 +15,68 @@ var _provider = _interopRequireDefault(require("../../../atom/provider"));
|
|
|
15
15
|
|
|
16
16
|
var _style = require("../../../atom/label/style.css");
|
|
17
17
|
|
|
18
|
+
var _getShadowBoxColorFromPrimary = require("../../../util/get-shadow-box-color-from-primary");
|
|
19
|
+
|
|
18
20
|
var _style2 = _interopRequireDefault(require("./style.css"));
|
|
19
21
|
|
|
20
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
23
|
|
|
24
|
+
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); }
|
|
25
|
+
|
|
22
26
|
const QCMImage = (props, context) => {
|
|
23
27
|
const {
|
|
24
28
|
answers
|
|
25
29
|
} = props;
|
|
30
|
+
const {
|
|
31
|
+
skin
|
|
32
|
+
} = context;
|
|
33
|
+
const primarySkinColor = (0, _getOr2.default)('#00B0FF', 'common.primary', skin);
|
|
26
34
|
const answersViews = answers.map((answer, key) => {
|
|
27
35
|
const {
|
|
28
36
|
onClick,
|
|
29
37
|
title,
|
|
30
38
|
selected,
|
|
31
|
-
image
|
|
39
|
+
image,
|
|
40
|
+
ariaLabel
|
|
32
41
|
} = answer;
|
|
33
|
-
const {
|
|
34
|
-
skin
|
|
35
|
-
} = context;
|
|
36
|
-
const primarySkinColor = (0, _getOr2.default)('#00B0FF', 'common.primary', skin);
|
|
37
|
-
const selectedStyle = selected ? {
|
|
38
|
-
backgroundColor: primarySkinColor,
|
|
39
|
-
borderColor: primarySkinColor
|
|
40
|
-
} : null;
|
|
41
42
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
42
|
-
className: selected ? _style2.default.selected : _style2.default.answer,
|
|
43
43
|
onClick: onClick,
|
|
44
44
|
"data-selected": selected,
|
|
45
|
-
|
|
45
|
+
"data-name": "answerGraphic",
|
|
46
|
+
style: _extends({}, selected && {
|
|
47
|
+
boxShadow: `0 4px 16px ${(0, _getShadowBoxColorFromPrimary.getShadowBoxColorFromPrimary)(primarySkinColor)}`
|
|
48
|
+
}),
|
|
49
|
+
className: selected ? _style2.default.selected : _style2.default.answer,
|
|
46
50
|
key: key
|
|
51
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
52
|
+
"data-name": "answerBackground",
|
|
53
|
+
style: {
|
|
54
|
+
backgroundColor: selected ? primarySkinColor : '#F4F4F5'
|
|
55
|
+
},
|
|
56
|
+
className: _style2.default.background
|
|
57
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
58
|
+
"data-name": "answerContent",
|
|
59
|
+
className: _style2.default.content
|
|
47
60
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
48
61
|
className: _style2.default.imageWrapper,
|
|
49
|
-
"data-name": "
|
|
62
|
+
"data-name": "answerImage",
|
|
63
|
+
"aria-label": ariaLabel || title,
|
|
50
64
|
style: {
|
|
51
65
|
backgroundImage: `url(${image})`
|
|
52
66
|
}
|
|
53
67
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
54
|
-
|
|
68
|
+
"data-name": "answerText",
|
|
69
|
+
className: _style2.default.titleWrapper
|
|
70
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
71
|
+
className: (0, _classnames.default)(_style2.default.title, _style.innerHTML),
|
|
72
|
+
style: _extends({}, selected && {
|
|
73
|
+
color: primarySkinColor
|
|
74
|
+
}) // eslint-disable-next-line react/no-danger
|
|
55
75
|
,
|
|
56
76
|
dangerouslySetInnerHTML: {
|
|
57
77
|
__html: title
|
|
58
78
|
}
|
|
59
|
-
}));
|
|
79
|
+
}))));
|
|
60
80
|
});
|
|
61
81
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
62
82
|
"data-name": "qcm-graphic-wrapper",
|
|
@@ -72,7 +92,8 @@ QCMImage.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
72
92
|
title: _propTypes.default.string,
|
|
73
93
|
selected: _propTypes.default.bool,
|
|
74
94
|
onClick: _propTypes.default.func,
|
|
75
|
-
image: _propTypes.default.string
|
|
95
|
+
image: _propTypes.default.string,
|
|
96
|
+
ariaLabel: _propTypes.default.string
|
|
76
97
|
}))
|
|
77
98
|
} : {};
|
|
78
99
|
var _default = QCMImage;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/molecule/questions/qcm-graphic/index.js"],"names":["QCMImage","props","context","answers","answersViews","map","answer","key","onClick","title","selected","image","
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/questions/qcm-graphic/index.js"],"names":["QCMImage","props","context","answers","skin","primarySkinColor","answersViews","map","answer","key","onClick","title","selected","image","ariaLabel","boxShadow","style","backgroundColor","background","content","imageWrapper","backgroundImage","titleWrapper","innerHTML","color","__html","wrapper","contextTypes","Provider","childContextTypes","propTypes","PropTypes","arrayOf","shape","string","bool","func"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,QAAQ,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;AACnC,QAAM;AAACC,IAAAA;AAAD,MAAYF,KAAlB;AACA,QAAM;AAACG,IAAAA;AAAD,MAASF,OAAf;AACA,QAAMG,gBAAgB,GAAG,qBAAM,SAAN,EAAiB,gBAAjB,EAAmCD,IAAnC,CAAzB;AAEA,QAAME,YAAY,GAAGH,OAAO,CAACI,GAAR,CAAY,CAACC,M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AAK,iBAAU,qBAAf;AAAqC,IAAA,SAAS,EAAEK,gBAAMU;AAAtD,KACGpB,YADH,CADF;AAKD,CAzDD;;AA2DAN,QAAQ,CAAC2B,YAAT,GAAwB;AACtBvB,EAAAA,IAAI,EAAEwB,kBAASC,iBAAT,CAA2BzB;AADX,CAAxB;AAIAJ,QAAQ,CAAC8B,SAAT,2CAAqB;AACnB3B,EAAAA,OAAO,EAAE4B,mBAAUC,OAAV,CACPD,mBAAUE,KAAV,CAAgB;AACdtB,IAAAA,KAAK,EAAEoB,mBAAUG,MADH;AAEdtB,IAAAA,QAAQ,EAAEmB,mBAAUI,IAFN;AAGdzB,IAAAA,OAAO,EAAEqB,mBAAUK,IAHL;AAIdvB,IAAAA,KAAK,EAAEkB,mBAAUG,MAJH;AAKdpB,IAAAA,SAAS,EAAEiB,mBAAUG;AALP,GAAhB,CADO;AADU,CAArB;eAYelC,Q","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {getOr} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Provider from '../../../atom/provider';\nimport {innerHTML} from '../../../atom/label/style.css';\nimport {getShadowBoxColorFromPrimary} from '../../../util/get-shadow-box-color-from-primary';\nimport style from './style.css';\n\nconst QCMImage = (props, context) => {\n const {answers} = props;\n const {skin} = context;\n const primarySkinColor = getOr('#00B0FF', 'common.primary', skin);\n\n const answersViews = answers.map((answer, key) => {\n const {onClick, title, selected, image, ariaLabel} = answer;\n\n return (\n <div\n onClick={onClick}\n data-selected={selected}\n data-name=\"answerGraphic\"\n style={{\n ...(selected && {\n boxShadow: `0 4px 16px ${getShadowBoxColorFromPrimary(primarySkinColor)}`\n })\n }}\n className={selected ? style.selected : style.answer}\n key={key}\n >\n <div\n data-name=\"answerBackground\"\n style={{\n backgroundColor: selected ? primarySkinColor : '#F4F4F5'\n }}\n className={style.background}\n />\n <div data-name=\"answerContent\" className={style.content}>\n <div\n className={style.imageWrapper}\n data-name=\"answerImage\"\n aria-label={ariaLabel || title}\n style={{\n backgroundImage: `url(${image})`\n }}\n />\n <div data-name=\"answerText\" className={style.titleWrapper}>\n <div\n className={classnames(style.title, innerHTML)}\n style={{\n ...(selected && {color: primarySkinColor})\n }}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n </div>\n </div>\n </div>\n );\n });\n\n return (\n <div data-name=\"qcm-graphic-wrapper\" className={style.wrapper}>\n {answersViews}\n </div>\n );\n};\n\nQCMImage.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nQCMImage.propTypes = {\n answers: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string,\n selected: PropTypes.bool,\n onClick: PropTypes.func,\n image: PropTypes.string,\n ariaLabel: PropTypes.string\n })\n )\n};\n\nexport default QCMImage;\n"],"file":"index.js"}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
@value mobile from breakpoints;
|
|
3
3
|
@value colors: "../../../variables/colors.css";
|
|
4
4
|
@value white from colors;
|
|
5
|
-
@value
|
|
6
|
-
@value
|
|
7
|
-
@value
|
|
5
|
+
@value cm_grey_75 from colors;
|
|
6
|
+
@value cm_primary_blue from colors;
|
|
7
|
+
@value cm_blue_900 from colors;
|
|
8
8
|
|
|
9
9
|
.wrapper {
|
|
10
10
|
display: flex;
|
|
@@ -15,16 +15,33 @@
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
.answer {
|
|
18
|
-
|
|
18
|
+
position: relative;
|
|
19
|
+
color: cm_blue_900;
|
|
19
20
|
background-color: white;
|
|
20
|
-
border: 1px solid color(black lightness(85%));
|
|
21
|
-
border-radius: 3px;
|
|
22
21
|
box-sizing: border-box;
|
|
23
22
|
cursor: pointer;
|
|
24
23
|
padding: 8px;
|
|
25
24
|
width: 200px;
|
|
26
25
|
min-height: 245px;
|
|
27
26
|
margin: 0 4px 8px;
|
|
27
|
+
box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.12);
|
|
28
|
+
border-radius: 16px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.background {
|
|
32
|
+
top: 0;
|
|
33
|
+
left: 0;
|
|
34
|
+
position: absolute;
|
|
35
|
+
border-radius: 16px;
|
|
36
|
+
height: 100%;
|
|
37
|
+
width: 100%;
|
|
38
|
+
transition: opacity 0.25s linear, background-color 0.25s linear;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.content {
|
|
42
|
+
height: 100%;
|
|
43
|
+
width: 100%;
|
|
44
|
+
position: relative;
|
|
28
45
|
}
|
|
29
46
|
|
|
30
47
|
.imageWrapper {
|
|
@@ -33,12 +50,21 @@
|
|
|
33
50
|
align-items: center;
|
|
34
51
|
height: 110px;
|
|
35
52
|
margin-bottom: 16px;
|
|
36
|
-
background-size:
|
|
53
|
+
background-size: cover;
|
|
37
54
|
background-repeat: no-repeat;
|
|
38
55
|
background-position: center center;
|
|
56
|
+
border-radius: 12px;
|
|
39
57
|
}
|
|
40
58
|
|
|
41
59
|
.titleWrapper {
|
|
60
|
+
display: flex;
|
|
61
|
+
height: calc(100% - 126px);
|
|
62
|
+
width: 100%;
|
|
63
|
+
align-items: center;
|
|
64
|
+
justify-content: center;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.title {
|
|
42
68
|
font-family: 'Gilroy';
|
|
43
69
|
font-size: 17px;
|
|
44
70
|
line-height: 20px;
|
|
@@ -49,18 +75,36 @@
|
|
|
49
75
|
}
|
|
50
76
|
|
|
51
77
|
.answer:hover {
|
|
52
|
-
background
|
|
78
|
+
background: cm_grey_75;
|
|
79
|
+
box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.12);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.answer .background{
|
|
83
|
+
opacity: 0;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.answer:hover .background{
|
|
87
|
+
opacity: 1;
|
|
53
88
|
}
|
|
54
89
|
|
|
55
90
|
.selected {
|
|
56
91
|
composes: answer;
|
|
57
|
-
color:
|
|
92
|
+
color: cm_primary_blue;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.selected .background{
|
|
96
|
+
opacity: 0.05;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.selected:hover .background{
|
|
100
|
+
opacity: 0.1;
|
|
58
101
|
}
|
|
59
102
|
|
|
60
103
|
@media mobile {
|
|
61
104
|
.wrapper {
|
|
62
105
|
flex-direction: column;
|
|
63
|
-
|
|
106
|
+
display: flex;
|
|
107
|
+
align-items: center;
|
|
64
108
|
width: 100%;
|
|
65
109
|
padding-bottom: 0;
|
|
66
110
|
}
|
|
@@ -69,17 +113,18 @@
|
|
|
69
113
|
display: flex;
|
|
70
114
|
align-items: center;
|
|
71
115
|
flex-flow: row nowrap;
|
|
72
|
-
width: 100
|
|
116
|
+
width: calc(100% - 45px);
|
|
73
117
|
min-height: 82px;
|
|
74
118
|
height: inherit;
|
|
75
119
|
margin: 0 0 8px;
|
|
76
120
|
overflow: hidden;
|
|
77
121
|
}
|
|
78
122
|
|
|
79
|
-
.
|
|
80
|
-
|
|
123
|
+
.content {
|
|
124
|
+
display: flex;
|
|
125
|
+
align-items: center;
|
|
81
126
|
}
|
|
82
|
-
|
|
127
|
+
|
|
83
128
|
.answer:last-child {
|
|
84
129
|
margin-bottom: 0;
|
|
85
130
|
}
|
|
@@ -96,7 +141,7 @@
|
|
|
96
141
|
white-space: wrap;
|
|
97
142
|
overflow: hidden;
|
|
98
143
|
padding: 0;
|
|
99
|
-
|
|
144
|
+
justify-content: left;
|
|
100
145
|
font-size: 15px;
|
|
101
146
|
}
|
|
102
147
|
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _identity2 = _interopRequireDefault(require("lodash/fp/identity"));
|
|
4
|
+
|
|
5
|
+
var _browserEnv = _interopRequireDefault(require("browser-env"));
|
|
6
|
+
|
|
7
|
+
var _ava = _interopRequireDefault(require("ava"));
|
|
8
|
+
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
10
|
+
|
|
11
|
+
var _enzyme = require("enzyme");
|
|
12
|
+
|
|
13
|
+
var _enzymeAdapterReact = _interopRequireDefault(require("enzyme-adapter-react-16"));
|
|
14
|
+
|
|
15
|
+
var _ = _interopRequireDefault(require(".."));
|
|
16
|
+
|
|
17
|
+
var _default = _interopRequireDefault(require("./fixtures/default"));
|
|
18
|
+
|
|
19
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
|
+
|
|
21
|
+
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); }
|
|
22
|
+
|
|
23
|
+
(0, _browserEnv.default)();
|
|
24
|
+
(0, _enzyme.configure)({
|
|
25
|
+
adapter: new _enzymeAdapterReact.default()
|
|
26
|
+
});
|
|
27
|
+
const translate = _identity2.default;
|
|
28
|
+
(0, _ava.default)('onClick should be reachable, should match given aria-label', t => {
|
|
29
|
+
let answerWasClicked = false;
|
|
30
|
+
_default.default.props.answers[1] = _extends(_extends({}, _default.default.props.answers[1]), {}, {
|
|
31
|
+
onClick: () => {
|
|
32
|
+
answerWasClicked = true;
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
const wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react.default.createElement(_.default, _default.default.props), {
|
|
36
|
+
context: {
|
|
37
|
+
translate
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
const answersImages = wrapper.find('[data-name="answerImage"]');
|
|
41
|
+
t.true(answersImages.at(1).exists());
|
|
42
|
+
t.is(answersImages.at(1).props()['aria-label'], 'Lorem ipsum');
|
|
43
|
+
const answers = wrapper.find('[data-name="answerGraphic"]');
|
|
44
|
+
answers.at(1).simulate('click');
|
|
45
|
+
t.true(answerWasClicked);
|
|
46
|
+
t.pass();
|
|
47
|
+
});
|
|
48
|
+
(0, _ava.default)("should set: selected's background to Primary w/ alpha 5% && color to primary, unselected's no background && color to a nuance of primary", t => {
|
|
49
|
+
const wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react.default.createElement(_.default, _default.default.props), {
|
|
50
|
+
context: {
|
|
51
|
+
translate
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
const answers = wrapper.find('[data-name="answerGraphic"]');
|
|
55
|
+
const firstAnswer = answers.at(0);
|
|
56
|
+
t.true(firstAnswer.exists());
|
|
57
|
+
t.deepEqual(firstAnswer.props().style, {});
|
|
58
|
+
const unselectedBackgroundAnswer = firstAnswer.children().at(0);
|
|
59
|
+
t.true(unselectedBackgroundAnswer.exists());
|
|
60
|
+
t.deepEqual(unselectedBackgroundAnswer.props().style, {
|
|
61
|
+
backgroundColor: '#F4F4F5'
|
|
62
|
+
});
|
|
63
|
+
const firstAnswerText = firstAnswer.children().at(1).children().at(1).children().at(0);
|
|
64
|
+
t.true(firstAnswerText.exists());
|
|
65
|
+
const thirdAnswer = answers.at(2);
|
|
66
|
+
t.true(thirdAnswer.exists());
|
|
67
|
+
t.deepEqual(thirdAnswer.props().style, {
|
|
68
|
+
boxShadow: '0 4px 16px rgba(0, 122, 179, 0.25)'
|
|
69
|
+
});
|
|
70
|
+
const selectedBackgroundAnswer = thirdAnswer.children().at(0);
|
|
71
|
+
t.true(selectedBackgroundAnswer.exists());
|
|
72
|
+
t.deepEqual(selectedBackgroundAnswer.props().style, {
|
|
73
|
+
backgroundColor: '#00B0FF'
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
//# sourceMappingURL=qcm-graphic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/questions/qcm-graphic/test/qcm-graphic.js"],"names":["adapter","Adapter","translate","t","answerWasClicked","defaultFixture","props","answers","onClick","wrapper","context","answersImages","find","true","at","exists","is","simulate","pass","firstAnswer","deepEqual","style","unselectedBackgroundAnswer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A,CAAC,CAACU,IAAF,CAAOe,wBAAwB,CAACb,MAAzB,EAAP;AACAZ,EAAAA,CAAC,CAACiB,SAAF,CAAYQ,wBAAwB,CAACtB,KAAzB,GAAiCe,KAA7C,EAAoD;AAACG,IAAAA,eAAe,EAAE;AAAlB,GAApD;AACD,CArBD","sourcesContent":["import browserEnv from 'browser-env';\nimport test from 'ava';\nimport React from 'react';\nimport {shallow, configure} from 'enzyme';\nimport {identity} from 'lodash/fp';\nimport Adapter from 'enzyme-adapter-react-16';\nimport QCMImage from '..';\nimport defaultFixture from './fixtures/default';\n\nbrowserEnv();\nconfigure({adapter: new Adapter()});\nconst translate = identity;\n\ntest('onClick should be reachable, should match given aria-label', t => {\n let answerWasClicked = false;\n defaultFixture.props.answers[1] = {\n ...defaultFixture.props.answers[1],\n onClick: () => {\n answerWasClicked = true;\n }\n };\n\n const wrapper = shallow(<QCMImage {...defaultFixture.props} />, {\n context: {translate}\n });\n\n const answersImages = wrapper.find('[data-name=\"answerImage\"]');\n t.true(answersImages.at(1).exists());\n t.is(answersImages.at(1).props()['aria-label'], 'Lorem ipsum');\n\n const answers = wrapper.find('[data-name=\"answerGraphic\"]');\n answers.at(1).simulate('click');\n t.true(answerWasClicked);\n t.pass();\n});\n\ntest(\"should set: selected's background to Primary w/ alpha 5% && color to primary, unselected's no background && color to a nuance of primary\", t => {\n const wrapper = shallow(<QCMImage {...defaultFixture.props} />, {\n context: {translate}\n });\n const answers = wrapper.find('[data-name=\"answerGraphic\"]');\n\n const firstAnswer = answers.at(0);\n t.true(firstAnswer.exists());\n t.deepEqual(firstAnswer.props().style, {});\n const unselectedBackgroundAnswer = firstAnswer.children().at(0);\n t.true(unselectedBackgroundAnswer.exists());\n t.deepEqual(unselectedBackgroundAnswer.props().style, {backgroundColor: '#F4F4F5'});\n const firstAnswerText = firstAnswer.children().at(1).children().at(1).children().at(0);\n t.true(firstAnswerText.exists());\n\n const thirdAnswer = answers.at(2);\n t.true(thirdAnswer.exists());\n t.deepEqual(thirdAnswer.props().style, {boxShadow: '0 4px 16px rgba(0, 122, 179, 0.25)'});\n const selectedBackgroundAnswer = thirdAnswer.children().at(0);\n t.true(selectedBackgroundAnswer.exists());\n t.deepEqual(selectedBackgroundAnswer.props().style, {backgroundColor: '#00B0FF'});\n});\n"],"file":"qcm-graphic.js"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.getShadowBoxColorFromPrimary = void 0;
|
|
5
|
+
|
|
6
|
+
var _cssColorFunction = require("css-color-function");
|
|
7
|
+
|
|
8
|
+
// darken the color down to 35% && apply alpha of 25%
|
|
9
|
+
const getShadowBoxColorFromPrimary = primaryColor => (0, _cssColorFunction.convert)(`color(${primaryColor} lightness(35%) a(25%))`);
|
|
10
|
+
|
|
11
|
+
exports.getShadowBoxColorFromPrimary = getShadowBoxColorFromPrimary;
|
|
12
|
+
//# sourceMappingURL=get-shadow-box-color-from-primary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/util/get-shadow-box-color-from-primary.js"],"names":["getShadowBoxColorFromPrimary","primaryColor"],"mappings":";;;;;AAAA;;AAEA;AACO,MAAMA,4BAA4B,GAAGC,YAAY,IACtD,+BAAS,SAAQA,YAAa,yBAA9B,CADK","sourcesContent":["import {convert} from 'css-color-function';\n\n// darken the color down to 35% && apply alpha of 25%\nexport const getShadowBoxColorFromPrimary = primaryColor =>\n convert(`color(${primaryColor} lightness(35%) a(25%))`);\n"],"file":"get-shadow-box-color-from-primary.js"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _ava = _interopRequireDefault(require("ava"));
|
|
4
|
+
|
|
5
|
+
var _forEach = _interopRequireDefault(require("lodash/fp/forEach"));
|
|
6
|
+
|
|
7
|
+
var _getShadowBoxColorFromPrimary = require("../get-shadow-box-color-from-primary");
|
|
8
|
+
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
|
|
11
|
+
(0, _ava.default)('should return transformed colors', t => {
|
|
12
|
+
t.plan(13);
|
|
13
|
+
const expectedOrange = 'rgba(179, 42, 0, 0.25)';
|
|
14
|
+
const expectedRed = 'rgba(179, 0, 0, 0.25)';
|
|
15
|
+
const expectedYellow = 'rgba(179, 140, 0, 0.25)';
|
|
16
|
+
const expectedBlue = 'rgba(0, 68, 179, 0.25)'; // a set of possible primary/brand colors
|
|
17
|
+
|
|
18
|
+
const primaryColors = {
|
|
19
|
+
orange: ['#ff6f43', expectedOrange],
|
|
20
|
+
// original, expected
|
|
21
|
+
orangeRGB: ['rgb(255, 111, 67)', expectedOrange],
|
|
22
|
+
orangeRGBA: ['rgba(255, 111, 67, 0)', expectedOrange],
|
|
23
|
+
red: ['#FF0A0A', expectedRed],
|
|
24
|
+
redRGB: ['rgb(255, 10, 10)', expectedRed],
|
|
25
|
+
redRGBA: ['rgba(255, 10, 10, 0)', expectedRed],
|
|
26
|
+
yellow: ['#ffca0a', expectedYellow],
|
|
27
|
+
yellowRGB: ['rgb(255, 202, 10)', expectedYellow],
|
|
28
|
+
yellowRGBA: ['rgba(255, 202, 10, 0)', expectedYellow],
|
|
29
|
+
blue: ['#0061FF', expectedBlue],
|
|
30
|
+
blueRGB: ['rgb(0, 97, 255)', expectedBlue],
|
|
31
|
+
blueRGBA: ['rgba(0, 97, 255, 1)', expectedBlue]
|
|
32
|
+
};
|
|
33
|
+
(0, _forEach.default)(color => {
|
|
34
|
+
const [original, expected] = color;
|
|
35
|
+
const boxShadowColor = (0, _getShadowBoxColorFromPrimary.getShadowBoxColorFromPrimary)(original);
|
|
36
|
+
t.is(boxShadowColor, expected);
|
|
37
|
+
}, primaryColors);
|
|
38
|
+
t.pass();
|
|
39
|
+
});
|
|
40
|
+
//# sourceMappingURL=get-shadow-box-color-from-primary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/util/test/get-shadow-box-color-from-primary.js"],"names":["t","plan","expectedOrange","expectedRed","expectedYellow","expectedBlue","primaryColors","orange","orangeRGB","orangeRGBA","red","redRGB","redRGBA","yellow","yellowRGB","yellowRGBA","blue","blueRGB","blueRGBA","color","original","expected","boxShadowColor","is","pass"],"mappings":";;AAAA;;AACA;;AAEA;;;;AAEA,kBAAK,kCAAL,EAAyCA,CAAC,IAAI;AAC5CA,EAAAA,CAAC,CAACC,IAAF,CAAO,EAAP;AACA,QAAMC,cAAc,GAAG,wBAAvB;AACA,QAAMC,WAAW,GAAG,uBAApB;AACA,QAAMC,cAAc,GAAG,yBAAvB;AACA,QAAMC,YAAY,GAAG,wBAArB,CAL4C,CAM5C;;AACA,QAAMC,aAAa,GAAG;AACpBC,IAAAA,MAAM,EAAE,CAAC,SAAD,EAAYL,cAAZ,CADY;AACiB;AACrCM,IAAAA,SAAS,EAAE,CAAC,mBAAD,EAAsBN,cAAtB,CAFS;AAGpBO,IAAAA,UAAU,EAAE,CAAC,uBAAD,EAA0BP,cAA1B,CAHQ;AAIpBQ,IAAAA,GAAG,EAAE,CAAC,SAAD,EAAYP,WAAZ,CAJe;AAKpBQ,IAAAA,MAAM,EAAE,CAAC,kBAAD,EAAqBR,WAArB,CALY;AAMpBS,IAAAA,OAAO,EAAE,CAAC,sBAAD,EAAyBT,WAAzB,CANW;AAOpBU,IAAAA,MAAM,EAAE,CAAC,SAAD,EAAYT,cAAZ,CAPY;AAQpBU,IAAAA,SAAS,EAAE,CAAC,mBAAD,EAAsBV,cAAtB,CARS;AASpBW,IAAAA,UAAU,EAAE,CAAC,uBAAD,EAA0BX,cAA1B,CATQ;AAUpBY,IAAAA,IAAI,EAAE,CAAC,SAAD,EAAYX,YAAZ,CAVc;AAWpBY,IAAAA,OAAO,EAAE,CAAC,iBAAD,EAAoBZ,YAApB,CAXW;AAYpBa,IAAAA,QAAQ,EAAE,CAAC,qBAAD,EAAwBb,YAAxB;AAZU,GAAtB;AAeA,wBAAQc,KAAK,IAAI;AACf,UAAM,CAACC,QAAD,EAAWC,QAAX,IAAuBF,KAA7B;AACA,UAAMG,cAAc,GAAG,gEAA6BF,QAA7B,CAAvB;AACApB,IAAAA,CAAC,CAACuB,EAAF,CAAKD,cAAL,EAAqBD,QAArB;AACD,GAJD,EAIGf,aAJH;AAMAN,EAAAA,CAAC,CAACwB,IAAF;AACD,CA7BD","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/fp/forEach';\n\nimport {getShadowBoxColorFromPrimary} from '../get-shadow-box-color-from-primary';\n\ntest('should return transformed colors', t => {\n t.plan(13);\n const expectedOrange = 'rgba(179, 42, 0, 0.25)';\n const expectedRed = 'rgba(179, 0, 0, 0.25)';\n const expectedYellow = 'rgba(179, 140, 0, 0.25)';\n const expectedBlue = 'rgba(0, 68, 179, 0.25)';\n // a set of possible primary/brand colors\n const primaryColors = {\n orange: ['#ff6f43', expectedOrange], // original, expected\n orangeRGB: ['rgb(255, 111, 67)', expectedOrange],\n orangeRGBA: ['rgba(255, 111, 67, 0)', expectedOrange],\n red: ['#FF0A0A', expectedRed],\n redRGB: ['rgb(255, 10, 10)', expectedRed],\n redRGBA: ['rgba(255, 10, 10, 0)', expectedRed],\n yellow: ['#ffca0a', expectedYellow],\n yellowRGB: ['rgb(255, 202, 10)', expectedYellow],\n yellowRGBA: ['rgba(255, 202, 10, 0)', expectedYellow],\n blue: ['#0061FF', expectedBlue],\n blueRGB: ['rgb(0, 97, 255)', expectedBlue],\n blueRGBA: ['rgba(0, 97, 255, 1)', expectedBlue]\n };\n\n forEach(color => {\n const [original, expected] = color;\n const boxShadowColor = getShadowBoxColorFromPrimary(original);\n t.is(boxShadowColor, expected);\n }, primaryColors);\n\n t.pass();\n});\n"],"file":"get-shadow-box-color-from-primary.js"}
|
package/lib/variables/colors.css
CHANGED
|
@@ -30,8 +30,10 @@
|
|
|
30
30
|
@value cm_blue_50: #f1f6fe;
|
|
31
31
|
@value cm_blue_200: #74A5F6;
|
|
32
32
|
@value cm_blue_600: #0051d6;
|
|
33
|
+
@value cm_blue_900: #06265B;
|
|
33
34
|
@value cm_bleu_article: #365FCD;
|
|
34
35
|
@value cm_grey_50: #FAFAFA;
|
|
36
|
+
@value cm_grey_75: #F4F4F5;
|
|
35
37
|
@value cm_grey_100: #EAEAEB;
|
|
36
38
|
@value cm_grey_150: #E1E1E3;
|
|
37
39
|
@value cm_grey_200: #d7d7da;
|
|
@@ -59,3 +61,4 @@
|
|
|
59
61
|
@value cm_red_video: #E8335E;
|
|
60
62
|
@value cm_violet_podcast: #432ba7;
|
|
61
63
|
@value cm_warning_50: rgba(255, 192, 67, 0.13);
|
|
64
|
+
@value box_shadow_light_dark: rgba(0, 0, 0, 0.12);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coorpacademy/components",
|
|
3
|
-
"version": "10.5.
|
|
3
|
+
"version": "10.5.7-alpha.3+5dc62490c",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -119,5 +119,5 @@
|
|
|
119
119
|
"webpack-hot-middleware": "^2.25.0"
|
|
120
120
|
},
|
|
121
121
|
"author": "CoorpAcademy",
|
|
122
|
-
"gitHead": "
|
|
122
|
+
"gitHead": "5dc62490ce9363f4fcb41ab111d94b4d054cc187"
|
|
123
123
|
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import test from 'ava';
|
|
2
|
-
import forEach from 'lodash/forEach';
|
|
3
|
-
import renderComponentMacro from '../../../test/helpers/render-component';
|
|
4
|
-
import MoleculeSearch from '..';
|
|
5
|
-
import fixtureDefault from './fixtures/default';
|
|
6
|
-
import fixtureWithValue from './fixtures/with-value';
|
|
7
|
-
test('Molecule › MoleculeSearch > should have valid propTypes', t => {
|
|
8
|
-
t.pass();
|
|
9
|
-
forEach(MoleculeSearch.propTypes, (value, key) => {
|
|
10
|
-
t.not(value, undefined, `PropType for "Molecule.MoleculeSearch.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
11
|
-
});
|
|
12
|
-
});
|
|
13
|
-
test('Molecule › MoleculeSearch › Default › should be rendered', renderComponentMacro, MoleculeSearch, fixtureDefault);
|
|
14
|
-
test('Molecule › MoleculeSearch › WithValue › should be rendered', renderComponentMacro, MoleculeSearch, fixtureWithValue);
|
|
15
|
-
//# sourceMappingURL=fixtures.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/molecule/search/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeSearch","fixtureDefault","fixtureWithValue","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,cAAP,MAA2B,IAA3B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,gBAAP,MAA6B,uBAA7B;AAEAL,IAAI,CAAC,yDAAD,EAA4DM,CAAC,IAAI;AACnEA,EAAAA,CAAC,CAACC,IAAF;AACAN,EAAAA,OAAO,CAACE,cAAc,CAACK,SAAhB,EAA2B,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAChDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,mDAAkDF,GAAI,mEAA/E;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAV,IAAI,CAAC,0DAAD,EAA6DE,oBAA7D,EAAmFC,cAAnF,EAAmGC,cAAnG,CAAJ;AACAJ,IAAI,CAAC,4DAAD,EAA+DE,oBAA/D,EAAqFC,cAArF,EAAqGE,gBAArG,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeSearch from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureWithValue from './fixtures/with-value';\n\ntest('Molecule › MoleculeSearch > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeSearch.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeSearch.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeSearch › Default › should be rendered', renderComponentMacro, MoleculeSearch, fixtureDefault);\ntest('Molecule › MoleculeSearch › WithValue › should be rendered', renderComponentMacro, MoleculeSearch, fixtureWithValue);\n"],"file":"fixtures.js"}
|
|
@@ -1,25 +0,0 @@
|
|
|
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 _withValue = _interopRequireDefault(require("./fixtures/with-value"));
|
|
14
|
-
|
|
15
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
-
|
|
17
|
-
(0, _ava.default)('Molecule › MoleculeSearch > should have valid propTypes', t => {
|
|
18
|
-
t.pass();
|
|
19
|
-
(0, _forEach.default)(_.default.propTypes, (value, key) => {
|
|
20
|
-
t.not(value, undefined, `PropType for "Molecule.MoleculeSearch.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
21
|
-
});
|
|
22
|
-
});
|
|
23
|
-
(0, _ava.default)('Molecule › MoleculeSearch › Default › should be rendered', _renderComponent.default, _.default, _default.default);
|
|
24
|
-
(0, _ava.default)('Molecule › MoleculeSearch › WithValue › should be rendered', _renderComponent.default, _.default, _withValue.default);
|
|
25
|
-
//# sourceMappingURL=fixtures.js.map
|