@coorpacademy/components 10.5.5 → 10.5.7-alpha.6.5

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.
Files changed (117) hide show
  1. package/es/atom/range/handle.css +18 -2
  2. package/es/atom/range/handle.js +7 -3
  3. package/es/atom/range/handle.js.map +1 -1
  4. package/es/atom/range/style.css +2 -2
  5. package/es/molecule/cockpit-popin/test/fixtures.js +17 -0
  6. package/es/molecule/cockpit-popin/test/fixtures.js.map +1 -0
  7. package/es/molecule/course-section/index.js +5 -3
  8. package/es/molecule/course-section/index.js.map +1 -1
  9. package/es/molecule/course-section/style.css +2 -1
  10. package/es/molecule/course-section/test/fixtures/chapter.js +2 -1
  11. package/es/molecule/course-section/test/fixtures/chapter.js.map +1 -1
  12. package/es/molecule/course-section/test/fixtures/course.js +2 -1
  13. package/es/molecule/course-section/test/fixtures/course.js.map +1 -1
  14. package/es/molecule/course-sections/index.js +40 -0
  15. package/es/molecule/course-sections/index.js.map +1 -0
  16. package/es/molecule/course-sections/style.css +3 -0
  17. package/es/molecule/course-sections/test/fixtures/default.js +149 -0
  18. package/es/molecule/course-sections/test/fixtures/default.js.map +1 -0
  19. package/es/molecule/course-sections/test/fixtures/loading.js +9 -0
  20. package/es/molecule/course-sections/test/fixtures/loading.js.map +1 -0
  21. package/es/molecule/draggable/index.js +1 -1
  22. package/es/molecule/draggable/index.js.map +1 -1
  23. package/es/molecule/draggable/style.css +1 -5
  24. package/es/molecule/draggable-list/index.js +6 -4
  25. package/es/molecule/draggable-list/index.js.map +1 -1
  26. package/es/molecule/draggable-list/test/fixtures/course-sections.js +20 -0
  27. package/es/molecule/draggable-list/test/fixtures/course-sections.js.map +1 -0
  28. package/es/molecule/draggable-list/test/on-drop.js +13 -13
  29. package/es/molecule/draggable-list/test/on-drop.js.map +1 -1
  30. package/es/molecule/questions/qcm/index.js +37 -25
  31. package/es/molecule/questions/qcm/index.js.map +1 -1
  32. package/es/molecule/questions/qcm/style.css +48 -14
  33. package/es/molecule/questions/qcm/test/fixtures/default.js +8 -0
  34. package/es/molecule/questions/qcm/test/fixtures/default.js.map +1 -1
  35. package/es/molecule/questions/qcm/test/qcm.js +103 -0
  36. package/es/molecule/questions/qcm/test/qcm.js.map +1 -0
  37. package/es/molecule/questions/qcm-graphic/index.js +35 -17
  38. package/es/molecule/questions/qcm-graphic/index.js.map +1 -1
  39. package/es/molecule/questions/qcm-graphic/style.css +64 -13
  40. package/es/molecule/questions/qcm-graphic/test/qcm-graphic.js +65 -0
  41. package/es/molecule/questions/qcm-graphic/test/qcm-graphic.js.map +1 -0
  42. package/es/molecule/questions/question-range/style.css +9 -8
  43. package/es/molecule/setup-section/style.css +1 -0
  44. package/es/molecule/wizard-summary/test/fixtures/organize-courses.js +106 -0
  45. package/es/molecule/wizard-summary/test/fixtures/organize-courses.js.map +1 -0
  46. package/es/organism/wizard-contents/index.js +6 -0
  47. package/es/organism/wizard-contents/index.js.map +1 -1
  48. package/es/organism/wizard-contents/test/fixtures/playlist-organize-courses.js +45 -0
  49. package/es/organism/wizard-contents/test/fixtures/playlist-organize-courses.js.map +1 -0
  50. package/es/template/back-office/brand-update/test/fixtures/wizard-organize-courses-playlist.js +22 -0
  51. package/es/template/back-office/brand-update/test/fixtures/wizard-organize-courses-playlist.js.map +1 -0
  52. package/es/util/get-shadow-box-color-from-primary.js +4 -0
  53. package/es/util/get-shadow-box-color-from-primary.js.map +1 -0
  54. package/es/util/test/get-shadow-box-color-from-primary.js +33 -0
  55. package/es/util/test/get-shadow-box-color-from-primary.js.map +1 -0
  56. package/es/variables/colors.css +3 -0
  57. package/lib/atom/range/handle.css +18 -2
  58. package/lib/atom/range/handle.js +8 -3
  59. package/lib/atom/range/handle.js.map +1 -1
  60. package/lib/atom/range/style.css +2 -2
  61. package/lib/molecule/cockpit-popin/test/fixtures.js +28 -0
  62. package/lib/molecule/cockpit-popin/test/fixtures.js.map +1 -0
  63. package/lib/molecule/course-section/index.js +5 -3
  64. package/lib/molecule/course-section/index.js.map +1 -1
  65. package/lib/molecule/course-section/style.css +2 -1
  66. package/lib/molecule/course-section/test/fixtures/chapter.js +2 -1
  67. package/lib/molecule/course-section/test/fixtures/chapter.js.map +1 -1
  68. package/lib/molecule/course-section/test/fixtures/course.js +2 -1
  69. package/lib/molecule/course-section/test/fixtures/course.js.map +1 -1
  70. package/lib/molecule/course-sections/index.js +54 -0
  71. package/lib/molecule/course-sections/index.js.map +1 -0
  72. package/lib/molecule/course-sections/style.css +3 -0
  73. package/lib/molecule/course-sections/test/fixtures/default.js +154 -0
  74. package/lib/molecule/course-sections/test/fixtures/default.js.map +1 -0
  75. package/lib/molecule/course-sections/test/fixtures/loading.js +14 -0
  76. package/lib/molecule/course-sections/test/fixtures/loading.js.map +1 -0
  77. package/lib/molecule/draggable/index.js +1 -1
  78. package/lib/molecule/draggable/index.js.map +1 -1
  79. package/lib/molecule/draggable/style.css +1 -5
  80. package/lib/molecule/draggable-list/index.js +7 -4
  81. package/lib/molecule/draggable-list/index.js.map +1 -1
  82. package/lib/molecule/draggable-list/test/fixtures/course-sections.js +29 -0
  83. package/lib/molecule/draggable-list/test/fixtures/course-sections.js.map +1 -0
  84. package/lib/molecule/draggable-list/test/on-drop.js +13 -13
  85. package/lib/molecule/draggable-list/test/on-drop.js.map +1 -1
  86. package/lib/molecule/questions/qcm/index.js +44 -23
  87. package/lib/molecule/questions/qcm/index.js.map +1 -1
  88. package/lib/molecule/questions/qcm/style.css +48 -14
  89. package/lib/molecule/questions/qcm/test/fixtures/default.js +8 -0
  90. package/lib/molecule/questions/qcm/test/fixtures/default.js.map +1 -1
  91. package/lib/molecule/questions/qcm/test/qcm.js +115 -0
  92. package/lib/molecule/questions/qcm/test/qcm.js.map +1 -0
  93. package/lib/molecule/questions/qcm-graphic/index.js +33 -15
  94. package/lib/molecule/questions/qcm-graphic/index.js.map +1 -1
  95. package/lib/molecule/questions/qcm-graphic/style.css +64 -13
  96. package/lib/molecule/questions/qcm-graphic/test/qcm-graphic.js +76 -0
  97. package/lib/molecule/questions/qcm-graphic/test/qcm-graphic.js.map +1 -0
  98. package/lib/molecule/questions/question-range/style.css +9 -8
  99. package/lib/molecule/setup-section/style.css +1 -0
  100. package/lib/molecule/wizard-summary/test/fixtures/organize-courses.js +111 -0
  101. package/lib/molecule/wizard-summary/test/fixtures/organize-courses.js.map +1 -0
  102. package/lib/organism/wizard-contents/index.js +7 -0
  103. package/lib/organism/wizard-contents/index.js.map +1 -1
  104. package/lib/organism/wizard-contents/test/fixtures/playlist-organize-courses.js +54 -0
  105. package/lib/organism/wizard-contents/test/fixtures/playlist-organize-courses.js.map +1 -0
  106. package/lib/template/back-office/brand-update/test/fixtures/wizard-organize-courses-playlist.js +32 -0
  107. package/lib/template/back-office/brand-update/test/fixtures/wizard-organize-courses-playlist.js.map +1 -0
  108. package/lib/util/get-shadow-box-color-from-primary.js +12 -0
  109. package/lib/util/get-shadow-box-color-from-primary.js.map +1 -0
  110. package/lib/util/test/get-shadow-box-color-from-primary.js +40 -0
  111. package/lib/util/test/get-shadow-box-color-from-primary.js.map +1 -0
  112. package/lib/variables/colors.css +3 -0
  113. package/package.json +2 -2
  114. package/es/molecule/draggable-list/test/fixtures.js +0 -13
  115. package/es/molecule/draggable-list/test/fixtures.js.map +0 -1
  116. package/lib/molecule/draggable-list/test/fixtures.js +0 -22
  117. package/lib/molecule/draggable-list/test/fixtures.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/molecule/questions/qcm-graphic/index.js"],"names":["React","PropTypes","classnames","Provider","innerHTML","style","QCMImage","props","context","answers","answersViews","map","answer","key","onClick","title","selected","image","skin","primarySkinColor","selectedStyle","backgroundColor","borderColor","imageWrapper","backgroundImage","titleWrapper","__html","wrapper","contextTypes","childContextTypes","propTypes","arrayOf","shape","string","bool","func"],"mappings":";AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,UAAP,MAAuB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AAAK,iBAAU,qBAAf;AAAqC,IAAA,SAAS,EAAEV,KAAK,CAACsB;AAAtD,KACGjB,YADH,CADF;AAKD,CAxCD;;AA0CAJ,QAAQ,CAACsB,YAAT,GAAwB;AACtBV,EAAAA,IAAI,EAAEf,QAAQ,CAAC0B,iBAAT,CAA2BX;AADX,CAAxB;AAIAZ,QAAQ,CAACwB,SAAT,2CAAqB;AACnBrB,EAAAA,OAAO,EAAER,SAAS,CAAC8B,OAAV,CACP9B,SAAS,CAAC+B,KAAV,CAAgB;AACdjB,IAAAA,KAAK,EAAEd,SAAS,CAACgC,MADH;AAEdjB,IAAAA,QAAQ,EAAEf,SAAS,CAACiC,IAFN;AAGdpB,IAAAA,OAAO,EAAEb,SAAS,CAACkC,IAHL;AAIdlB,IAAAA,KAAK,EAAEhB,SAAS,CAACgC;AAJH,GAAhB,CADO;AADU,CAArB;AAWA,eAAe3B,QAAf","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 style from './style.css';\n\nconst QCMImage = (props, context) => {\n const {answers} = props;\n\n const answersViews = answers.map((answer, key) => {\n const {onClick, title, selected, image} = answer;\n const {skin} = context;\n\n const primarySkinColor = getOr('#00B0FF', 'common.primary', skin);\n const selectedStyle = selected\n ? {backgroundColor: primarySkinColor, borderColor: primarySkinColor}\n : null;\n return (\n <div\n className={selected ? style.selected : style.answer}\n onClick={onClick}\n data-selected={selected}\n style={selectedStyle}\n key={key}\n >\n <div\n className={style.imageWrapper}\n data-name=\"answerGraphic\"\n style={{\n backgroundImage: `url(${image})`\n }}\n />\n <div\n className={classnames(style.titleWrapper, innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\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 })\n )\n};\n\nexport default QCMImage;\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../../src/molecule/questions/qcm-graphic/index.js"],"names":["React","PropTypes","classnames","Provider","innerHTML","getShadowBoxColorFromPrimary","style","QCMImage","props","context","answers","skin","primarySkinColor","answersViews","map","answer","key","onClick","title","selected","image","ariaLabel","boxShadow","backgroundColor","background","content","imageWrapper","backgroundImage","titleWrapper","__html","wrapper","contextTypes","childContextTypes","propTypes","arrayOf","shape","string","bool","func"],"mappings":";;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,QAAP,MAAqB,wBAArB;AACA,SAAQC,SAAR,QAAwB,+BAAxB;AACA,SAAQC,4BAAR,QAA2C,iDAA3C;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,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,OAAM,SAAN,EAAiB,gBAAjB,EAAmCD,IAAnC,CAAzB;;AAEA,QAAME,YAAY,GAAGH,OAAO,CAACI,GAAR,CAAY,CAACC,MAAD,EAASC,GAAT,KAAiB;AAChD,UAAM;AAACC,MAAAA,OAAD;AAAUC,MAAAA,KAAV;AAAiBC,MAAAA,QAAjB;AAA2BC,MAAAA,KAA3B;AAAkCC,MAAAA;AAAlC,QAA+CN,MAArD;AAEA,wBACE;AACE,MAAA,OAAO,EAAEE,OADX;AAEE,uBAAeE,QAFjB;AAGE,mBAAU,eAHZ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CAACiC,OAAV,CACPjC,SAAS,CAACkC,KAAV,CAAgB;AACdjB,IAAAA,KAAK,EAAEjB,SAAS,CAACmC,MADH;AAEdjB,IAAAA,QAAQ,EAAElB,SAAS,CAACoC,IAFN;AAGdpB,IAAAA,OAAO,EAAEhB,SAAS,CAACqC,IAHL;AAIdlB,IAAAA,KAAK,EAAEnB,SAAS,CAACmC,MAJH;AAKdf,IAAAA,SAAS,EAAEpB,SAAS,CAACmC;AALP,GAAhB,CADO;AADU,CAArB;AAYA,eAAe7B,QAAf","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 // 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,10 @@
2
2
  @value mobile from breakpoints;
3
3
  @value colors: "../../../variables/colors.css";
4
4
  @value white from colors;
5
- @value xtraLightGrey from colors;
6
- @value light from colors;
7
5
  @value black from colors;
6
+ @value cm_grey_75 from colors;
7
+ @value cm_primary_blue from colors;
8
+ @value cm_blue_900 from colors;
8
9
 
9
10
  .wrapper {
10
11
  display: flex;
@@ -15,16 +16,34 @@
15
16
  }
16
17
 
17
18
  .answer {
18
- color: black;
19
+ position: relative;
20
+ color: cm_blue_900;
19
21
  background-color: white;
20
- border: 1px solid color(black lightness(85%));
21
- border-radius: 3px;
22
22
  box-sizing: border-box;
23
23
  cursor: pointer;
24
24
  padding: 8px;
25
25
  width: 200px;
26
26
  min-height: 245px;
27
27
  margin: 0 4px 8px;
28
+ box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.12);
29
+ border-radius: 16px;
30
+ transition: background-color 0.25s linear;
31
+ }
32
+
33
+ .background {
34
+ top: 0;
35
+ left: 0;
36
+ position: absolute;
37
+ border-radius: 16px;
38
+ height: 100%;
39
+ width: 100%;
40
+ transition: opacity 0.25s linear, background-color 0.25s linear;
41
+ }
42
+
43
+ .content {
44
+ height: 100%;
45
+ width: 100%;
46
+ position: relative;
28
47
  }
29
48
 
30
49
  .imageWrapper {
@@ -33,12 +52,21 @@
33
52
  align-items: center;
34
53
  height: 110px;
35
54
  margin-bottom: 16px;
36
- background-size: contain;
55
+ background-size: cover;
37
56
  background-repeat: no-repeat;
38
57
  background-position: center center;
58
+ border-radius: 12px;
39
59
  }
40
60
 
41
61
  .titleWrapper {
62
+ display: flex;
63
+ height: calc(100% - 126px);
64
+ width: 100%;
65
+ align-items: center;
66
+ justify-content: center;
67
+ }
68
+
69
+ .title {
42
70
  font-family: 'Gilroy';
43
71
  font-size: 17px;
44
72
  line-height: 20px;
@@ -49,7 +77,16 @@
49
77
  }
50
78
 
51
79
  .answer:hover {
52
- background-color: xtraLightGrey;
80
+ background: cm_grey_75;
81
+ box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.12);
82
+ }
83
+
84
+ .answer .background{
85
+ opacity: 0;
86
+ }
87
+
88
+ .answer:hover .background{
89
+ opacity: 1;
53
90
  }
54
91
 
55
92
  .selected {
@@ -57,10 +94,23 @@
57
94
  color: white;
58
95
  }
59
96
 
97
+ .selected .background{
98
+ opacity: 1;
99
+ }
100
+
101
+ .selected:hover .background{
102
+ opacity: 0.8;
103
+ }
104
+
105
+ .selected.answer:hover {
106
+ background-color: black;
107
+ }
108
+
60
109
  @media mobile {
61
110
  .wrapper {
62
111
  flex-direction: column;
63
- align-items: stretch;
112
+ display: flex;
113
+ align-items: center;
64
114
  width: 100%;
65
115
  padding-bottom: 0;
66
116
  }
@@ -69,17 +119,18 @@
69
119
  display: flex;
70
120
  align-items: center;
71
121
  flex-flow: row nowrap;
72
- width: 100%;
122
+ width: calc(100% - 45px);
73
123
  min-height: 82px;
74
124
  height: inherit;
75
125
  margin: 0 0 8px;
76
126
  overflow: hidden;
77
127
  }
78
128
 
79
- .answer:hover {
80
- background-color: white;
129
+ .content {
130
+ display: flex;
131
+ align-items: center;
81
132
  }
82
-
133
+
83
134
  .answer:last-child {
84
135
  margin-bottom: 0;
85
136
  }
@@ -96,7 +147,7 @@
96
147
  white-space: wrap;
97
148
  overflow: hidden;
98
149
  padding: 0;
99
- text-align: left;
150
+ justify-content: left;
100
151
  font-size: 15px;
101
152
  }
102
153
  }
@@ -0,0 +1,65 @@
1
+ import _identity from "lodash/fp/identity";
2
+
3
+ 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); }
4
+
5
+ import browserEnv from 'browser-env';
6
+ import test from 'ava';
7
+ import React from 'react';
8
+ import { shallow, configure } from 'enzyme';
9
+ import Adapter from 'enzyme-adapter-react-16';
10
+ import QCMImage from '..';
11
+ import defaultFixture from './fixtures/default';
12
+ browserEnv();
13
+ configure({
14
+ adapter: new Adapter()
15
+ });
16
+ const translate = _identity;
17
+ test('onClick should be reachable, should match given aria-label', t => {
18
+ let answerWasClicked = false;
19
+ defaultFixture.props.answers[1] = _extends(_extends({}, defaultFixture.props.answers[1]), {}, {
20
+ onClick: () => {
21
+ answerWasClicked = true;
22
+ }
23
+ });
24
+ const wrapper = shallow( /*#__PURE__*/React.createElement(QCMImage, defaultFixture.props), {
25
+ context: {
26
+ translate
27
+ }
28
+ });
29
+ const answersImages = wrapper.find('[data-name="answerImage"]');
30
+ t.true(answersImages.at(1).exists());
31
+ t.is(answersImages.at(1).props()['aria-label'], 'Lorem ipsum');
32
+ const answers = wrapper.find('[data-name="answerGraphic"]');
33
+ answers.at(1).simulate('click');
34
+ t.true(answerWasClicked);
35
+ t.pass();
36
+ });
37
+ test("should set: selected's background to Primary, unselected's no background", t => {
38
+ const wrapper = shallow( /*#__PURE__*/React.createElement(QCMImage, defaultFixture.props), {
39
+ context: {
40
+ translate
41
+ }
42
+ });
43
+ const answers = wrapper.find('[data-name="answerGraphic"]');
44
+ const firstAnswer = answers.at(0);
45
+ t.true(firstAnswer.exists());
46
+ t.deepEqual(firstAnswer.props().style, {});
47
+ const unselectedBackgroundAnswer = firstAnswer.children().at(0);
48
+ t.true(unselectedBackgroundAnswer.exists());
49
+ t.deepEqual(unselectedBackgroundAnswer.props().style, {
50
+ backgroundColor: '#F4F4F5'
51
+ });
52
+ const firstAnswerText = firstAnswer.children().at(1).children().at(1).children().at(0);
53
+ t.true(firstAnswerText.exists());
54
+ const thirdAnswer = answers.at(2);
55
+ t.true(thirdAnswer.exists());
56
+ t.deepEqual(thirdAnswer.props().style, {
57
+ boxShadow: '0 4px 16px rgba(0, 122, 179, 0.25)'
58
+ });
59
+ const selectedBackgroundAnswer = thirdAnswer.children().at(0);
60
+ t.true(selectedBackgroundAnswer.exists());
61
+ t.deepEqual(selectedBackgroundAnswer.props().style, {
62
+ backgroundColor: '#00B0FF'
63
+ });
64
+ });
65
+ //# sourceMappingURL=qcm-graphic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/molecule/questions/qcm-graphic/test/qcm-graphic.js"],"names":["browserEnv","test","React","shallow","configure","Adapter","QCMImage","defaultFixture","adapter","translate","t","answerWasClicked","props","answers","onClick","wrapper","context","answersImages","find","true","at","exists","is","simulate","pass","firstAnswer","deepEqual","style","unselectedBackgroundAnswer","children","backgroundColor","firstAnswerText","thirdAnswer","boxShadow","selectedBackgroundAnswer"],"mappings":";;;;AAAA,OAAOA,UAAP,MAAuB,aAAvB;AACA,OAAOC,IAAP,MAAiB,KAAjB;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,SAAQC,OAAR,EAAiBC,SAAjB,QAAiC,QAAjC;AAEA,OAAOC,OAAP,MAAoB,yBAApB;AACA,OAAOC,QAAP,MAAqB,IAArB;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AAEAP,UAAU;AACVI,SAAS,CAAC;AAACI,EAAAA,OAAO,EAAE,IAAIH,OAAJ;AAAV,CAAD,CAAT;AACA,MAAMI,SAAS,YAAf;AAEAR,IAAI,CAAC,4DAAD,EAA+DS,CAAC,IAAI;AACtE,MAAIC,gBAAgB,GAAG,KAAvB;AACAJ,EAAAA,cAAc,CAACK,KAAf,CAAqBC,OAArB,CAA6B,CAA7B,0BACKN,cAAc,CAACK,KAAf,CAAqBC,OAArB,CAA6B,CAA7B,CADL;AAEEC,IAAAA,OAAO,EAAE,MAAM;AACbH,MAAAA,gBAAgB,GAAG,IAAnB;AACD;AAJH;AAOA,QAA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nC;AACAV,EAAAA,CAAC,CAACS,IAAF,CAAOS,0BAA0B,CAACP,MAA3B,EAAP;AACAX,EAAAA,CAAC,CAACgB,SAAF,CAAYE,0BAA0B,CAAChB,KAA3B,GAAmCe,KAA/C,EAAsD;AAACG,IAAAA,eAAe,EAAE;AAAlB,GAAtD;AACA,QAAMC,eAAe,GAAGN,WAAW,CAACI,QAAZ,GAAuBT,EAAvB,CAA0B,CAA1B,EAA6BS,QAA7B,GAAwCT,EAAxC,CAA2C,CAA3C,EAA8CS,QAA9C,GAAyDT,EAAzD,CAA4D,CAA5D,CAAxB;AACAV,EAAAA,CAAC,CAACS,IAAF,CAAOY,eAAe,CAACV,MAAhB,EAAP;AAEA,QAAMW,WAAW,GAAGnB,OAAO,CAACO,EAAR,CAAW,CAAX,CAApB;AACAV,EAAAA,CAAC,CAACS,IAAF,CAAOa,WAAW,CAACX,MAAZ,EAAP;AACAX,EAAAA,CAAC,CAACgB,SAAF,CAAYM,WAAW,CAACpB,KAAZ,GAAoBe,KAAhC,EAAuC;AAACM,IAAAA,SAAS,EAAE;AAAZ,GAAvC;AACA,QAAMC,wBAAwB,GAAGF,WAAW,CAACH,QAAZ,GAAuBT,EAAvB,CAA0B,CAA1B,CAAjC;AACAV,EAAAA,CAAC,CAACS,IAAF,CAAOe,wBAAwB,CAACb,MAAzB,EAAP;AACAX,EAAAA,CAAC,CAACgB,SAAF,CAAYQ,wBAAwB,CAACtB,KAAzB,GAAiCe,KAA7C,EAAoD;AAACG,IAAAA,eAAe,EAAE;AAAlB,GAApD;AACD,CArBG,CAAJ","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, unselected's no background\", 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"}
@@ -1,19 +1,18 @@
1
1
  @value breakpoints: "../../../variables/breakpoints.css";
2
2
  @value mobile from breakpoints;
3
3
  @value colors: "../../../variables/colors.css";
4
- @value brand from colors;
5
- @value black from colors;
4
+ @value cm_blue_900 from colors;
6
5
 
7
6
  .wrapper {
8
7
  width: 500px;
9
8
  }
10
9
 
11
10
  .title {
12
- color: brand;
13
11
  display: table;
14
12
  font-family: "Gilroy";
15
- font-size: 24px;
16
- font-weight: 700;
13
+ font-size: 28px;
14
+ font-weight: bold;
15
+ line-height: 36px;
17
16
  margin: 0 auto 15px;
18
17
  text-align: center;
19
18
  user-select: none;
@@ -27,11 +26,13 @@
27
26
 
28
27
  .label {
29
28
  font-family: "Gilroy";
30
- color: black;
31
- font-size: 15px;
32
- font-weight: 700;
29
+ color: cm_blue_900;
30
+ font-size: 18px;
31
+ font-weight: 600;
33
32
  display: inline-block;
33
+ line-height: 24px;
34
34
  user-select: none;
35
+ font-style: normal;
35
36
  }
36
37
 
37
38
  @media mobile {
@@ -14,6 +14,7 @@
14
14
  justify-content: space-between;
15
15
  padding: 0 24px 0 48px;
16
16
  box-sizing: border-box;
17
+ border-radius: 7px;
17
18
  }
18
19
 
19
20
  .title {
@@ -0,0 +1,106 @@
1
+ export default {
2
+ props: {
3
+ title: 'Certification summary',
4
+ sections: [{
5
+ items: [{
6
+ type: 'mainElement',
7
+ title: 'Language',
8
+ value: '🇬🇧 English'
9
+ }, {
10
+ type: 'mainElement',
11
+ title: 'Name',
12
+ value: 'Marketing expert'
13
+ }]
14
+ }, {
15
+ title: 'Translation',
16
+ items: [{
17
+ type: 'text',
18
+ text: '🇫🇷 French'
19
+ }, {
20
+ type: 'text',
21
+ text: '🇪🇸 Spanish'
22
+ }, {
23
+ type: 'text',
24
+ text: '🇮🇹 Italian'
25
+ }]
26
+ }, {
27
+ title: 'Populations',
28
+ items: [{
29
+ type: 'text',
30
+ text: 'Population 2'
31
+ }],
32
+ counterText: '1 population'
33
+ }, {
34
+ title: 'Courses',
35
+ items: [{
36
+ type: 'content',
37
+ title: 'Marketing and online advertising Marketing and online advertising Marketing and online advertising Marketing and online advertising',
38
+ author: 'Author',
39
+ category: 'course',
40
+ label: 'Course'
41
+ }, {
42
+ type: 'content',
43
+ title: 'Social networks',
44
+ author: 'Author',
45
+ category: 'chapter',
46
+ label: "5' learning"
47
+ }, {
48
+ type: 'content',
49
+ title: 'Other title',
50
+ author: 'Author 2',
51
+ category: 'course',
52
+ label: 'Course'
53
+ }, {
54
+ type: 'content',
55
+ title: 'Social others',
56
+ author: 'Author XXX',
57
+ category: 'chapter',
58
+ label: "5' learning"
59
+ }, {
60
+ type: 'content',
61
+ title: 'Social others others',
62
+ author: 'Author XXX',
63
+ label: "5' learning",
64
+ category: 'chapter'
65
+ }, {
66
+ type: 'content',
67
+ title: 'Something about empowerment',
68
+ author: 'Author XXX',
69
+ label: 'course',
70
+ category: 'course'
71
+ }, {
72
+ type: 'content',
73
+ title: 'Be a better human being',
74
+ author: 'Author XXX',
75
+ label: "5' learning",
76
+ category: 'chapter'
77
+ }, {
78
+ type: 'content',
79
+ title: 'Stronger faster better',
80
+ author: 'Author XXX',
81
+ label: 'course',
82
+ category: 'course'
83
+ }, {
84
+ type: 'content',
85
+ title: 'Relativity beyond time',
86
+ author: 'Author XXX',
87
+ label: 'course',
88
+ category: 'course'
89
+ }, {
90
+ type: 'content',
91
+ title: 'Are you awake?',
92
+ author: 'Author XXX',
93
+ label: "5' learning",
94
+ category: 'chapter'
95
+ }],
96
+ counterText: '12 courses'
97
+ }],
98
+ action: {
99
+ icon: 'save',
100
+ text: 'Save in drafts',
101
+ 'aria-label': 'Save in drafts',
102
+ onClick: () => console.log('save')
103
+ }
104
+ }
105
+ };
106
+ //# sourceMappingURL=organize-courses.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/molecule/wizard-summary/test/fixtures/organize-courses.js"],"names":["props","title","sections","items","type","value","text","counterText","author","category","label","action","icon","onClick","console","log"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,uBADF;AAELC,IAAAA,QAAQ,EAAE,CACR;AACEC,MAAAA,KAAK,EAAE,CACL;AACEC,QAAAA,IAAI,EAAE,aADR;AAEEH,QAAAA,KAAK,EAAE,UAFT;AAGEI,QAAAA,KAAK,EAAE;AAHT,OADK,EAML;AACED,QAAAA,IAAI,EAAE,aADR;AAEEH,QAAAA,KAA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AAENN,MAAAA,IAAI,EAAE,gBAFA;AAGN,oBAAc,gBAHR;AAINO,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,MAAZ;AAJT;AA1HH;AADM,CAAf","sourcesContent":["export default {\n props: {\n title: 'Certification summary',\n sections: [\n {\n items: [\n {\n type: 'mainElement',\n title: 'Language',\n value: '🇬🇧 English'\n },\n {\n type: 'mainElement',\n title: 'Name',\n value: 'Marketing expert'\n }\n ]\n },\n {\n title: 'Translation',\n items: [\n {\n type: 'text',\n text: '🇫🇷 French'\n },\n {\n type: 'text',\n text: '🇪🇸 Spanish'\n },\n {\n type: 'text',\n text: '🇮🇹 Italian'\n }\n ]\n },\n {\n title: 'Populations',\n items: [\n {\n type: 'text',\n text: 'Population 2'\n }\n ],\n counterText: '1 population'\n },\n {\n title: 'Courses',\n items: [\n {\n type: 'content',\n title:\n 'Marketing and online advertising Marketing and online advertising Marketing and online advertising Marketing and online advertising',\n author: 'Author',\n category: 'course',\n label: 'Course'\n },\n {\n type: 'content',\n title: 'Social networks',\n author: 'Author',\n category: 'chapter',\n label: \"5' learning\"\n },\n {\n type: 'content',\n title: 'Other title',\n author: 'Author 2',\n category: 'course',\n label: 'Course'\n },\n {\n type: 'content',\n title: 'Social others',\n author: 'Author XXX',\n category: 'chapter',\n label: \"5' learning\"\n },\n {\n type: 'content',\n title: 'Social others others',\n author: 'Author XXX',\n label: \"5' learning\",\n category: 'chapter'\n },\n {\n type: 'content',\n title: 'Something about empowerment',\n author: 'Author XXX',\n label: 'course',\n category: 'course'\n },\n {\n type: 'content',\n title: 'Be a better human being',\n author: 'Author XXX',\n label: \"5' learning\",\n category: 'chapter'\n },\n {\n type: 'content',\n title: 'Stronger faster better',\n author: 'Author XXX',\n label: 'course',\n category: 'course'\n },\n {\n type: 'content',\n title: 'Relativity beyond time',\n author: 'Author XXX',\n label: 'course',\n category: 'course'\n },\n {\n type: 'content',\n title: 'Are you awake?',\n author: 'Author XXX',\n label: \"5' learning\",\n category: 'chapter'\n }\n ],\n counterText: '12 courses'\n }\n ],\n action: {\n icon: 'save',\n text: 'Save in drafts',\n 'aria-label': 'Save in drafts',\n onClick: () => console.log('save')\n }\n }\n};\n"],"file":"organize-courses.js"}
@@ -11,6 +11,7 @@ import BrandForm from '../brand-form';
11
11
  import ContentTranslate from '../content-translation';
12
12
  import OrganismSearchAndChipsResults from '../search-and-chips-results';
13
13
  import CourseSelection from '../course-selection';
14
+ import CourseSections from '../../molecule/course-sections';
14
15
  import style from './style.css';
15
16
 
16
17
  const buildHeader = (wizardHeader, steps) => {
@@ -52,6 +53,9 @@ const buildForm = content => {
52
53
 
53
54
  case 'courses':
54
55
  return /*#__PURE__*/React.createElement(CourseSelection, content);
56
+
57
+ case 'organize-courses':
58
+ return /*#__PURE__*/React.createElement(CourseSections, content);
55
59
  }
56
60
  };
57
61
 
@@ -159,6 +163,8 @@ WizardContents.propTypes = process.env.NODE_ENV !== "production" ? {
159
163
  type: PropTypes.oneOf(['populations'])
160
164
  })), PropTypes.shape(_extends(_extends({}, CourseSelection.propTypes), {}, {
161
165
  type: PropTypes.oneOf(['courses'])
166
+ })), PropTypes.shape(_extends(_extends({}, CourseSections.propTypes), {}, {
167
+ type: PropTypes.oneOf(['organize-courses'])
162
168
  }))]),
163
169
  previousStep: PropTypes.shape({
164
170
  label: PropTypes.string,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/organism/wizard-contents/index.js"],"names":["React","getOr","PropTypes","ButtonLink","ButtonLinkIconOnly","WizardSteps","WizardSummary","BrandForm","ContentTranslate","OrganismSearchAndChipsResults","CourseSelection","style","buildHeader","wizardHeader","steps","title","onClick","buttonCloseIcon","size","icon","header","headerTitle","buildForm","content","type","buildButton","step","side","ICONS","previous","position","next","publish","label","buttonProps","buildActionZone","previousStep","nextStep","previousButton","nextStepType","nextButton","actionZone","button","WizardContents","props","isLoading","summary","headerView","formView","rightActionView","footerActionView","container","leftSection","form","rightSection","stickySection","summaryZone","footer","summaryFoo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,KAL2B,EAS3BjE,SAAS,CAAC4D,KAAV,uBACKrD,6BAA6B,CAACmD,SADnC;AAEEpC,IAAAA,IAAI,EAAEtB,SAAS,CAACiE,KAAV,CAAgB,CAAC,aAAD,CAAhB;AAFR,KAT2B,EAa3BjE,SAAS,CAAC4D,KAAV,uBACKpD,eAAe,CAACkD,SADrB;AAEEpC,IAAAA,IAAI,EAAEtB,SAAS,CAACiE,KAAV,CAAgB,CAAC,SAAD,CAAhB;AAFR,KAb2B,CAApB,CAVgB;AA4BzB/B,EAAAA,YAAY,EAAElC,SAAS,CAAC4D,KAAV,CAAgB;AAC5B7B,IAAAA,KAAK,EAAE/B,SAAS,CAAC6D,MADW;AAE5B/C,IAAAA,OAAO,EAAEd,SAAS,CAAC8D;AAFS,GAAhB,CA5BW;AAgCzB3B,EAAAA,QAAQ,EAAEnC,SAAS,CAAC4D,KAAV,CAAgB;AACxBtC,IAAAA,IAAI,EAAEtB,SAAS,CAACiE,KAAV,CAAgB,CAAC,MAAD,EAAS,SAAT,CAAhB,CADkB;AAExBlC,IAAAA,KAAK,EAAE/B,SAAS,CAAC6D,MAFO;AAGxB/C,IAAAA,OAAO,EAAEd,SAAS,CAAC8D;AAHK,GAAhB;AAhCe,CAA3B;AAuCA,eAAerB,cAAf","sourcesContent":["import React from 'react';\nimport getOr from 'lodash/fp/getOr';\nimport PropTypes from 'prop-types';\nimport ButtonLink from '../../atom/button-link';\nimport ButtonLinkIconOnly from '../../atom/button-link-icon-only';\nimport WizardSteps from '../../atom/wizard-steps';\nimport WizardSummary from '../../molecule/wizard-summary';\nimport BrandForm from '../brand-form';\nimport ContentTranslate from '../content-translation';\nimport OrganismSearchAndChipsResults from '../search-and-chips-results';\nimport CourseSelection from '../course-selection';\nimport style from './style.css';\n\nconst buildHeader = (wizardHeader, steps) => {\n const {title, onClick} = wizardHeader;\n\n const buttonCloseIcon = {\n size: 'small',\n 'data-name': 'close-button',\n 'aria-label': 'close button',\n icon: 'close',\n onClick\n };\n\n return (\n <div>\n <div className={style.header}>\n <ButtonLinkIconOnly {...buttonCloseIcon} />\n <div className={style.headerTitle} data-name={'custom-playlist-title'}>\n {title}\n </div>\n </div>\n <WizardSteps steps={steps} />\n </div>\n );\n};\n\nconst buildForm = content => {\n const {type} = content;\n switch (type) {\n case 'form':\n return <BrandForm {...content} />;\n case 'translate':\n return <ContentTranslate {...content} />;\n case 'populations':\n return <OrganismSearchAndChipsResults {...content} />;\n case 'courses':\n return <CourseSelection {...content} />;\n }\n};\n\nconst buildButton = (type, step, side) => {\n const ICONS = {\n previous: {\n position: 'left',\n type: 'chevron-left'\n },\n next: {\n position: 'right',\n type: 'chevron-right'\n },\n publish: {\n position: 'left',\n type: 'publish'\n }\n };\n\n const {label, onClick} = step;\n const buttonProps = {\n type: type === 'previous' ? 'secondary' : 'primary',\n 'aria-label': `${type} step button`,\n 'data-name': `${type}-step-button-${side}`,\n icon: ICONS[type],\n label,\n onClick\n };\n\n return <ButtonLink {...buttonProps} />;\n};\n\nconst buildActionZone = (previousStep, nextStep, side) => {\n const previousButton = previousStep ? buildButton('previous', previousStep, side) : null;\n const nextStepType = getOr('next', 'type', nextStep);\n const nextButton = nextStep ? buildButton(nextStepType, nextStep, side) : null;\n return (\n <div className={style.actionZone}>\n <div className={style.button}>{previousButton}</div>\n <div className={style.button}>{nextButton}</div>\n </div>\n );\n};\n\nconst WizardContents = props => {\n const {isLoading, wizardHeader, steps, summary, content, nextStep, previousStep} = props;\n const headerView = buildHeader(wizardHeader, steps);\n const formView = buildForm({...content, isLoading});\n const rightActionView = buildActionZone(previousStep, nextStep, 'right');\n const footerActionView = buildActionZone(previousStep, nextStep, 'footer');\n\n return (\n <div className={style.container} data-name=\"custom-playlist-summary\">\n <div className={style.leftSection}>\n {headerView}\n <div className={style.form}>{formView}</div>\n </div>\n <div className={style.rightSection} data-name=\"summary-right-section\">\n <div className={style.stickySection}>\n <div className={style.summaryZone} data-name=\"summary-zone\">\n <WizardSummary {...summary} side={'right'} />\n </div>\n {rightActionView}\n </div>\n </div>\n <div className={style.footer} data-name=\"summary-footer-section\">\n <div className={style.summaryFooter}>\n <WizardSummary {...summary} side={'footer'} />\n </div>\n <div className={style.actionFooter}>{footerActionView}</div>\n </div>\n </div>\n );\n};\n\nWizardContents.propTypes = {\n isLoading: PropTypes.bool,\n wizardHeader: PropTypes.shape({\n title: PropTypes.string,\n onClick: PropTypes.func\n }).isRequired,\n steps: WizardSteps.propTypes.steps,\n summary: PropTypes.shape({\n ...WizardSummary.propTypes\n }).isRequired,\n content: PropTypes.oneOfType([\n PropTypes.shape({\n ...BrandForm.propTypes,\n type: PropTypes.oneOf(['form'])\n }),\n PropTypes.shape({\n ...ContentTranslate.propTypes,\n type: PropTypes.oneOf(['translate'])\n }),\n PropTypes.shape({\n ...OrganismSearchAndChipsResults.propTypes,\n type: PropTypes.oneOf(['populations'])\n }),\n PropTypes.shape({\n ...CourseSelection.propTypes,\n type: PropTypes.oneOf(['courses'])\n })\n ]),\n previousStep: PropTypes.shape({\n label: PropTypes.string,\n onClick: PropTypes.func\n }),\n nextStep: PropTypes.shape({\n type: PropTypes.oneOf(['next', 'publish']),\n label: PropTypes.string,\n onClick: PropTypes.func\n })\n};\n\nexport default WizardContents;\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../src/organism/wizard-contents/index.js"],"names":["React","getOr","PropTypes","ButtonLink","ButtonLinkIconOnly","WizardSteps","WizardSummary","BrandForm","ContentTranslate","OrganismSearchAndChipsResults","CourseSelection","CourseSections","style","buildHeader","wizardHeader","steps","title","onClick","buttonCloseIcon","size","icon","header","headerTitle","buildForm","content","type","buildButton","step","side","ICONS","previous","position","next","publish","label","buttonProps","buildActionZone","previousStep","nextStep","previousButton","nextStepType","nextButton","actionZone","button","WizardContents","props","isLoading","summary","headerView","formView","rightActionView","footerActionView","container","leftSection","form","rightSection","stickySection","summaryZone","footer","summaryFooter","actionFooter","propTypes","bool","shape","string","func","isRequired","oneOfType","oneOf"],"mappings":";;AAAA,OAAO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KAAV,CAAgB,CAAC,WAAD,CAAhB;AAFR,KAL2B,EAS3BlE,SAAS,CAAC6D,KAAV,uBACKtD,6BAA6B,CAACoD,SADnC;AAEEpC,IAAAA,IAAI,EAAEvB,SAAS,CAACkE,KAAV,CAAgB,CAAC,aAAD,CAAhB;AAFR,KAT2B,EAa3BlE,SAAS,CAAC6D,KAAV,uBACKrD,eAAe,CAACmD,SADrB;AAEEpC,IAAAA,IAAI,EAAEvB,SAAS,CAACkE,KAAV,CAAgB,CAAC,SAAD,CAAhB;AAFR,KAb2B,EAiB3BlE,SAAS,CAAC6D,KAAV,uBACKpD,cAAc,CAACkD,SADpB;AAEEpC,IAAAA,IAAI,EAAEvB,SAAS,CAACkE,KAAV,CAAgB,CAAC,kBAAD,CAAhB;AAFR,KAjB2B,CAApB,CAVgB;AAgCzB/B,EAAAA,YAAY,EAAEnC,SAAS,CAAC6D,KAAV,CAAgB;AAC5B7B,IAAAA,KAAK,EAAEhC,SAAS,CAAC8D,MADW;AAE5B/C,IAAAA,OAAO,EAAEf,SAAS,CAAC+D;AAFS,GAAhB,CAhCW;AAoCzB3B,EAAAA,QAAQ,EAAEpC,SAAS,CAAC6D,KAAV,CAAgB;AACxBtC,IAAAA,IAAI,EAAEvB,SAAS,CAACkE,KAAV,CAAgB,CAAC,MAAD,EAAS,SAAT,CAAhB,CADkB;AAExBlC,IAAAA,KAAK,EAAEhC,SAAS,CAAC8D,MAFO;AAGxB/C,IAAAA,OAAO,EAAEf,SAAS,CAAC+D;AAHK,GAAhB;AApCe,CAA3B;AA2CA,eAAerB,cAAf","sourcesContent":["import React from 'react';\nimport getOr from 'lodash/fp/getOr';\nimport PropTypes from 'prop-types';\nimport ButtonLink from '../../atom/button-link';\nimport ButtonLinkIconOnly from '../../atom/button-link-icon-only';\nimport WizardSteps from '../../atom/wizard-steps';\nimport WizardSummary from '../../molecule/wizard-summary';\nimport BrandForm from '../brand-form';\nimport ContentTranslate from '../content-translation';\nimport OrganismSearchAndChipsResults from '../search-and-chips-results';\nimport CourseSelection from '../course-selection';\nimport CourseSections from '../../molecule/course-sections';\nimport style from './style.css';\n\nconst buildHeader = (wizardHeader, steps) => {\n const {title, onClick} = wizardHeader;\n\n const buttonCloseIcon = {\n size: 'small',\n 'data-name': 'close-button',\n 'aria-label': 'close button',\n icon: 'close',\n onClick\n };\n\n return (\n <div>\n <div className={style.header}>\n <ButtonLinkIconOnly {...buttonCloseIcon} />\n <div className={style.headerTitle} data-name={'custom-playlist-title'}>\n {title}\n </div>\n </div>\n <WizardSteps steps={steps} />\n </div>\n );\n};\n\nconst buildForm = content => {\n const {type} = content;\n switch (type) {\n case 'form':\n return <BrandForm {...content} />;\n case 'translate':\n return <ContentTranslate {...content} />;\n case 'populations':\n return <OrganismSearchAndChipsResults {...content} />;\n case 'courses':\n return <CourseSelection {...content} />;\n case 'organize-courses':\n return <CourseSections {...content} />;\n }\n};\n\nconst buildButton = (type, step, side) => {\n const ICONS = {\n previous: {\n position: 'left',\n type: 'chevron-left'\n },\n next: {\n position: 'right',\n type: 'chevron-right'\n },\n publish: {\n position: 'left',\n type: 'publish'\n }\n };\n\n const {label, onClick} = step;\n const buttonProps = {\n type: type === 'previous' ? 'secondary' : 'primary',\n 'aria-label': `${type} step button`,\n 'data-name': `${type}-step-button-${side}`,\n icon: ICONS[type],\n label,\n onClick\n };\n\n return <ButtonLink {...buttonProps} />;\n};\n\nconst buildActionZone = (previousStep, nextStep, side) => {\n const previousButton = previousStep ? buildButton('previous', previousStep, side) : null;\n const nextStepType = getOr('next', 'type', nextStep);\n const nextButton = nextStep ? buildButton(nextStepType, nextStep, side) : null;\n return (\n <div className={style.actionZone}>\n <div className={style.button}>{previousButton}</div>\n <div className={style.button}>{nextButton}</div>\n </div>\n );\n};\n\nconst WizardContents = props => {\n const {isLoading, wizardHeader, steps, summary, content, nextStep, previousStep} = props;\n const headerView = buildHeader(wizardHeader, steps);\n const formView = buildForm({...content, isLoading});\n const rightActionView = buildActionZone(previousStep, nextStep, 'right');\n const footerActionView = buildActionZone(previousStep, nextStep, 'footer');\n\n return (\n <div className={style.container} data-name=\"custom-playlist-summary\">\n <div className={style.leftSection}>\n {headerView}\n <div className={style.form}>{formView}</div>\n </div>\n <div className={style.rightSection} data-name=\"summary-right-section\">\n <div className={style.stickySection}>\n <div className={style.summaryZone} data-name=\"summary-zone\">\n <WizardSummary {...summary} side={'right'} />\n </div>\n {rightActionView}\n </div>\n </div>\n <div className={style.footer} data-name=\"summary-footer-section\">\n <div className={style.summaryFooter}>\n <WizardSummary {...summary} side={'footer'} />\n </div>\n <div className={style.actionFooter}>{footerActionView}</div>\n </div>\n </div>\n );\n};\n\nWizardContents.propTypes = {\n isLoading: PropTypes.bool,\n wizardHeader: PropTypes.shape({\n title: PropTypes.string,\n onClick: PropTypes.func\n }).isRequired,\n steps: WizardSteps.propTypes.steps,\n summary: PropTypes.shape({\n ...WizardSummary.propTypes\n }).isRequired,\n content: PropTypes.oneOfType([\n PropTypes.shape({\n ...BrandForm.propTypes,\n type: PropTypes.oneOf(['form'])\n }),\n PropTypes.shape({\n ...ContentTranslate.propTypes,\n type: PropTypes.oneOf(['translate'])\n }),\n PropTypes.shape({\n ...OrganismSearchAndChipsResults.propTypes,\n type: PropTypes.oneOf(['populations'])\n }),\n PropTypes.shape({\n ...CourseSelection.propTypes,\n type: PropTypes.oneOf(['courses'])\n }),\n PropTypes.shape({\n ...CourseSections.propTypes,\n type: PropTypes.oneOf(['organize-courses'])\n })\n ]),\n previousStep: PropTypes.shape({\n label: PropTypes.string,\n onClick: PropTypes.func\n }),\n nextStep: PropTypes.shape({\n type: PropTypes.oneOf(['next', 'publish']),\n label: PropTypes.string,\n onClick: PropTypes.func\n })\n};\n\nexport default WizardContents;\n"],"file":"index.js"}
@@ -0,0 +1,45 @@
1
+ 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); }
2
+
3
+ /* eslint-disable no-console */
4
+ import wizardSummaryOrganizeCourses from '../../../../molecule/wizard-summary/test/fixtures/organize-courses';
5
+ import organizeCoursesForm from '../../../../molecule/course-sections/test/fixtures/default';
6
+ export default {
7
+ props: {
8
+ isLoading: false,
9
+ wizardHeader: {
10
+ title: 'Create a new custom playlist',
11
+ onClick: () => console.log('Close')
12
+ },
13
+ steps: [{
14
+ title: 'General Informations',
15
+ done: true
16
+ }, {
17
+ title: 'Translations',
18
+ done: true
19
+ }, {
20
+ title: 'Assign populations',
21
+ done: true
22
+ }, {
23
+ title: 'Add courses',
24
+ done: true
25
+ }, {
26
+ title: 'Organize courses',
27
+ done: false,
28
+ current: true
29
+ }],
30
+ summary: wizardSummaryOrganizeCourses.props,
31
+ content: _extends(_extends({}, organizeCoursesForm.props), {}, {
32
+ type: 'organize-courses'
33
+ }),
34
+ previousStep: {
35
+ label: 'Previous Step',
36
+ onClick: () => console.log('Previous Step')
37
+ },
38
+ nextStep: {
39
+ type: 'publish',
40
+ label: 'Publish',
41
+ onClick: () => console.log('Next Step')
42
+ }
43
+ }
44
+ };
45
+ //# sourceMappingURL=playlist-organize-courses.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/organism/wizard-contents/test/fixtures/playlist-organize-courses.js"],"names":["wizardSummaryOrganizeCourses","organizeCoursesForm","props","isLoading","wizardHeader","title","onClick","console","log","steps","done","current","summary","content","type","previousStep","label","nextStep"],"mappings":";;AAAA;AACA,OAAOA,4BAAP,MAAyC,oEAAzC;AACA,OAAOC,mBAAP,MAAgC,4DAAhC;AAEA,eAAe;AACbC,EAAAA,KAAK,EAAE;AACLC,IAAAA,SAAS,EAAE,KADN;AAELC,IAAAA,YAAY,EAAE;AACZC,MAAAA,KAAK,EAAE,8BADK;AAEZC,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AAFH,KAFT;AAMLC,IAAAA,KAAK,EAAE,CACL;AACEJ,MAAAA,KAAK,EAAE,sBADT;AAEEK,MAAAA,IAAI,EAAE;AAFR,KADK,EAKL;AACEL,MAAAA,KAAK,EAAE,cADT;AAEEK,MAAAA,IAAI,EAAE;AAFR,KALK,EASL;AACEL,MAAAA,KAAK,EAAE,oBADT;AAEEK,MAAAA,IAAI,EAAE;AAFR,KATK,EAaL;AACEL,MAAAA,KAAK,EAAE,aADT;AAEEK,MAAAA,IAAI,EAAE;AAFR,KAbK,EAiBL;AACEL,MAAAA,KAAK,EAAE,kBADT;AAEEK,MAAAA,IAAI,EAAE,KAFR;AAGEC,MAAAA,OAAO,EAAE;AAHX,KAjBK,CANF;AA6BLC,IAAAA,OAAO,EAAEZ,4BAA4B,CAACE,KA7BjC;AA8BLW,IAAAA,OAAO,wBACFZ,mBAAmB,CAACC,KADlB;AAELY,MAAAA,IAAI,EAAE;AAFD,MA9BF;AAkCLC,IAAAA,YAAY,EAAE;AACZC,MAAAA,KAAK,EAAE,eADK;AAEZV,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,eAAZ;AAFH,KAlCT;AAsCLS,IAAAA,QAAQ,EAAE;AACRH,MAAAA,IAAI,EAAE,SADE;AAERE,MAAAA,KAAK,EAAE,SAFC;AAGRV,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,WAAZ;AAHP;AAtCL;AADM,CAAf","sourcesContent":["/* eslint-disable no-console */\nimport wizardSummaryOrganizeCourses from '../../../../molecule/wizard-summary/test/fixtures/organize-courses';\nimport organizeCoursesForm from '../../../../molecule/course-sections/test/fixtures/default';\n\nexport default {\n props: {\n isLoading: false,\n wizardHeader: {\n title: 'Create a new custom playlist',\n onClick: () => console.log('Close')\n },\n steps: [\n {\n title: 'General Informations',\n done: true\n },\n {\n title: 'Translations',\n done: true\n },\n {\n title: 'Assign populations',\n done: true\n },\n {\n title: 'Add courses',\n done: true\n },\n {\n title: 'Organize courses',\n done: false,\n current: true\n }\n ],\n summary: wizardSummaryOrganizeCourses.props,\n content: {\n ...organizeCoursesForm.props,\n type: 'organize-courses'\n },\n previousStep: {\n label: 'Previous Step',\n onClick: () => console.log('Previous Step')\n },\n nextStep: {\n type: 'publish',\n label: 'Publish',\n onClick: () => console.log('Next Step')\n }\n }\n};\n"],"file":"playlist-organize-courses.js"}
@@ -0,0 +1,22 @@
1
+ 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); }
2
+
3
+ import WizardForm from '../../../../../organism/wizard-contents/test/fixtures/playlist-organize-courses';
4
+ import headerAndMenu from './default';
5
+ const {
6
+ header,
7
+ items
8
+ } = headerAndMenu.props;
9
+ const form = WizardForm.props;
10
+ export default {
11
+ props: {
12
+ header,
13
+ items,
14
+ notifications: [],
15
+ content: _extends(_extends({}, form), {}, {
16
+ isLoading: false,
17
+ key: 'add-courses',
18
+ type: 'wizard'
19
+ })
20
+ }
21
+ };
22
+ //# sourceMappingURL=wizard-organize-courses-playlist.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../src/template/back-office/brand-update/test/fixtures/wizard-organize-courses-playlist.js"],"names":["WizardForm","headerAndMenu","header","items","props","form","notifications","content","isLoading","key","type"],"mappings":";;AAAA,OAAOA,UAAP,MAAuB,iFAAvB;AACA,OAAOC,aAAP,MAA0B,WAA1B;AAEA,MAAM;AAACC,EAAAA,MAAD;AAASC,EAAAA;AAAT,IAAkBF,aAAa,CAACG,KAAtC;AACA,MAAMC,IAAI,GAAGL,UAAU,CAACI,KAAxB;AAEA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLF,IAAAA,MADK;AAELC,IAAAA,KAFK;AAGLG,IAAAA,aAAa,EAAE,EAHV;AAILC,IAAAA,OAAO,wBACFF,IADE;AAELG,MAAAA,SAAS,EAAE,KAFN;AAGLC,MAAAA,GAAG,EAAE,aAHA;AAILC,MAAAA,IAAI,EAAE;AAJD;AAJF;AADM,CAAf","sourcesContent":["import WizardForm from '../../../../../organism/wizard-contents/test/fixtures/playlist-organize-courses';\nimport headerAndMenu from './default';\n\nconst {header, items} = headerAndMenu.props;\nconst form = WizardForm.props;\n\nexport default {\n props: {\n header,\n items,\n notifications: [],\n content: {\n ...form,\n isLoading: false,\n key: 'add-courses',\n type: 'wizard'\n }\n }\n};\n"],"file":"wizard-organize-courses-playlist.js"}
@@ -0,0 +1,4 @@
1
+ import { convert } from 'css-color-function'; // darken the color down to 35% && apply alpha of 25%
2
+
3
+ export const getShadowBoxColorFromPrimary = primaryColor => convert(`color(${primaryColor} lightness(35%) a(25%))`);
4
+ //# 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":["convert","getShadowBoxColorFromPrimary","primaryColor"],"mappings":"AAAA,SAAQA,OAAR,QAAsB,oBAAtB,C,CAEA;;AACA,OAAO,MAAMC,4BAA4B,GAAGC,YAAY,IACtDF,OAAO,CAAE,SAAQE,YAAa,yBAAvB,CADF","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,33 @@
1
+ import test from 'ava';
2
+ import forEach from 'lodash/fp/forEach';
3
+ import { getShadowBoxColorFromPrimary } from '../get-shadow-box-color-from-primary';
4
+ test('should return transformed colors', t => {
5
+ t.plan(13);
6
+ const expectedOrange = 'rgba(179, 42, 0, 0.25)';
7
+ const expectedRed = 'rgba(179, 0, 0, 0.25)';
8
+ const expectedYellow = 'rgba(179, 140, 0, 0.25)';
9
+ const expectedBlue = 'rgba(0, 68, 179, 0.25)'; // a set of possible primary/brand colors
10
+
11
+ const primaryColors = {
12
+ orange: ['#ff6f43', expectedOrange],
13
+ // original, expected
14
+ orangeRGB: ['rgb(255, 111, 67)', expectedOrange],
15
+ orangeRGBA: ['rgba(255, 111, 67, 0)', expectedOrange],
16
+ red: ['#FF0A0A', expectedRed],
17
+ redRGB: ['rgb(255, 10, 10)', expectedRed],
18
+ redRGBA: ['rgba(255, 10, 10, 0)', expectedRed],
19
+ yellow: ['#ffca0a', expectedYellow],
20
+ yellowRGB: ['rgb(255, 202, 10)', expectedYellow],
21
+ yellowRGBA: ['rgba(255, 202, 10, 0)', expectedYellow],
22
+ blue: ['#0061FF', expectedBlue],
23
+ blueRGB: ['rgb(0, 97, 255)', expectedBlue],
24
+ blueRGBA: ['rgba(0, 97, 255, 1)', expectedBlue]
25
+ };
26
+ forEach(color => {
27
+ const [original, expected] = color;
28
+ const boxShadowColor = getShadowBoxColorFromPrimary(original);
29
+ t.is(boxShadowColor, expected);
30
+ }, primaryColors);
31
+ t.pass();
32
+ });
33
+ //# sourceMappingURL=get-shadow-box-color-from-primary.js.map